mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
Release v1.0.2 (#4175)
This commit is contained in:
parent
2961fdd721
commit
d9610701d3
159 changed files with 2793 additions and 2382 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "skyvern"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
description = ""
|
||||
authors = [{ name = "Skyvern AI", email = "info@skyvern.com" }]
|
||||
requires-python = ">=3.11,<3.14"
|
||||
|
|
|
|||
238
skyvern-ts/client/package-lock.json
generated
238
skyvern-ts/client/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@skyvern/client",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@skyvern/client",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.2.5",
|
||||
"@types/node": "^18.19.70",
|
||||
|
|
@ -827,9 +827,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz",
|
||||
"integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz",
|
||||
"integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
|
|
@ -841,9 +841,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz",
|
||||
"integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -855,9 +855,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz",
|
||||
"integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -869,9 +869,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz",
|
||||
"integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz",
|
||||
"integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -883,9 +883,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-freebsd-arm64": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz",
|
||||
"integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -897,9 +897,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-freebsd-x64": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz",
|
||||
"integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz",
|
||||
"integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -911,9 +911,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz",
|
||||
"integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz",
|
||||
"integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
|
|
@ -925,9 +925,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz",
|
||||
"integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz",
|
||||
"integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
|
|
@ -939,9 +939,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -953,9 +953,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz",
|
||||
"integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz",
|
||||
"integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -967,9 +967,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-loong64-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
|
|
@ -981,9 +981,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
|
|
@ -995,9 +995,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
|
|
@ -1009,9 +1009,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-musl": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz",
|
||||
"integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz",
|
||||
"integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
|
|
@ -1023,9 +1023,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
|
|
@ -1037,9 +1037,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -1051,9 +1051,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz",
|
||||
"integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz",
|
||||
"integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -1065,9 +1065,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-openharmony-arm64": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz",
|
||||
"integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz",
|
||||
"integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -1079,9 +1079,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz",
|
||||
"integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz",
|
||||
"integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
|
@ -1093,9 +1093,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz",
|
||||
"integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz",
|
||||
"integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
|
|
@ -1107,9 +1107,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz",
|
||||
"integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz",
|
||||
"integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -1121,9 +1121,9 @@
|
|||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz",
|
||||
"integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz",
|
||||
"integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
@ -1586,9 +1586,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/baseline-browser-mapping": {
|
||||
"version": "2.8.28",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.28.tgz",
|
||||
"integrity": "sha512-gYjt7OIqdM0PcttNYP2aVrr2G0bMALkBaoehD4BuRGjAOtipg0b6wHg1yNL+s5zSnLZZrGHOw4IrND8CD+3oIQ==",
|
||||
"version": "2.8.32",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz",
|
||||
"integrity": "sha512-OPz5aBThlyLFgxyhdwf/s2+8ab3OvT7AdTNvKHBwpXomIYeXqpUUuT8LrdtxZSsWJ4R4CU1un4XGh5Ez3nlTpw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
|
|
@ -1660,9 +1660,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001754",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz",
|
||||
"integrity": "sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg==",
|
||||
"version": "1.0.30001757",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz",
|
||||
"integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1843,9 +1843,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.253",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.253.tgz",
|
||||
"integrity": "sha512-O0tpQ/35rrgdiGQ0/OFWhy1itmd9A6TY9uQzlqj3hKSu/aYpe7UIn5d7CU2N9myH6biZiWF3VMZVuup8pw5U9w==",
|
||||
"version": "1.5.263",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.263.tgz",
|
||||
"integrity": "sha512-DrqJ11Knd+lo+dv+lltvfMDLU27g14LMdH2b0O3Pio4uk0x+z7OR+JrmyacTPN2M8w3BrZ7/RTwG3R9B7irPlg==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
|
|
@ -2477,9 +2477,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.53.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz",
|
||||
"integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==",
|
||||
"version": "4.53.3",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz",
|
||||
"integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -2493,28 +2493,28 @@
|
|||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.53.2",
|
||||
"@rollup/rollup-android-arm64": "4.53.2",
|
||||
"@rollup/rollup-darwin-arm64": "4.53.2",
|
||||
"@rollup/rollup-darwin-x64": "4.53.2",
|
||||
"@rollup/rollup-freebsd-arm64": "4.53.2",
|
||||
"@rollup/rollup-freebsd-x64": "4.53.2",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.53.2",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.53.2",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.53.2",
|
||||
"@rollup/rollup-linux-loong64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-ppc64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-riscv64-musl": "4.53.2",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.53.2",
|
||||
"@rollup/rollup-linux-x64-musl": "4.53.2",
|
||||
"@rollup/rollup-openharmony-arm64": "4.53.2",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.53.2",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.53.2",
|
||||
"@rollup/rollup-win32-x64-gnu": "4.53.2",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.53.2",
|
||||
"@rollup/rollup-android-arm-eabi": "4.53.3",
|
||||
"@rollup/rollup-android-arm64": "4.53.3",
|
||||
"@rollup/rollup-darwin-arm64": "4.53.3",
|
||||
"@rollup/rollup-darwin-x64": "4.53.3",
|
||||
"@rollup/rollup-freebsd-arm64": "4.53.3",
|
||||
"@rollup/rollup-freebsd-x64": "4.53.3",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.53.3",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.53.3",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.53.3",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.53.3",
|
||||
"@rollup/rollup-linux-loong64-gnu": "4.53.3",
|
||||
"@rollup/rollup-linux-ppc64-gnu": "4.53.3",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.53.3",
|
||||
"@rollup/rollup-linux-riscv64-musl": "4.53.3",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.53.3",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.53.3",
|
||||
"@rollup/rollup-linux-x64-musl": "4.53.3",
|
||||
"@rollup/rollup-openharmony-arm64": "4.53.3",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.53.3",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.53.3",
|
||||
"@rollup/rollup-win32-x64-gnu": "4.53.3",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.53.3",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
|
|
@ -2889,22 +2889,22 @@
|
|||
}
|
||||
},
|
||||
"node_modules/tldts": {
|
||||
"version": "7.0.17",
|
||||
"resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.17.tgz",
|
||||
"integrity": "sha512-Y1KQBgDd/NUc+LfOtKS6mNsC9CCaH+m2P1RoIZy7RAPo3C3/t8X45+zgut31cRZtZ3xKPjfn3TkGTrctC2TQIQ==",
|
||||
"version": "7.0.19",
|
||||
"resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.19.tgz",
|
||||
"integrity": "sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tldts-core": "^7.0.17"
|
||||
"tldts-core": "^7.0.19"
|
||||
},
|
||||
"bin": {
|
||||
"tldts": "bin/cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tldts-core": {
|
||||
"version": "7.0.17",
|
||||
"resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.17.tgz",
|
||||
"integrity": "sha512-DieYoGrP78PWKsrXr8MZwtQ7GLCUeLxihtjC1jZsW1DnvSMdKPitJSe8OSYDM2u5H6g3kWJZpePqkp43TfLh0g==",
|
||||
"version": "7.0.19",
|
||||
"resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.19.tgz",
|
||||
"integrity": "sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
|
@ -3096,9 +3096,9 @@
|
|||
"peer": true
|
||||
},
|
||||
"node_modules/vite-node/node_modules/vite": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz",
|
||||
"integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==",
|
||||
"version": "7.2.6",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.2.6.tgz",
|
||||
"integrity": "sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -3302,9 +3302,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vitest/node_modules/vite": {
|
||||
"version": "7.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz",
|
||||
"integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==",
|
||||
"version": "7.2.6",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-7.2.6.tgz",
|
||||
"integrity": "sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -3391,9 +3391,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/webpack": {
|
||||
"version": "5.102.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz",
|
||||
"integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==",
|
||||
"version": "5.103.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.103.0.tgz",
|
||||
"integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -3414,7 +3414,7 @@
|
|||
"glob-to-regexp": "^0.4.1",
|
||||
"graceful-fs": "^4.2.11",
|
||||
"json-parse-even-better-errors": "^2.3.1",
|
||||
"loader-runner": "^4.2.0",
|
||||
"loader-runner": "^4.3.1",
|
||||
"mime-types": "^2.1.27",
|
||||
"neo-async": "^2.6.2",
|
||||
"schema-utils": "^4.3.3",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@skyvern/client",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"private": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -475,249 +475,6 @@ await client.workflows.updateWorkflowFolder("wpid_123");
|
|||
</dl>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
## BrowserProfiles
|
||||
<details><summary><code>client.browserProfiles.<a href="/src/api/resources/browserProfiles/client/Client.ts">listBrowserProfiles</a>({ ...params }) -> Skyvern.BrowserProfile[]</code></summary>
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
#### 📝 Description
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
Get all browser profiles for the organization
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### 🔌 Usage
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
```typescript
|
||||
await client.browserProfiles.listBrowserProfiles({
|
||||
include_deleted: true
|
||||
});
|
||||
|
||||
```
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### ⚙️ Parameters
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**request:** `Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**requestOptions:** `BrowserProfiles.RequestOptions`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
<details><summary><code>client.browserProfiles.<a href="/src/api/resources/browserProfiles/client/Client.ts">createBrowserProfile</a>({ ...params }) -> Skyvern.BrowserProfile</code></summary>
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
#### 🔌 Usage
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
```typescript
|
||||
await client.browserProfiles.createBrowserProfile({
|
||||
name: "name"
|
||||
});
|
||||
|
||||
```
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### ⚙️ Parameters
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**request:** `Skyvern.CreateBrowserProfileRequest`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**requestOptions:** `BrowserProfiles.RequestOptions`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
<details><summary><code>client.browserProfiles.<a href="/src/api/resources/browserProfiles/client/Client.ts">getBrowserProfile</a>(profileId) -> Skyvern.BrowserProfile</code></summary>
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
#### 📝 Description
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
Get a specific browser profile by ID
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### 🔌 Usage
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
```typescript
|
||||
await client.browserProfiles.getBrowserProfile("bp_123456");
|
||||
|
||||
```
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### ⚙️ Parameters
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**profileId:** `string` — The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**requestOptions:** `BrowserProfiles.RequestOptions`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</details>
|
||||
|
||||
<details><summary><code>client.browserProfiles.<a href="/src/api/resources/browserProfiles/client/Client.ts">deleteBrowserProfile</a>(profileId) -> void</code></summary>
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
#### 📝 Description
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
Delete a browser profile (soft delete)
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### 🔌 Usage
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
```typescript
|
||||
await client.browserProfiles.deleteBrowserProfile("bp_123456");
|
||||
|
||||
```
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
#### ⚙️ Parameters
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**profileId:** `string` — The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dd>
|
||||
|
||||
**requestOptions:** `BrowserProfiles.RequestOptions`
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</details>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import * as Skyvern from "./api/index.js";
|
||||
import { BrowserProfiles } from "./api/resources/browserProfiles/client/Client.js";
|
||||
import { Scripts } from "./api/resources/scripts/client/Client.js";
|
||||
import { Workflows } from "./api/resources/workflows/client/Client.js";
|
||||
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
||||
|
|
@ -19,7 +18,6 @@ export declare namespace SkyvernClient {
|
|||
export class SkyvernClient {
|
||||
protected readonly _options: SkyvernClient.Options;
|
||||
protected _workflows: Workflows | undefined;
|
||||
protected _browserProfiles: BrowserProfiles | undefined;
|
||||
protected _scripts: Scripts | undefined;
|
||||
|
||||
constructor(_options: SkyvernClient.Options = {}) {
|
||||
|
|
@ -30,8 +28,8 @@ export class SkyvernClient {
|
|||
"x-api-key": _options?.apiKey,
|
||||
"X-Fern-Language": "JavaScript",
|
||||
"X-Fern-SDK-Name": "@skyvern/client",
|
||||
"X-Fern-SDK-Version": "1.0.0",
|
||||
"User-Agent": "@skyvern/client/1.0.0",
|
||||
"X-Fern-SDK-Version": "1.0.2",
|
||||
"User-Agent": "@skyvern/client/1.0.2",
|
||||
"X-Fern-Runtime": core.RUNTIME.type,
|
||||
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
||||
},
|
||||
|
|
@ -44,10 +42,6 @@ export class SkyvernClient {
|
|||
return (this._workflows ??= new Workflows(this._options));
|
||||
}
|
||||
|
||||
public get browserProfiles(): BrowserProfiles {
|
||||
return (this._browserProfiles ??= new BrowserProfiles(this._options));
|
||||
}
|
||||
|
||||
public get scripts(): Scripts {
|
||||
return (this._scripts ??= new Scripts(this._options));
|
||||
}
|
||||
|
|
@ -1102,6 +1096,335 @@ export class SkyvernClient {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all browser profiles for the organization
|
||||
*
|
||||
* @param {Skyvern.ListBrowserProfilesRequest} request
|
||||
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.listBrowserProfiles({
|
||||
* include_deleted: true
|
||||
* })
|
||||
*/
|
||||
public listBrowserProfiles(
|
||||
request: Skyvern.ListBrowserProfilesRequest = {},
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): core.HttpResponsePromise<Skyvern.BrowserProfile[]> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions));
|
||||
}
|
||||
|
||||
private async __listBrowserProfiles(
|
||||
request: Skyvern.ListBrowserProfilesRequest = {},
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): Promise<core.WithRawResponse<Skyvern.BrowserProfile[]>> {
|
||||
const { include_deleted: includeDeleted } = request;
|
||||
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
|
||||
if (includeDeleted != null) {
|
||||
_queryParams.include_deleted = includeDeleted.toString();
|
||||
}
|
||||
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
"v1/browser_profiles",
|
||||
),
|
||||
method: "GET",
|
||||
headers: _headers,
|
||||
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: _response.body as Skyvern.BrowserProfile[], rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles.");
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a browser profile from a persistent browser session or workflow run.
|
||||
*
|
||||
* @param {Skyvern.CreateBrowserProfileRequest} request
|
||||
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.BadRequestError}
|
||||
* @throws {@link Skyvern.ConflictError}
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.createBrowserProfile({
|
||||
* name: "name"
|
||||
* })
|
||||
*/
|
||||
public createBrowserProfile(
|
||||
request: Skyvern.CreateBrowserProfileRequest,
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): core.HttpResponsePromise<Skyvern.BrowserProfile> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions));
|
||||
}
|
||||
|
||||
private async __createBrowserProfile(
|
||||
request: Skyvern.CreateBrowserProfileRequest,
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): Promise<core.WithRawResponse<Skyvern.BrowserProfile>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
"v1/browser_profiles",
|
||||
),
|
||||
method: "POST",
|
||||
headers: _headers,
|
||||
contentType: "application/json",
|
||||
queryParameters: requestOptions?.queryParams,
|
||||
requestType: "json",
|
||||
body: request,
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 400:
|
||||
throw new Skyvern.BadRequestError(_response.error.body as unknown, _response.rawResponse);
|
||||
case 409:
|
||||
throw new Skyvern.ConflictError(_response.error.body as unknown, _response.rawResponse);
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles.");
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific browser profile by ID
|
||||
*
|
||||
* @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.NotFoundError}
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.getBrowserProfile("bp_123456")
|
||||
*/
|
||||
public getBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): core.HttpResponsePromise<Skyvern.BrowserProfile> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions));
|
||||
}
|
||||
|
||||
private async __getBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): Promise<core.WithRawResponse<Skyvern.BrowserProfile>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
`v1/browser_profiles/${core.url.encodePathParam(profileId)}`,
|
||||
),
|
||||
method: "GET",
|
||||
headers: _headers,
|
||||
queryParameters: requestOptions?.queryParams,
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 404:
|
||||
throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError(
|
||||
"Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.",
|
||||
);
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a browser profile (soft delete)
|
||||
*
|
||||
* @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
* @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.NotFoundError}
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.deleteBrowserProfile("bp_123456")
|
||||
*/
|
||||
public deleteBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): core.HttpResponsePromise<void> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions));
|
||||
}
|
||||
|
||||
private async __deleteBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: SkyvernClient.RequestOptions,
|
||||
): Promise<core.WithRawResponse<void>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
`v1/browser_profiles/${core.url.encodePathParam(profileId)}`,
|
||||
),
|
||||
method: "DELETE",
|
||||
headers: _headers,
|
||||
queryParameters: requestOptions?.queryParams,
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: undefined, rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 404:
|
||||
throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError(
|
||||
"Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.",
|
||||
);
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all active browser sessions for the organization
|
||||
*
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* include_deleted: true
|
||||
* }
|
||||
*/
|
||||
export interface ListBrowserProfilesV1BrowserProfilesGetRequest {
|
||||
export interface ListBrowserProfilesRequest {
|
||||
/** Include deleted browser profiles */
|
||||
include_deleted?: boolean;
|
||||
}
|
||||
|
|
@ -25,6 +25,8 @@ export interface LoginRequest {
|
|||
totp_url?: string;
|
||||
/** ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456` */
|
||||
browser_session_id?: string;
|
||||
/** ID of a browser profile to reuse for this run */
|
||||
browser_profile_id?: string;
|
||||
/** The CDP address for the task. */
|
||||
browser_address?: string;
|
||||
/** Additional HTTP headers to include in requests */
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
|
||||
export type { CreateBrowserSessionRequest } from "./CreateBrowserSessionRequest.js";
|
||||
export type { CreateCredentialRequest } from "./CreateCredentialRequest.js";
|
||||
export type { CreateScriptRequest } from "./CreateScriptRequest.js";
|
||||
|
|
@ -7,6 +8,7 @@ export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
|
|||
export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
|
||||
export type { GetScriptsRequest } from "./GetScriptsRequest.js";
|
||||
export type { GetWorkflowsRequest } from "./GetWorkflowsRequest.js";
|
||||
export type { ListBrowserProfilesRequest } from "./ListBrowserProfilesRequest.js";
|
||||
export type { LoginRequest } from "./LoginRequest.js";
|
||||
export type { RunSdkActionRequest } from "./RunSdkActionRequest.js";
|
||||
export type { RunTaskRequest } from "./RunTaskRequest.js";
|
||||
|
|
|
|||
16
skyvern-ts/client/src/api/errors/ConflictError.ts
Normal file
16
skyvern-ts/client/src/api/errors/ConflictError.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import type * as core from "../../core/index.js";
|
||||
import * as errors from "../../errors/index.js";
|
||||
|
||||
export class ConflictError extends errors.SkyvernError {
|
||||
constructor(body?: unknown, rawResponse?: core.RawResponse) {
|
||||
super({
|
||||
message: "ConflictError",
|
||||
statusCode: 409,
|
||||
body: body,
|
||||
rawResponse: rawResponse,
|
||||
});
|
||||
Object.setPrototypeOf(this, ConflictError.prototype);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
export * from "./BadRequestError.js";
|
||||
export * from "./ConflictError.js";
|
||||
export * from "./ForbiddenError.js";
|
||||
export * from "./NotFoundError.js";
|
||||
export * from "./UnprocessableEntityError.js";
|
||||
|
|
|
|||
|
|
@ -1,343 +0,0 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
||||
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
|
||||
import * as core from "../../../../core/index.js";
|
||||
import * as environments from "../../../../environments.js";
|
||||
import * as errors from "../../../../errors/index.js";
|
||||
import * as Skyvern from "../../../index.js";
|
||||
|
||||
export declare namespace BrowserProfiles {
|
||||
export interface Options extends BaseClientOptions {}
|
||||
|
||||
export interface RequestOptions extends BaseRequestOptions {}
|
||||
}
|
||||
|
||||
export class BrowserProfiles {
|
||||
protected readonly _options: BrowserProfiles.Options;
|
||||
|
||||
constructor(_options: BrowserProfiles.Options = {}) {
|
||||
this._options = _options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all browser profiles for the organization
|
||||
*
|
||||
* @param {Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest} request
|
||||
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.browserProfiles.listBrowserProfiles({
|
||||
* include_deleted: true
|
||||
* })
|
||||
*/
|
||||
public listBrowserProfiles(
|
||||
request: Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest = {},
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): core.HttpResponsePromise<Skyvern.BrowserProfile[]> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__listBrowserProfiles(request, requestOptions));
|
||||
}
|
||||
|
||||
private async __listBrowserProfiles(
|
||||
request: Skyvern.ListBrowserProfilesV1BrowserProfilesGetRequest = {},
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): Promise<core.WithRawResponse<Skyvern.BrowserProfile[]>> {
|
||||
const { include_deleted: includeDeleted } = request;
|
||||
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
|
||||
if (includeDeleted != null) {
|
||||
_queryParams.include_deleted = includeDeleted.toString();
|
||||
}
|
||||
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
"v1/browser_profiles",
|
||||
),
|
||||
method: "GET",
|
||||
headers: _headers,
|
||||
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: _response.body as Skyvern.BrowserProfile[], rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/browser_profiles.");
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Skyvern.CreateBrowserProfileRequest} request
|
||||
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.browserProfiles.createBrowserProfile({
|
||||
* name: "name"
|
||||
* })
|
||||
*/
|
||||
public createBrowserProfile(
|
||||
request: Skyvern.CreateBrowserProfileRequest,
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): core.HttpResponsePromise<Skyvern.BrowserProfile> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__createBrowserProfile(request, requestOptions));
|
||||
}
|
||||
|
||||
private async __createBrowserProfile(
|
||||
request: Skyvern.CreateBrowserProfileRequest,
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): Promise<core.WithRawResponse<Skyvern.BrowserProfile>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
"v1/browser_profiles",
|
||||
),
|
||||
method: "POST",
|
||||
headers: _headers,
|
||||
contentType: "application/json",
|
||||
queryParameters: requestOptions?.queryParams,
|
||||
requestType: "json",
|
||||
body: request,
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError("Timeout exceeded when calling POST /v1/browser_profiles.");
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific browser profile by ID
|
||||
*
|
||||
* @param {string} profileId - The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.NotFoundError}
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.browserProfiles.getBrowserProfile("bp_123456")
|
||||
*/
|
||||
public getBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): core.HttpResponsePromise<Skyvern.BrowserProfile> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__getBrowserProfile(profileId, requestOptions));
|
||||
}
|
||||
|
||||
private async __getBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): Promise<core.WithRawResponse<Skyvern.BrowserProfile>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
`v1/browser_profiles/${core.url.encodePathParam(profileId)}`,
|
||||
),
|
||||
method: "GET",
|
||||
headers: _headers,
|
||||
queryParameters: requestOptions?.queryParams,
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: _response.body as Skyvern.BrowserProfile, rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 404:
|
||||
throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError(
|
||||
"Timeout exceeded when calling GET /v1/browser_profiles/{profile_id}.",
|
||||
);
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a browser profile (soft delete)
|
||||
*
|
||||
* @param {string} profileId - The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
* @param {BrowserProfiles.RequestOptions} requestOptions - Request-specific configuration.
|
||||
*
|
||||
* @throws {@link Skyvern.NotFoundError}
|
||||
* @throws {@link Skyvern.UnprocessableEntityError}
|
||||
*
|
||||
* @example
|
||||
* await client.browserProfiles.deleteBrowserProfile("bp_123456")
|
||||
*/
|
||||
public deleteBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): core.HttpResponsePromise<void> {
|
||||
return core.HttpResponsePromise.fromPromise(this.__deleteBrowserProfile(profileId, requestOptions));
|
||||
}
|
||||
|
||||
private async __deleteBrowserProfile(
|
||||
profileId: string,
|
||||
requestOptions?: BrowserProfiles.RequestOptions,
|
||||
): Promise<core.WithRawResponse<void>> {
|
||||
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
|
||||
this._options?.headers,
|
||||
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
|
||||
requestOptions?.headers,
|
||||
);
|
||||
const _response = await core.fetcher({
|
||||
url: core.url.join(
|
||||
(await core.Supplier.get(this._options.baseUrl)) ??
|
||||
(await core.Supplier.get(this._options.environment)) ??
|
||||
environments.SkyvernEnvironment.Cloud,
|
||||
`v1/browser_profiles/${core.url.encodePathParam(profileId)}`,
|
||||
),
|
||||
method: "DELETE",
|
||||
headers: _headers,
|
||||
queryParameters: requestOptions?.queryParams,
|
||||
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
||||
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
||||
abortSignal: requestOptions?.abortSignal,
|
||||
});
|
||||
if (_response.ok) {
|
||||
return { data: undefined, rawResponse: _response.rawResponse };
|
||||
}
|
||||
|
||||
if (_response.error.reason === "status-code") {
|
||||
switch (_response.error.statusCode) {
|
||||
case 404:
|
||||
throw new Skyvern.NotFoundError(_response.error.body as unknown, _response.rawResponse);
|
||||
case 422:
|
||||
throw new Skyvern.UnprocessableEntityError(_response.error.body as unknown, _response.rawResponse);
|
||||
default:
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.body,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (_response.error.reason) {
|
||||
case "non-json":
|
||||
throw new errors.SkyvernError({
|
||||
statusCode: _response.error.statusCode,
|
||||
body: _response.error.rawBody,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
case "timeout":
|
||||
throw new errors.SkyvernTimeoutError(
|
||||
"Timeout exceeded when calling DELETE /v1/browser_profiles/{profile_id}.",
|
||||
);
|
||||
case "unknown":
|
||||
throw new errors.SkyvernError({
|
||||
message: _response.error.errorMessage,
|
||||
rawResponse: _response.rawResponse,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
export * from "./requests/index.js";
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
export type { CreateBrowserProfileRequest } from "./CreateBrowserProfileRequest.js";
|
||||
export type { ListBrowserProfilesV1BrowserProfilesGetRequest } from "./ListBrowserProfilesV1BrowserProfilesGetRequest.js";
|
||||
|
|
@ -1 +0,0 @@
|
|||
export * from "./client/index.js";
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
export * from "./browserProfiles/client/requests/index.js";
|
||||
export * as browserProfiles from "./browserProfiles/index.js";
|
||||
export * as scripts from "./scripts/index.js";
|
||||
export * from "./workflows/client/requests/index.js";
|
||||
export * as workflows from "./workflows/index.js";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ActionBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface ActionBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ActionBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
url?: string;
|
||||
|
|
@ -17,6 +20,5 @@ export interface ActionBlockYaml {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
disable_cache?: boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ export const BlockType = {
|
|||
Task: "task",
|
||||
TaskV2: "task_v2",
|
||||
ForLoop: "for_loop",
|
||||
Conditional: "conditional",
|
||||
Code: "code",
|
||||
TextPrompt: "text_prompt",
|
||||
DownloadToS3: "download_to_s3",
|
||||
|
|
|
|||
13
skyvern-ts/client/src/api/types/BranchCondition.ts
Normal file
13
skyvern-ts/client/src/api/types/BranchCondition.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import type * as Skyvern from "../index.js";
|
||||
|
||||
/**
|
||||
* Represents a single conditional branch edge within a ConditionalBlock.
|
||||
*/
|
||||
export interface BranchCondition {
|
||||
criteria?: Skyvern.BranchCriteria;
|
||||
next_block_label?: string;
|
||||
description?: string;
|
||||
is_default?: boolean;
|
||||
}
|
||||
10
skyvern-ts/client/src/api/types/BranchCriteria.ts
Normal file
10
skyvern-ts/client/src/api/types/BranchCriteria.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
/**
|
||||
* Abstract interface describing how a branch condition should be evaluated.
|
||||
*/
|
||||
export interface BranchCriteria {
|
||||
criteria_type: string;
|
||||
expression: string;
|
||||
description?: string;
|
||||
}
|
||||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface CodeBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface CodeBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
code: string;
|
||||
|
|
|
|||
18
skyvern-ts/client/src/api/types/ConditionalBlock.ts
Normal file
18
skyvern-ts/client/src/api/types/ConditionalBlock.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import type * as Skyvern from "../index.js";
|
||||
|
||||
/**
|
||||
* Branching block that selects the next block label based on list-ordered conditions.
|
||||
*/
|
||||
export interface ConditionalBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
disable_cache?: boolean;
|
||||
branch_conditions?: Skyvern.BranchCondition[];
|
||||
}
|
||||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface DownloadToS3Block {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface DownloadToS3BlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
url: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ExtractionBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface ExtractionBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ExtractionBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
data_extraction_goal: string;
|
||||
|
|
@ -14,7 +17,6 @@ export interface ExtractionBlockYaml {
|
|||
max_retries?: number;
|
||||
max_steps_per_run?: number;
|
||||
parameter_keys?: string[];
|
||||
cache_actions?: boolean;
|
||||
disable_cache?: boolean;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface FileDownloadBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface FileDownloadBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface FileDownloadBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
navigation_goal: string;
|
||||
|
|
@ -17,7 +20,6 @@ export interface FileDownloadBlockYaml {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
disable_cache?: boolean;
|
||||
download_timeout?: number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface FileParserBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface FileParserBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
file_url: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface FileUploadBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface FileUploadBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
storage_type?: Skyvern.FileStorageType;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ForLoopBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import type * as Skyvern from "../index.js";
|
|||
export type ForLoopBlockLoopBlocksItem =
|
||||
| Skyvern.ForLoopBlockLoopBlocksItem.Action
|
||||
| Skyvern.ForLoopBlockLoopBlocksItem.Code
|
||||
| Skyvern.ForLoopBlockLoopBlocksItem.Conditional
|
||||
| Skyvern.ForLoopBlockLoopBlocksItem.DownloadToS3
|
||||
| Skyvern.ForLoopBlockLoopBlocksItem.Extraction
|
||||
| Skyvern.ForLoopBlockLoopBlocksItem.FileDownload
|
||||
|
|
@ -34,6 +35,10 @@ export namespace ForLoopBlockLoopBlocksItem {
|
|||
block_type: "code";
|
||||
}
|
||||
|
||||
export interface Conditional extends Skyvern.ConditionalBlock {
|
||||
block_type: "conditional";
|
||||
}
|
||||
|
||||
export interface DownloadToS3 extends Skyvern.DownloadToS3Block {
|
||||
block_type: "download_to_s3";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ForLoopBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
loop_blocks: Skyvern.ForLoopBlockYamlLoopBlocksItem[];
|
||||
|
|
|
|||
23
skyvern-ts/client/src/api/types/GeoTarget.ts
Normal file
23
skyvern-ts/client/src/api/types/GeoTarget.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
/**
|
||||
* Granular geographic targeting for proxy selection.
|
||||
*
|
||||
* Supports country, subdivision (state/region), and city level targeting.
|
||||
* Uses ISO 3166-1 alpha-2 for countries, ISO 3166-2 for subdivisions,
|
||||
* and GeoNames English names for cities.
|
||||
*
|
||||
* Examples:
|
||||
* - {"country": "US"} - United States (same as RESIDENTIAL)
|
||||
* - {"country": "US", "subdivision": "CA"} - California, US
|
||||
* - {"country": "US", "subdivision": "NY", "city": "New York"} - New York City
|
||||
* - {"country": "GB", "city": "London"} - London, UK
|
||||
*/
|
||||
export interface GeoTarget {
|
||||
/** ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'DE') */
|
||||
country: string;
|
||||
/** ISO 3166-2 subdivision code without country prefix (e.g., 'CA' for California, 'NY' for New York) */
|
||||
subdivision?: string;
|
||||
/** City name in English from GeoNames (e.g., 'New York', 'Los Angeles', 'London') */
|
||||
city?: string;
|
||||
}
|
||||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface HttpRequestBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface HttpRequestBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
method?: string;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ import type * as Skyvern from "../index.js";
|
|||
* - does not respond within the timeout period, the workflow terminates
|
||||
*/
|
||||
export interface HumanInteractionBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -36,7 +39,6 @@ export interface HumanInteractionBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface HumanInteractionBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
instructions?: string;
|
||||
|
|
|
|||
9
skyvern-ts/client/src/api/types/LocateElementAction.ts
Normal file
9
skyvern-ts/client/src/api/types/LocateElementAction.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
/**
|
||||
* Locate element action parameters.
|
||||
*/
|
||||
export interface LocateElementAction {
|
||||
/** Natural language prompt to locate an element */
|
||||
prompt?: string;
|
||||
}
|
||||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface LoginBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface LoginBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface LoginBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
url?: string;
|
||||
|
|
@ -16,7 +19,6 @@ export interface LoginBlockYaml {
|
|||
parameter_keys?: string[];
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
disable_cache?: boolean;
|
||||
complete_criterion?: string;
|
||||
terminate_criterion?: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface NavigationBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface NavigationBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface NavigationBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
navigation_goal: string;
|
||||
|
|
@ -18,7 +21,6 @@ export interface NavigationBlockYaml {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
disable_cache?: boolean;
|
||||
complete_criterion?: string;
|
||||
terminate_criterion?: string;
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@ export interface NonEmptyPasswordCredential {
|
|||
totp?: string;
|
||||
/** Type of 2FA method used for this credential */
|
||||
totp_type?: Skyvern.TotpType;
|
||||
/** Identifier (email or phone number) used to fetch TOTP codes */
|
||||
totp_identifier?: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,4 +10,6 @@ export interface PasswordCredentialResponse {
|
|||
username: string;
|
||||
/** Type of 2FA method used for this credential */
|
||||
totp_type?: Skyvern.TotpType;
|
||||
/** Identifier (email or phone number) used to fetch TOTP codes */
|
||||
totp_identifier?: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ import type * as Skyvern from "../index.js";
|
|||
* This block will be removed in a future version.
|
||||
*/
|
||||
export interface PdfParserBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface PdfParserBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
file_url: string;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ export type RunSdkActionRequestAction =
|
|||
| Skyvern.RunSdkActionRequestAction.AiInputText
|
||||
| Skyvern.RunSdkActionRequestAction.AiSelectOption
|
||||
| Skyvern.RunSdkActionRequestAction.AiUploadFile
|
||||
| Skyvern.RunSdkActionRequestAction.Extract;
|
||||
| Skyvern.RunSdkActionRequestAction.Extract
|
||||
| Skyvern.RunSdkActionRequestAction.LocateElement;
|
||||
|
||||
export namespace RunSdkActionRequestAction {
|
||||
export interface AiAct extends Skyvern.ActAction {
|
||||
|
|
@ -37,4 +38,8 @@ export namespace RunSdkActionRequestAction {
|
|||
export interface Extract extends Skyvern.ExtractAction {
|
||||
type: "extract";
|
||||
}
|
||||
|
||||
export interface LocateElement extends Skyvern.LocateElementAction {
|
||||
type: "locate_element";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface SendEmailBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface SendEmailBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
smtp_host_secret_parameter_key: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface TaskBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface TaskBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface TaskBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
url?: string;
|
||||
|
|
@ -20,7 +23,6 @@ export interface TaskBlockYaml {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
disable_cache?: boolean;
|
||||
complete_criterion?: string;
|
||||
terminate_criterion?: string;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,9 @@ export interface TaskRunRequest {
|
|||
* - US-FL: Florida
|
||||
* - US-WA: Washington
|
||||
* - NONE: No proxy
|
||||
* Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
*/
|
||||
proxy_location?: Skyvern.ProxyLocation;
|
||||
proxy_location?: TaskRunRequest.ProxyLocation;
|
||||
/**
|
||||
* The schema for data to be extracted from the webpage. If you're looking for consistent data schema being returned by the agent, it's highly recommended to use https://json-schema.org/.
|
||||
*/
|
||||
|
|
@ -87,6 +88,33 @@ export interface TaskRunRequest {
|
|||
}
|
||||
|
||||
export namespace TaskRunRequest {
|
||||
/**
|
||||
*
|
||||
* Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
*
|
||||
* Available geotargeting options:
|
||||
* - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
|
||||
* - RESIDENTIAL_ES: Spain
|
||||
* - RESIDENTIAL_IE: Ireland
|
||||
* - RESIDENTIAL_GB: United Kingdom
|
||||
* - RESIDENTIAL_IN: India
|
||||
* - RESIDENTIAL_JP: Japan
|
||||
* - RESIDENTIAL_FR: France
|
||||
* - RESIDENTIAL_DE: Germany
|
||||
* - RESIDENTIAL_NZ: New Zealand
|
||||
* - RESIDENTIAL_ZA: South Africa
|
||||
* - RESIDENTIAL_AR: Argentina
|
||||
* - RESIDENTIAL_AU: Australia
|
||||
* - RESIDENTIAL_ISP: ISP proxy
|
||||
* - US-CA: California
|
||||
* - US-NY: New York
|
||||
* - US-TX: Texas
|
||||
* - US-FL: Florida
|
||||
* - US-WA: Washington
|
||||
* - NONE: No proxy
|
||||
* Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
*/
|
||||
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
|
||||
/**
|
||||
*
|
||||
* 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/.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface TaskV2Block {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface TaskV2BlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
prompt: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface TextPromptBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface TextPromptBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
llm_key?: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface UploadToS3Block {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface UploadToS3BlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
path?: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface UrlBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface UrlBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface UrlBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
url: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface ValidationBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
@ -25,7 +28,6 @@ export interface ValidationBlock {
|
|||
download_suffix?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
cache_actions?: boolean;
|
||||
complete_verification?: boolean;
|
||||
include_action_history_in_verification?: boolean;
|
||||
download_timeout?: number;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface ValidationBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
complete_criterion?: string;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface WaitBlock {
|
||||
/** Author-facing identifier for a block; unique within a workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted. */
|
||||
next_block_label?: string;
|
||||
output_parameter: Skyvern.OutputParameter;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
export interface WaitBlockYaml {
|
||||
/** Author-facing identifier; must be unique per workflow. */
|
||||
label: string;
|
||||
/** Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]]. */
|
||||
next_block_label?: string;
|
||||
continue_on_failure?: boolean;
|
||||
model?: Record<string, unknown>;
|
||||
wait_sec?: number;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export interface Workflow {
|
|||
is_saved_task: boolean;
|
||||
description?: string;
|
||||
workflow_definition: Skyvern.WorkflowDefinition;
|
||||
proxy_location?: Skyvern.ProxyLocation;
|
||||
proxy_location?: Workflow.ProxyLocation;
|
||||
webhook_callback_url?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
|
|
@ -31,3 +31,7 @@ export interface Workflow {
|
|||
modified_at: string;
|
||||
deleted_at?: string;
|
||||
}
|
||||
|
||||
export namespace Workflow {
|
||||
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import type * as Skyvern from "../index.js";
|
|||
export interface WorkflowCreateYamlRequest {
|
||||
title: string;
|
||||
description?: string;
|
||||
proxy_location?: Skyvern.ProxyLocation;
|
||||
proxy_location?: WorkflowCreateYamlRequest.ProxyLocation;
|
||||
webhook_callback_url?: string;
|
||||
totp_verification_url?: string;
|
||||
totp_identifier?: string;
|
||||
|
|
@ -23,3 +23,7 @@ export interface WorkflowCreateYamlRequest {
|
|||
sequential_key?: string;
|
||||
folder_id?: string;
|
||||
}
|
||||
|
||||
export namespace WorkflowCreateYamlRequest {
|
||||
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface WorkflowDefinition {
|
||||
version?: number;
|
||||
parameters: Skyvern.WorkflowDefinitionParametersItem[];
|
||||
blocks: Skyvern.WorkflowDefinitionBlocksItem[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import type * as Skyvern from "../index.js";
|
|||
export type WorkflowDefinitionBlocksItem =
|
||||
| Skyvern.WorkflowDefinitionBlocksItem.Action
|
||||
| Skyvern.WorkflowDefinitionBlocksItem.Code
|
||||
| Skyvern.WorkflowDefinitionBlocksItem.Conditional
|
||||
| Skyvern.WorkflowDefinitionBlocksItem.DownloadToS3
|
||||
| Skyvern.WorkflowDefinitionBlocksItem.Extraction
|
||||
| Skyvern.WorkflowDefinitionBlocksItem.FileDownload
|
||||
|
|
@ -34,6 +35,10 @@ export namespace WorkflowDefinitionBlocksItem {
|
|||
block_type: "code";
|
||||
}
|
||||
|
||||
export interface Conditional extends Skyvern.ConditionalBlock {
|
||||
block_type: "conditional";
|
||||
}
|
||||
|
||||
export interface DownloadToS3 extends Skyvern.DownloadToS3Block {
|
||||
block_type: "download_to_s3";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import type * as Skyvern from "../index.js";
|
||||
|
||||
export interface WorkflowDefinitionYaml {
|
||||
version?: number;
|
||||
parameters: Skyvern.WorkflowDefinitionYamlParametersItem[];
|
||||
blocks: Skyvern.WorkflowDefinitionYamlBlocksItem[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ export interface WorkflowRunRequest {
|
|||
* - US-FL: Florida
|
||||
* - US-WA: Washington
|
||||
* - NONE: No proxy
|
||||
* Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
*/
|
||||
proxy_location?: Skyvern.ProxyLocation;
|
||||
proxy_location?: WorkflowRunRequest.ProxyLocation;
|
||||
/** URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions. */
|
||||
webhook_url?: string;
|
||||
/**
|
||||
|
|
@ -59,3 +60,33 @@ export interface WorkflowRunRequest {
|
|||
/** Whether to run the workflow with agent or code. */
|
||||
run_with?: string;
|
||||
}
|
||||
|
||||
export namespace WorkflowRunRequest {
|
||||
/**
|
||||
*
|
||||
* Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
*
|
||||
* Available geotargeting options:
|
||||
* - RESIDENTIAL: the default value. Skyvern Cloud uses a random US residential proxy.
|
||||
* - RESIDENTIAL_ES: Spain
|
||||
* - RESIDENTIAL_IE: Ireland
|
||||
* - RESIDENTIAL_GB: United Kingdom
|
||||
* - RESIDENTIAL_IN: India
|
||||
* - RESIDENTIAL_JP: Japan
|
||||
* - RESIDENTIAL_FR: France
|
||||
* - RESIDENTIAL_DE: Germany
|
||||
* - RESIDENTIAL_NZ: New Zealand
|
||||
* - RESIDENTIAL_ZA: South Africa
|
||||
* - RESIDENTIAL_AR: Argentina
|
||||
* - RESIDENTIAL_AU: Australia
|
||||
* - RESIDENTIAL_ISP: ISP proxy
|
||||
* - US-CA: California
|
||||
* - US-NY: New York
|
||||
* - US-TX: Texas
|
||||
* - US-FL: Florida
|
||||
* - US-WA: Washington
|
||||
* - NONE: No proxy
|
||||
* Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
*/
|
||||
export type ProxyLocation = Skyvern.ProxyLocation | Skyvern.GeoTarget | Record<string, unknown>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ export * from "./BitwardenLoginCredentialParameterYaml.js";
|
|||
export * from "./BitwardenSensitiveInformationParameter.js";
|
||||
export * from "./BitwardenSensitiveInformationParameterYaml.js";
|
||||
export * from "./BlockType.js";
|
||||
export * from "./BranchCondition.js";
|
||||
export * from "./BranchCriteria.js";
|
||||
export * from "./BrowserProfile.js";
|
||||
export * from "./BrowserSessionResponse.js";
|
||||
export * from "./ClickAction.js";
|
||||
|
|
@ -26,6 +28,7 @@ export * from "./ClickContext.js";
|
|||
export * from "./CodeBlock.js";
|
||||
export * from "./CodeBlockParametersItem.js";
|
||||
export * from "./CodeBlockYaml.js";
|
||||
export * from "./ConditionalBlock.js";
|
||||
export * from "./ContextParameter.js";
|
||||
export * from "./ContextParameterSource.js";
|
||||
export * from "./ContextParameterYaml.js";
|
||||
|
|
@ -59,6 +62,7 @@ export * from "./ForLoopBlockLoopBlocksItem.js";
|
|||
export * from "./ForLoopBlockLoopOver.js";
|
||||
export * from "./ForLoopBlockYaml.js";
|
||||
export * from "./ForLoopBlockYamlLoopBlocksItem.js";
|
||||
export * from "./GeoTarget.js";
|
||||
export * from "./GetRunResponse.js";
|
||||
export * from "./HttpRequestBlock.js";
|
||||
export * from "./HttpRequestBlockParametersItem.js";
|
||||
|
|
@ -69,6 +73,7 @@ export * from "./HumanInteractionBlockParametersItem.js";
|
|||
export * from "./HumanInteractionBlockYaml.js";
|
||||
export * from "./InputOrSelectContext.js";
|
||||
export * from "./InputTextAction.js";
|
||||
export * from "./LocateElementAction.js";
|
||||
export * from "./LoginBlock.js";
|
||||
export * from "./LoginBlockParametersItem.js";
|
||||
export * from "./LoginBlockYaml.js";
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export const SDK_VERSION = "1.0.0";
|
||||
export const SDK_VERSION = "1.0.2";
|
||||
|
|
|
|||
|
|
@ -1,236 +0,0 @@
|
|||
// This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import * as Skyvern from "../../src/api/index";
|
||||
import { SkyvernClient } from "../../src/Client";
|
||||
import { mockServerPool } from "../mock-server/MockServerPool";
|
||||
|
||||
describe("BrowserProfiles", () => {
|
||||
test("listBrowserProfiles (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = [
|
||||
{
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
},
|
||||
];
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles")
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.browserProfiles.listBrowserProfiles({
|
||||
include_deleted: true,
|
||||
});
|
||||
expect(response).toEqual([
|
||||
{
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
test("listBrowserProfiles (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.browserProfiles.listBrowserProfiles();
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("createBrowserProfile (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { name: "name" };
|
||||
const rawResponseBody = {
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
};
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/v1/browser_profiles")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.browserProfiles.createBrowserProfile({
|
||||
name: "name",
|
||||
});
|
||||
expect(response).toEqual({
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
test("createBrowserProfile (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { name: "name" };
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/v1/browser_profiles")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.browserProfiles.createBrowserProfile({
|
||||
name: "name",
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("getBrowserProfile (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = {
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
};
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles/bp_123456")
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.browserProfiles.getBrowserProfile("bp_123456");
|
||||
expect(response).toEqual({
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
test("getBrowserProfile (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(404)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.browserProfiles.getBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.NotFoundError);
|
||||
});
|
||||
|
||||
test("getBrowserProfile (3)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.browserProfiles.getBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("deleteBrowserProfile (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
server.mockEndpoint().delete("/v1/browser_profiles/bp_123456").respondWith().statusCode(200).build();
|
||||
|
||||
const response = await client.browserProfiles.deleteBrowserProfile("bp_123456");
|
||||
expect(response).toEqual(undefined);
|
||||
});
|
||||
|
||||
test("deleteBrowserProfile (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.delete("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(404)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.browserProfiles.deleteBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.NotFoundError);
|
||||
});
|
||||
|
||||
test("deleteBrowserProfile (3)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.delete("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.browserProfiles.deleteBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
});
|
||||
|
|
@ -537,6 +537,7 @@ describe("SkyvernClient", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -605,6 +606,7 @@ describe("SkyvernClient", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -682,6 +684,7 @@ describe("SkyvernClient", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -749,6 +752,7 @@ describe("SkyvernClient", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -834,6 +838,7 @@ describe("SkyvernClient", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -898,6 +903,7 @@ describe("SkyvernClient", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -1411,6 +1417,277 @@ describe("SkyvernClient", () => {
|
|||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("list_browser_profiles (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = [
|
||||
{
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
},
|
||||
];
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles")
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.listBrowserProfiles({
|
||||
include_deleted: true,
|
||||
});
|
||||
expect(response).toEqual([
|
||||
{
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
test("list_browser_profiles (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.listBrowserProfiles();
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("create_browser_profile (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { name: "name" };
|
||||
const rawResponseBody = {
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
};
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/v1/browser_profiles")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.createBrowserProfile({
|
||||
name: "name",
|
||||
});
|
||||
expect(response).toEqual({
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
test("create_browser_profile (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { name: "name" };
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/v1/browser_profiles")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(400)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.createBrowserProfile({
|
||||
name: "name",
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.BadRequestError);
|
||||
});
|
||||
|
||||
test("create_browser_profile (3)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { name: "name" };
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/v1/browser_profiles")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(409)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.createBrowserProfile({
|
||||
name: "name",
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.ConflictError);
|
||||
});
|
||||
|
||||
test("create_browser_profile (4)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
const rawRequestBody = { name: "name" };
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.post("/v1/browser_profiles")
|
||||
.jsonBody(rawRequestBody)
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.createBrowserProfile({
|
||||
name: "name",
|
||||
});
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("get_browser_profile (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = {
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
};
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles/bp_123456")
|
||||
.respondWith()
|
||||
.statusCode(200)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
const response = await client.getBrowserProfile("bp_123456");
|
||||
expect(response).toEqual({
|
||||
browser_profile_id: "browser_profile_id",
|
||||
organization_id: "organization_id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
created_at: "2024-01-15T09:30:00Z",
|
||||
modified_at: "2024-01-15T09:30:00Z",
|
||||
deleted_at: "2024-01-15T09:30:00Z",
|
||||
});
|
||||
});
|
||||
|
||||
test("get_browser_profile (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(404)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.getBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.NotFoundError);
|
||||
});
|
||||
|
||||
test("get_browser_profile (3)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.get("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.getBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("delete_browser_profile (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
server.mockEndpoint().delete("/v1/browser_profiles/bp_123456").respondWith().statusCode(200).build();
|
||||
|
||||
const response = await client.deleteBrowserProfile("bp_123456");
|
||||
expect(response).toEqual(undefined);
|
||||
});
|
||||
|
||||
test("delete_browser_profile (2)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.delete("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(404)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.deleteBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.NotFoundError);
|
||||
});
|
||||
|
||||
test("delete_browser_profile (3)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
||||
const rawResponseBody = { key: "value" };
|
||||
server
|
||||
.mockEndpoint()
|
||||
.delete("/v1/browser_profiles/profile_id")
|
||||
.respondWith()
|
||||
.statusCode(422)
|
||||
.jsonBody(rawResponseBody)
|
||||
.build();
|
||||
|
||||
await expect(async () => {
|
||||
return await client.deleteBrowserProfile("profile_id");
|
||||
}).rejects.toThrow(Skyvern.UnprocessableEntityError);
|
||||
});
|
||||
|
||||
test("get_browser_sessions (1)", async () => {
|
||||
const server = mockServerPool.createServer();
|
||||
const client = new SkyvernClient({ apiKey: "test", environment: server.baseUrl });
|
||||
|
|
@ -1877,7 +2154,11 @@ describe("SkyvernClient", () => {
|
|||
const rawResponseBody = [
|
||||
{
|
||||
credential_id: "cred_1234567890",
|
||||
credential: { username: "user@example.com", totp_type: "authenticator" },
|
||||
credential: {
|
||||
username: "user@example.com",
|
||||
totp_type: "authenticator",
|
||||
totp_identifier: "totp_identifier",
|
||||
},
|
||||
credential_type: "password",
|
||||
name: "Amazon Login",
|
||||
},
|
||||
|
|
@ -1894,6 +2175,7 @@ describe("SkyvernClient", () => {
|
|||
credential: {
|
||||
username: "user@example.com",
|
||||
totp_type: "authenticator",
|
||||
totp_identifier: "totp_identifier",
|
||||
},
|
||||
credential_type: "password",
|
||||
name: "Amazon Login",
|
||||
|
|
@ -1923,7 +2205,11 @@ describe("SkyvernClient", () => {
|
|||
};
|
||||
const rawResponseBody = {
|
||||
credential_id: "cred_1234567890",
|
||||
credential: { username: "user@example.com", totp_type: "authenticator" },
|
||||
credential: {
|
||||
username: "user@example.com",
|
||||
totp_type: "authenticator",
|
||||
totp_identifier: "totp_identifier",
|
||||
},
|
||||
credential_type: "password",
|
||||
name: "Amazon Login",
|
||||
};
|
||||
|
|
@ -1950,6 +2236,7 @@ describe("SkyvernClient", () => {
|
|||
credential: {
|
||||
username: "user@example.com",
|
||||
totp_type: "authenticator",
|
||||
totp_identifier: "totp_identifier",
|
||||
},
|
||||
credential_type: "password",
|
||||
name: "Amazon Login",
|
||||
|
|
@ -2020,7 +2307,11 @@ describe("SkyvernClient", () => {
|
|||
|
||||
const rawResponseBody = {
|
||||
credential_id: "cred_1234567890",
|
||||
credential: { username: "user@example.com", totp_type: "authenticator" },
|
||||
credential: {
|
||||
username: "user@example.com",
|
||||
totp_type: "authenticator",
|
||||
totp_identifier: "totp_identifier",
|
||||
},
|
||||
credential_type: "password",
|
||||
name: "Amazon Login",
|
||||
};
|
||||
|
|
@ -2038,6 +2329,7 @@ describe("SkyvernClient", () => {
|
|||
credential: {
|
||||
username: "user@example.com",
|
||||
totp_type: "authenticator",
|
||||
totp_identifier: "totp_identifier",
|
||||
},
|
||||
credential_type: "password",
|
||||
name: "Amazon Login",
|
||||
|
|
|
|||
|
|
@ -341,6 +341,7 @@ describe("Workflows", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
@ -405,6 +406,7 @@ describe("Workflows", () => {
|
|||
is_saved_task: true,
|
||||
description: "description",
|
||||
workflow_definition: {
|
||||
version: 1,
|
||||
parameters: [
|
||||
{
|
||||
parameter_type: "aws_secret",
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ if typing.TYPE_CHECKING:
|
|||
BitwardenSensitiveInformationParameter,
|
||||
BitwardenSensitiveInformationParameterYaml,
|
||||
BlockType,
|
||||
BranchCondition,
|
||||
BranchCriteria,
|
||||
BrowserProfile,
|
||||
BrowserSessionResponse,
|
||||
ClickAction,
|
||||
|
|
@ -60,6 +62,7 @@ if typing.TYPE_CHECKING:
|
|||
CodeBlockParametersItem_Output,
|
||||
CodeBlockParametersItem_Workflow,
|
||||
CodeBlockYaml,
|
||||
ConditionalBlock,
|
||||
ContextParameter,
|
||||
ContextParameterSource,
|
||||
ContextParameterSource_AwsSecret,
|
||||
|
|
@ -133,6 +136,7 @@ if typing.TYPE_CHECKING:
|
|||
ForLoopBlockLoopBlocksItem,
|
||||
ForLoopBlockLoopBlocksItem_Action,
|
||||
ForLoopBlockLoopBlocksItem_Code,
|
||||
ForLoopBlockLoopBlocksItem_Conditional,
|
||||
ForLoopBlockLoopBlocksItem_DownloadToS3,
|
||||
ForLoopBlockLoopBlocksItem_Extraction,
|
||||
ForLoopBlockLoopBlocksItem_FileDownload,
|
||||
|
|
@ -187,6 +191,7 @@ if typing.TYPE_CHECKING:
|
|||
ForLoopBlockYamlLoopBlocksItem_UploadToS3,
|
||||
ForLoopBlockYamlLoopBlocksItem_Validation,
|
||||
ForLoopBlockYamlLoopBlocksItem_Wait,
|
||||
GeoTarget,
|
||||
GetRunResponse,
|
||||
GetRunResponse_AnthropicCua,
|
||||
GetRunResponse_OpenaiCua,
|
||||
|
|
@ -224,7 +229,6 @@ if typing.TYPE_CHECKING:
|
|||
HumanInteractionBlockParametersItem_Output,
|
||||
HumanInteractionBlockParametersItem_Workflow,
|
||||
HumanInteractionBlockYaml,
|
||||
ImprovePromptResponse,
|
||||
InputOrSelectContext,
|
||||
InputTextAction,
|
||||
InputTextActionData,
|
||||
|
|
@ -309,6 +313,7 @@ if typing.TYPE_CHECKING:
|
|||
TaskBlockYamlDataSchema,
|
||||
TaskRunRequest,
|
||||
TaskRunRequestDataExtractionSchema,
|
||||
TaskRunRequestProxyLocation,
|
||||
TaskRunResponse,
|
||||
TaskRunResponseOutput,
|
||||
TaskV2Block,
|
||||
|
|
@ -385,10 +390,12 @@ if typing.TYPE_CHECKING:
|
|||
WaitBlockYaml,
|
||||
Workflow,
|
||||
WorkflowCreateYamlRequest,
|
||||
WorkflowCreateYamlRequestProxyLocation,
|
||||
WorkflowDefinition,
|
||||
WorkflowDefinitionBlocksItem,
|
||||
WorkflowDefinitionBlocksItem_Action,
|
||||
WorkflowDefinitionBlocksItem_Code,
|
||||
WorkflowDefinitionBlocksItem_Conditional,
|
||||
WorkflowDefinitionBlocksItem_DownloadToS3,
|
||||
WorkflowDefinitionBlocksItem_Extraction,
|
||||
WorkflowDefinitionBlocksItem_FileDownload,
|
||||
|
|
@ -459,20 +466,22 @@ if typing.TYPE_CHECKING:
|
|||
WorkflowParameterType,
|
||||
WorkflowParameterYaml,
|
||||
WorkflowParameterYamlDefaultValue,
|
||||
WorkflowProxyLocation,
|
||||
WorkflowRequest,
|
||||
WorkflowRunBlock,
|
||||
WorkflowRunBlockDataSchema,
|
||||
WorkflowRunBlockNavigationPayload,
|
||||
WorkflowRunBlockOutput,
|
||||
WorkflowRunRequest,
|
||||
WorkflowRunRequestProxyLocation,
|
||||
WorkflowRunResponse,
|
||||
WorkflowRunResponseOutput,
|
||||
WorkflowRunTimeline,
|
||||
WorkflowRunTimelineType,
|
||||
WorkflowStatus,
|
||||
)
|
||||
from .errors import BadRequestError, ForbiddenError, NotFoundError, UnprocessableEntityError
|
||||
from . import browser_profiles, prompts, scripts, workflows
|
||||
from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError
|
||||
from . import scripts, workflows
|
||||
from .client import AsyncSkyvern, Skyvern
|
||||
from .environment import SkyvernEnvironment
|
||||
from .version import __version__
|
||||
|
|
@ -513,6 +522,8 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"BitwardenSensitiveInformationParameter": ".types",
|
||||
"BitwardenSensitiveInformationParameterYaml": ".types",
|
||||
"BlockType": ".types",
|
||||
"BranchCondition": ".types",
|
||||
"BranchCriteria": ".types",
|
||||
"BrowserProfile": ".types",
|
||||
"BrowserSessionResponse": ".types",
|
||||
"ClickAction": ".types",
|
||||
|
|
@ -532,6 +543,8 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"CodeBlockParametersItem_Output": ".types",
|
||||
"CodeBlockParametersItem_Workflow": ".types",
|
||||
"CodeBlockYaml": ".types",
|
||||
"ConditionalBlock": ".types",
|
||||
"ConflictError": ".errors",
|
||||
"ContextParameter": ".types",
|
||||
"ContextParameterSource": ".types",
|
||||
"ContextParameterSource_AwsSecret": ".types",
|
||||
|
|
@ -605,6 +618,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"ForLoopBlockLoopBlocksItem": ".types",
|
||||
"ForLoopBlockLoopBlocksItem_Action": ".types",
|
||||
"ForLoopBlockLoopBlocksItem_Code": ".types",
|
||||
"ForLoopBlockLoopBlocksItem_Conditional": ".types",
|
||||
"ForLoopBlockLoopBlocksItem_DownloadToS3": ".types",
|
||||
"ForLoopBlockLoopBlocksItem_Extraction": ".types",
|
||||
"ForLoopBlockLoopBlocksItem_FileDownload": ".types",
|
||||
|
|
@ -660,6 +674,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"ForLoopBlockYamlLoopBlocksItem_Validation": ".types",
|
||||
"ForLoopBlockYamlLoopBlocksItem_Wait": ".types",
|
||||
"ForbiddenError": ".errors",
|
||||
"GeoTarget": ".types",
|
||||
"GetRunResponse": ".types",
|
||||
"GetRunResponse_AnthropicCua": ".types",
|
||||
"GetRunResponse_OpenaiCua": ".types",
|
||||
|
|
@ -697,7 +712,6 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"HumanInteractionBlockParametersItem_Output": ".types",
|
||||
"HumanInteractionBlockParametersItem_Workflow": ".types",
|
||||
"HumanInteractionBlockYaml": ".types",
|
||||
"ImprovePromptResponse": ".types",
|
||||
"InputOrSelectContext": ".types",
|
||||
"InputTextAction": ".types",
|
||||
"InputTextActionData": ".types",
|
||||
|
|
@ -785,6 +799,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"TaskBlockYamlDataSchema": ".types",
|
||||
"TaskRunRequest": ".types",
|
||||
"TaskRunRequestDataExtractionSchema": ".types",
|
||||
"TaskRunRequestProxyLocation": ".types",
|
||||
"TaskRunResponse": ".types",
|
||||
"TaskRunResponseOutput": ".types",
|
||||
"TaskV2Block": ".types",
|
||||
|
|
@ -862,10 +877,12 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"WaitBlockYaml": ".types",
|
||||
"Workflow": ".types",
|
||||
"WorkflowCreateYamlRequest": ".types",
|
||||
"WorkflowCreateYamlRequestProxyLocation": ".types",
|
||||
"WorkflowDefinition": ".types",
|
||||
"WorkflowDefinitionBlocksItem": ".types",
|
||||
"WorkflowDefinitionBlocksItem_Action": ".types",
|
||||
"WorkflowDefinitionBlocksItem_Code": ".types",
|
||||
"WorkflowDefinitionBlocksItem_Conditional": ".types",
|
||||
"WorkflowDefinitionBlocksItem_DownloadToS3": ".types",
|
||||
"WorkflowDefinitionBlocksItem_Extraction": ".types",
|
||||
"WorkflowDefinitionBlocksItem_FileDownload": ".types",
|
||||
|
|
@ -936,20 +953,20 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"WorkflowParameterType": ".types",
|
||||
"WorkflowParameterYaml": ".types",
|
||||
"WorkflowParameterYamlDefaultValue": ".types",
|
||||
"WorkflowProxyLocation": ".types",
|
||||
"WorkflowRequest": ".types",
|
||||
"WorkflowRunBlock": ".types",
|
||||
"WorkflowRunBlockDataSchema": ".types",
|
||||
"WorkflowRunBlockNavigationPayload": ".types",
|
||||
"WorkflowRunBlockOutput": ".types",
|
||||
"WorkflowRunRequest": ".types",
|
||||
"WorkflowRunRequestProxyLocation": ".types",
|
||||
"WorkflowRunResponse": ".types",
|
||||
"WorkflowRunResponseOutput": ".types",
|
||||
"WorkflowRunTimeline": ".types",
|
||||
"WorkflowRunTimelineType": ".types",
|
||||
"WorkflowStatus": ".types",
|
||||
"__version__": ".version",
|
||||
"browser_profiles": ".browser_profiles",
|
||||
"prompts": ".prompts",
|
||||
"scripts": ".scripts",
|
||||
"workflows": ".workflows",
|
||||
}
|
||||
|
|
@ -1013,6 +1030,8 @@ __all__ = [
|
|||
"BitwardenSensitiveInformationParameter",
|
||||
"BitwardenSensitiveInformationParameterYaml",
|
||||
"BlockType",
|
||||
"BranchCondition",
|
||||
"BranchCriteria",
|
||||
"BrowserProfile",
|
||||
"BrowserSessionResponse",
|
||||
"ClickAction",
|
||||
|
|
@ -1032,6 +1051,8 @@ __all__ = [
|
|||
"CodeBlockParametersItem_Output",
|
||||
"CodeBlockParametersItem_Workflow",
|
||||
"CodeBlockYaml",
|
||||
"ConditionalBlock",
|
||||
"ConflictError",
|
||||
"ContextParameter",
|
||||
"ContextParameterSource",
|
||||
"ContextParameterSource_AwsSecret",
|
||||
|
|
@ -1105,6 +1126,7 @@ __all__ = [
|
|||
"ForLoopBlockLoopBlocksItem",
|
||||
"ForLoopBlockLoopBlocksItem_Action",
|
||||
"ForLoopBlockLoopBlocksItem_Code",
|
||||
"ForLoopBlockLoopBlocksItem_Conditional",
|
||||
"ForLoopBlockLoopBlocksItem_DownloadToS3",
|
||||
"ForLoopBlockLoopBlocksItem_Extraction",
|
||||
"ForLoopBlockLoopBlocksItem_FileDownload",
|
||||
|
|
@ -1160,6 +1182,7 @@ __all__ = [
|
|||
"ForLoopBlockYamlLoopBlocksItem_Validation",
|
||||
"ForLoopBlockYamlLoopBlocksItem_Wait",
|
||||
"ForbiddenError",
|
||||
"GeoTarget",
|
||||
"GetRunResponse",
|
||||
"GetRunResponse_AnthropicCua",
|
||||
"GetRunResponse_OpenaiCua",
|
||||
|
|
@ -1197,7 +1220,6 @@ __all__ = [
|
|||
"HumanInteractionBlockParametersItem_Output",
|
||||
"HumanInteractionBlockParametersItem_Workflow",
|
||||
"HumanInteractionBlockYaml",
|
||||
"ImprovePromptResponse",
|
||||
"InputOrSelectContext",
|
||||
"InputTextAction",
|
||||
"InputTextActionData",
|
||||
|
|
@ -1285,6 +1307,7 @@ __all__ = [
|
|||
"TaskBlockYamlDataSchema",
|
||||
"TaskRunRequest",
|
||||
"TaskRunRequestDataExtractionSchema",
|
||||
"TaskRunRequestProxyLocation",
|
||||
"TaskRunResponse",
|
||||
"TaskRunResponseOutput",
|
||||
"TaskV2Block",
|
||||
|
|
@ -1362,10 +1385,12 @@ __all__ = [
|
|||
"WaitBlockYaml",
|
||||
"Workflow",
|
||||
"WorkflowCreateYamlRequest",
|
||||
"WorkflowCreateYamlRequestProxyLocation",
|
||||
"WorkflowDefinition",
|
||||
"WorkflowDefinitionBlocksItem",
|
||||
"WorkflowDefinitionBlocksItem_Action",
|
||||
"WorkflowDefinitionBlocksItem_Code",
|
||||
"WorkflowDefinitionBlocksItem_Conditional",
|
||||
"WorkflowDefinitionBlocksItem_DownloadToS3",
|
||||
"WorkflowDefinitionBlocksItem_Extraction",
|
||||
"WorkflowDefinitionBlocksItem_FileDownload",
|
||||
|
|
@ -1436,20 +1461,20 @@ __all__ = [
|
|||
"WorkflowParameterType",
|
||||
"WorkflowParameterYaml",
|
||||
"WorkflowParameterYamlDefaultValue",
|
||||
"WorkflowProxyLocation",
|
||||
"WorkflowRequest",
|
||||
"WorkflowRunBlock",
|
||||
"WorkflowRunBlockDataSchema",
|
||||
"WorkflowRunBlockNavigationPayload",
|
||||
"WorkflowRunBlockOutput",
|
||||
"WorkflowRunRequest",
|
||||
"WorkflowRunRequestProxyLocation",
|
||||
"WorkflowRunResponse",
|
||||
"WorkflowRunResponseOutput",
|
||||
"WorkflowRunTimeline",
|
||||
"WorkflowRunTimelineType",
|
||||
"WorkflowStatus",
|
||||
"__version__",
|
||||
"browser_profiles",
|
||||
"prompts",
|
||||
"scripts",
|
||||
"workflows",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
# isort: skip_file
|
||||
|
||||
|
|
@ -1,379 +0,0 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
|
||||
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
||||
from ..core.request_options import RequestOptions
|
||||
from ..types.browser_profile import BrowserProfile
|
||||
from .raw_client import AsyncRawBrowserProfilesClient, RawBrowserProfilesClient
|
||||
|
||||
# this is used as the default value for optional parameters
|
||||
OMIT = typing.cast(typing.Any, ...)
|
||||
|
||||
|
||||
class BrowserProfilesClient:
|
||||
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
||||
self._raw_client = RawBrowserProfilesClient(client_wrapper=client_wrapper)
|
||||
|
||||
@property
|
||||
def with_raw_response(self) -> RawBrowserProfilesClient:
|
||||
"""
|
||||
Retrieves a raw implementation of this client that returns raw responses.
|
||||
|
||||
Returns
|
||||
-------
|
||||
RawBrowserProfilesClient
|
||||
"""
|
||||
return self._raw_client
|
||||
|
||||
def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> typing.List[BrowserProfile]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
typing.List[BrowserProfile]
|
||||
Successful Response
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.browser_profiles.list_browser_profiles(
|
||||
include_deleted=True,
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.list_browser_profiles(
|
||||
include_deleted=include_deleted, request_options=request_options
|
||||
)
|
||||
return _response.data
|
||||
|
||||
def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successful Response
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.browser_profiles.create_browser_profile(
|
||||
name="name",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.create_browser_profile(
|
||||
name=name,
|
||||
description=description,
|
||||
browser_session_id=browser_session_id,
|
||||
workflow_run_id=workflow_run_id,
|
||||
request_options=request_options,
|
||||
)
|
||||
return _response.data
|
||||
|
||||
def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successfully retrieved browser profile
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.browser_profiles.get_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.get_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> None:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.browser_profiles.delete_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
|
||||
class AsyncBrowserProfilesClient:
|
||||
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
||||
self._raw_client = AsyncRawBrowserProfilesClient(client_wrapper=client_wrapper)
|
||||
|
||||
@property
|
||||
def with_raw_response(self) -> AsyncRawBrowserProfilesClient:
|
||||
"""
|
||||
Retrieves a raw implementation of this client that returns raw responses.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncRawBrowserProfilesClient
|
||||
"""
|
||||
return self._raw_client
|
||||
|
||||
async def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> typing.List[BrowserProfile]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
typing.List[BrowserProfile]
|
||||
Successful Response
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.browser_profiles.list_browser_profiles(
|
||||
include_deleted=True,
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.list_browser_profiles(
|
||||
include_deleted=include_deleted, request_options=request_options
|
||||
)
|
||||
return _response.data
|
||||
|
||||
async def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successful Response
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.browser_profiles.create_browser_profile(
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.create_browser_profile(
|
||||
name=name,
|
||||
description=description,
|
||||
browser_session_id=browser_session_id,
|
||||
workflow_run_id=workflow_run_id,
|
||||
request_options=request_options,
|
||||
)
|
||||
return _response.data
|
||||
|
||||
async def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successfully retrieved browser profile
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.browser_profiles.get_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.get_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
async def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> None:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.browser_profiles.delete_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
|
@ -1,507 +0,0 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
from json.decoder import JSONDecodeError
|
||||
|
||||
from ..core.api_error import ApiError
|
||||
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
||||
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
||||
from ..core.jsonable_encoder import jsonable_encoder
|
||||
from ..core.pydantic_utilities import parse_obj_as
|
||||
from ..core.request_options import RequestOptions
|
||||
from ..errors.not_found_error import NotFoundError
|
||||
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
||||
from ..types.browser_profile import BrowserProfile
|
||||
|
||||
# this is used as the default value for optional parameters
|
||||
OMIT = typing.cast(typing.Any, ...)
|
||||
|
||||
|
||||
class RawBrowserProfilesClient:
|
||||
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
||||
self._client_wrapper = client_wrapper
|
||||
|
||||
def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[typing.List[BrowserProfile]]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[typing.List[BrowserProfile]]
|
||||
Successful Response
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="GET",
|
||||
params={
|
||||
"include_deleted": include_deleted,
|
||||
},
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
typing.List[BrowserProfile],
|
||||
parse_obj_as(
|
||||
type_=typing.List[BrowserProfile], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> HttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[BrowserProfile]
|
||||
Successful Response
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="POST",
|
||||
json={
|
||||
"name": name,
|
||||
"description": description,
|
||||
"browser_session_id": browser_session_id,
|
||||
"workflow_run_id": workflow_run_id,
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[BrowserProfile]
|
||||
Successfully retrieved browser profile
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="GET",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[None]:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[None]
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="DELETE",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
return HttpResponse(response=_response, data=None)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
|
||||
class AsyncRawBrowserProfilesClient:
|
||||
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
||||
self._client_wrapper = client_wrapper
|
||||
|
||||
async def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[typing.List[BrowserProfile]]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[typing.List[BrowserProfile]]
|
||||
Successful Response
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="GET",
|
||||
params={
|
||||
"include_deleted": include_deleted,
|
||||
},
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
typing.List[BrowserProfile],
|
||||
parse_obj_as(
|
||||
type_=typing.List[BrowserProfile], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> AsyncHttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[BrowserProfile]
|
||||
Successful Response
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="POST",
|
||||
json={
|
||||
"name": name,
|
||||
"description": description,
|
||||
"browser_session_id": browser_session_id,
|
||||
"workflow_run_id": workflow_run_id,
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[BrowserProfile]
|
||||
Successfully retrieved browser profile
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="GET",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[None]:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[None]
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="DELETE",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
return AsyncHttpResponse(response=_response, data=None)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
|
@ -12,6 +12,7 @@ from .environment import SkyvernEnvironment
|
|||
from .raw_client import AsyncRawSkyvern, RawSkyvern
|
||||
from .types.artifact import Artifact
|
||||
from .types.artifact_type import ArtifactType
|
||||
from .types.browser_profile import BrowserProfile
|
||||
from .types.browser_session_response import BrowserSessionResponse
|
||||
from .types.create_credential_request_credential import CreateCredentialRequestCredential
|
||||
from .types.create_script_response import CreateScriptResponse
|
||||
|
|
@ -26,17 +27,17 @@ from .types.script_file_create import ScriptFileCreate
|
|||
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
|
||||
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
|
||||
from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
|
||||
from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
|
||||
from .types.task_run_response import TaskRunResponse
|
||||
from .types.totp_code import TotpCode
|
||||
from .types.workflow import Workflow
|
||||
from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest
|
||||
from .types.workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
|
||||
from .types.workflow_run_response import WorkflowRunResponse
|
||||
from .types.workflow_run_timeline import WorkflowRunTimeline
|
||||
from .types.workflow_status import WorkflowStatus
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
from .browser_profiles.client import AsyncBrowserProfilesClient, BrowserProfilesClient
|
||||
from .prompts.client import AsyncPromptsClient, PromptsClient
|
||||
from .scripts.client import AsyncScriptsClient, ScriptsClient
|
||||
from .workflows.client import AsyncWorkflowsClient, WorkflowsClient
|
||||
# this is used as the default value for optional parameters
|
||||
|
|
@ -110,8 +111,6 @@ class Skyvern:
|
|||
)
|
||||
self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper)
|
||||
self._workflows: typing.Optional[WorkflowsClient] = None
|
||||
self._browser_profiles: typing.Optional[BrowserProfilesClient] = None
|
||||
self._prompts: typing.Optional[PromptsClient] = None
|
||||
self._scripts: typing.Optional[ScriptsClient] = None
|
||||
|
||||
@property
|
||||
|
|
@ -133,7 +132,7 @@ class Skyvern:
|
|||
url: typing.Optional[str] = OMIT,
|
||||
engine: typing.Optional[RunEngine] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
|
||||
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
|
||||
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
||||
max_steps: typing.Optional[int] = OMIT,
|
||||
|
|
@ -171,7 +170,7 @@ class Skyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for the task
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -195,6 +194,7 @@ class Skyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
|
||||
|
||||
|
|
@ -296,7 +296,7 @@ class Skyvern:
|
|||
user_agent: typing.Optional[str] = None,
|
||||
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
|
||||
webhook_url: typing.Optional[str] = OMIT,
|
||||
totp_url: typing.Optional[str] = OMIT,
|
||||
totp_identifier: typing.Optional[str] = OMIT,
|
||||
|
|
@ -329,7 +329,7 @@ class Skyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for this workflow run
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -353,6 +353,7 @@ class Skyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
webhook_url : typing.Optional[str]
|
||||
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
|
||||
|
|
@ -849,6 +850,160 @@ class Skyvern:
|
|||
_response = self._raw_client.get_run_timeline(run_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> typing.List[BrowserProfile]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
typing.List[BrowserProfile]
|
||||
Successfully retrieved browser profiles
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.list_browser_profiles(
|
||||
include_deleted=True,
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.list_browser_profiles(
|
||||
include_deleted=include_deleted, request_options=request_options
|
||||
)
|
||||
return _response.data
|
||||
|
||||
def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Create a browser profile from a persistent browser session or workflow run.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successfully created browser profile
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.create_browser_profile(
|
||||
name="name",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.create_browser_profile(
|
||||
name=name,
|
||||
description=description,
|
||||
browser_session_id=browser_session_id,
|
||||
workflow_run_id=workflow_run_id,
|
||||
request_options=request_options,
|
||||
)
|
||||
return _response.data
|
||||
|
||||
def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successfully retrieved browser profile
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.get_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.get_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> None:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.delete_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
def get_browser_sessions(
|
||||
self, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> typing.List[BrowserSessionResponse]:
|
||||
|
|
@ -1600,22 +1755,6 @@ class Skyvern:
|
|||
self._workflows = WorkflowsClient(client_wrapper=self._client_wrapper)
|
||||
return self._workflows
|
||||
|
||||
@property
|
||||
def browser_profiles(self):
|
||||
if self._browser_profiles is None:
|
||||
from .browser_profiles.client import BrowserProfilesClient # noqa: E402
|
||||
|
||||
self._browser_profiles = BrowserProfilesClient(client_wrapper=self._client_wrapper)
|
||||
return self._browser_profiles
|
||||
|
||||
@property
|
||||
def prompts(self):
|
||||
if self._prompts is None:
|
||||
from .prompts.client import PromptsClient # noqa: E402
|
||||
|
||||
self._prompts = PromptsClient(client_wrapper=self._client_wrapper)
|
||||
return self._prompts
|
||||
|
||||
@property
|
||||
def scripts(self):
|
||||
if self._scripts is None:
|
||||
|
|
@ -1692,8 +1831,6 @@ class AsyncSkyvern:
|
|||
)
|
||||
self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
|
||||
self._workflows: typing.Optional[AsyncWorkflowsClient] = None
|
||||
self._browser_profiles: typing.Optional[AsyncBrowserProfilesClient] = None
|
||||
self._prompts: typing.Optional[AsyncPromptsClient] = None
|
||||
self._scripts: typing.Optional[AsyncScriptsClient] = None
|
||||
|
||||
@property
|
||||
|
|
@ -1715,7 +1852,7 @@ class AsyncSkyvern:
|
|||
url: typing.Optional[str] = OMIT,
|
||||
engine: typing.Optional[RunEngine] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
|
||||
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
|
||||
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
||||
max_steps: typing.Optional[int] = OMIT,
|
||||
|
|
@ -1753,7 +1890,7 @@ class AsyncSkyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for the task
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -1777,6 +1914,7 @@ class AsyncSkyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
|
||||
|
||||
|
|
@ -1886,7 +2024,7 @@ class AsyncSkyvern:
|
|||
user_agent: typing.Optional[str] = None,
|
||||
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
|
||||
webhook_url: typing.Optional[str] = OMIT,
|
||||
totp_url: typing.Optional[str] = OMIT,
|
||||
totp_identifier: typing.Optional[str] = OMIT,
|
||||
|
|
@ -1919,7 +2057,7 @@ class AsyncSkyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for this workflow run
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -1943,6 +2081,7 @@ class AsyncSkyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
webhook_url : typing.Optional[str]
|
||||
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
|
||||
|
|
@ -2529,6 +2668,192 @@ class AsyncSkyvern:
|
|||
_response = await self._raw_client.get_run_timeline(run_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
async def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> typing.List[BrowserProfile]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
typing.List[BrowserProfile]
|
||||
Successfully retrieved browser profiles
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.list_browser_profiles(
|
||||
include_deleted=True,
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.list_browser_profiles(
|
||||
include_deleted=include_deleted, request_options=request_options
|
||||
)
|
||||
return _response.data
|
||||
|
||||
async def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Create a browser profile from a persistent browser session or workflow run.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successfully created browser profile
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.create_browser_profile(
|
||||
name="name",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.create_browser_profile(
|
||||
name=name,
|
||||
description=description,
|
||||
browser_session_id=browser_session_id,
|
||||
workflow_run_id=workflow_run_id,
|
||||
request_options=request_options,
|
||||
)
|
||||
return _response.data
|
||||
|
||||
async def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> BrowserProfile:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
BrowserProfile
|
||||
Successfully retrieved browser profile
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.get_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.get_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
async def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> None:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
None
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.delete_browser_profile(
|
||||
profile_id="bp_123456",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
|
||||
return _response.data
|
||||
|
||||
async def get_browser_sessions(
|
||||
self, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> typing.List[BrowserSessionResponse]:
|
||||
|
|
@ -3404,22 +3729,6 @@ class AsyncSkyvern:
|
|||
self._workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper)
|
||||
return self._workflows
|
||||
|
||||
@property
|
||||
def browser_profiles(self):
|
||||
if self._browser_profiles is None:
|
||||
from .browser_profiles.client import AsyncBrowserProfilesClient # noqa: E402
|
||||
|
||||
self._browser_profiles = AsyncBrowserProfilesClient(client_wrapper=self._client_wrapper)
|
||||
return self._browser_profiles
|
||||
|
||||
@property
|
||||
def prompts(self):
|
||||
if self._prompts is None:
|
||||
from .prompts.client import AsyncPromptsClient # noqa: E402
|
||||
|
||||
self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper)
|
||||
return self._prompts
|
||||
|
||||
@property
|
||||
def scripts(self):
|
||||
if self._scripts is None:
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|||
|
||||
def get_headers(self) -> typing.Dict[str, str]:
|
||||
headers: typing.Dict[str, str] = {
|
||||
"User-Agent": "skyvern/1.0.0",
|
||||
"User-Agent": "skyvern/1.0.2",
|
||||
"X-Fern-Language": "Python",
|
||||
"X-Fern-SDK-Name": "skyvern",
|
||||
"X-Fern-SDK-Version": "1.0.0",
|
||||
"X-Fern-SDK-Version": "1.0.2",
|
||||
**(self.get_custom_headers() or {}),
|
||||
}
|
||||
if self._api_key is not None:
|
||||
|
|
|
|||
|
|
@ -7,10 +7,6 @@ from typing import Any, Callable, ClassVar, Dict, List, Mapping, Optional, Set,
|
|||
|
||||
import pydantic
|
||||
|
||||
from .datetime_utils import serialize_datetime
|
||||
from .serialization import convert_and_respect_annotation_metadata
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
|
||||
|
||||
if IS_PYDANTIC_V2:
|
||||
|
|
@ -32,6 +28,9 @@ else:
|
|||
from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef]
|
||||
from pydantic.typing import is_union as is_union # type: ignore[no-redef]
|
||||
|
||||
from .datetime_utils import serialize_datetime
|
||||
from .serialization import convert_and_respect_annotation_metadata
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
T = TypeVar("T")
|
||||
Model = TypeVar("Model", bound=pydantic.BaseModel)
|
||||
|
|
@ -248,7 +247,7 @@ def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]:
|
|||
def _get_field_default(field: PydanticField) -> Any:
|
||||
try:
|
||||
value = field.get_default() # type: ignore[union-attr]
|
||||
except Exception:
|
||||
except:
|
||||
value = field.default
|
||||
if IS_PYDANTIC_V2:
|
||||
from pydantic_core import PydanticUndefined
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ def convert_and_respect_annotation_metadata(
|
|||
|
||||
if (
|
||||
typing_extensions.get_origin(clean_type) == typing.Dict
|
||||
or typing_extensions.get_origin(clean_type) is dict
|
||||
or typing_extensions.get_origin(clean_type) == dict
|
||||
or clean_type == typing.Dict
|
||||
) and isinstance(object_, typing.Dict):
|
||||
key_type = typing_extensions.get_args(clean_type)[0]
|
||||
|
|
@ -92,7 +92,7 @@ def convert_and_respect_annotation_metadata(
|
|||
if not isinstance(object_, str):
|
||||
if (
|
||||
typing_extensions.get_origin(clean_type) == typing.Set
|
||||
or typing_extensions.get_origin(clean_type) is set
|
||||
or typing_extensions.get_origin(clean_type) == set
|
||||
or clean_type == typing.Set
|
||||
) and isinstance(object_, typing.Set):
|
||||
inner_type = typing_extensions.get_args(clean_type)[0]
|
||||
|
|
@ -108,14 +108,14 @@ def convert_and_respect_annotation_metadata(
|
|||
elif (
|
||||
(
|
||||
typing_extensions.get_origin(clean_type) == typing.List
|
||||
or typing_extensions.get_origin(clean_type) is list
|
||||
or typing_extensions.get_origin(clean_type) == list
|
||||
or clean_type == typing.List
|
||||
)
|
||||
and isinstance(object_, typing.List)
|
||||
) or (
|
||||
(
|
||||
typing_extensions.get_origin(clean_type) == typing.Sequence
|
||||
or typing_extensions.get_origin(clean_type) is collections.abc.Sequence
|
||||
or typing_extensions.get_origin(clean_type) == collections.abc.Sequence
|
||||
or clean_type == typing.Sequence
|
||||
)
|
||||
and isinstance(object_, typing.Sequence)
|
||||
|
|
@ -131,7 +131,7 @@ def convert_and_respect_annotation_metadata(
|
|||
for item in object_
|
||||
]
|
||||
|
||||
if typing_extensions.get_origin(clean_type) is typing.Union:
|
||||
if typing_extensions.get_origin(clean_type) == typing.Union:
|
||||
# We should be able to ~relatively~ safely try to convert keys against all
|
||||
# member types in the union, the edge case here is if one member aliases a field
|
||||
# of the same name to a different name from another member
|
||||
|
|
|
|||
|
|
@ -7,11 +7,13 @@ from importlib import import_module
|
|||
|
||||
if typing.TYPE_CHECKING:
|
||||
from .bad_request_error import BadRequestError
|
||||
from .conflict_error import ConflictError
|
||||
from .forbidden_error import ForbiddenError
|
||||
from .not_found_error import NotFoundError
|
||||
from .unprocessable_entity_error import UnprocessableEntityError
|
||||
_dynamic_imports: typing.Dict[str, str] = {
|
||||
"BadRequestError": ".bad_request_error",
|
||||
"ConflictError": ".conflict_error",
|
||||
"ForbiddenError": ".forbidden_error",
|
||||
"NotFoundError": ".not_found_error",
|
||||
"UnprocessableEntityError": ".unprocessable_entity_error",
|
||||
|
|
@ -39,4 +41,4 @@ def __dir__():
|
|||
return sorted(lazy_attrs)
|
||||
|
||||
|
||||
__all__ = ["BadRequestError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"]
|
||||
__all__ = ["BadRequestError", "ConflictError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"]
|
||||
|
|
|
|||
10
skyvern/client/errors/conflict_error.py
Normal file
10
skyvern/client/errors/conflict_error.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
|
||||
from ..core.api_error import ApiError
|
||||
|
||||
|
||||
class ConflictError(ApiError):
|
||||
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
||||
super().__init__(status_code=409, headers=headers, body=body)
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
# isort: skip_file
|
||||
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
|
||||
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
||||
from ..core.request_options import RequestOptions
|
||||
from ..types.improve_prompt_response import ImprovePromptResponse
|
||||
from .raw_client import AsyncRawPromptsClient, RawPromptsClient
|
||||
|
||||
# this is used as the default value for optional parameters
|
||||
OMIT = typing.cast(typing.Any, ...)
|
||||
|
||||
|
||||
class PromptsClient:
|
||||
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
||||
self._raw_client = RawPromptsClient(client_wrapper=client_wrapper)
|
||||
|
||||
@property
|
||||
def with_raw_response(self) -> RawPromptsClient:
|
||||
"""
|
||||
Retrieves a raw implementation of this client that returns raw responses.
|
||||
|
||||
Returns
|
||||
-------
|
||||
RawPromptsClient
|
||||
"""
|
||||
return self._raw_client
|
||||
|
||||
def improve_prompt(
|
||||
self,
|
||||
*,
|
||||
use_case: str,
|
||||
prompt: str,
|
||||
context: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> ImprovePromptResponse:
|
||||
"""
|
||||
Improve a prompt based on a specific use-case
|
||||
|
||||
Parameters
|
||||
----------
|
||||
use_case : str
|
||||
The use-case for prompt improvement
|
||||
|
||||
prompt : str
|
||||
The original prompt to improve
|
||||
|
||||
context : typing.Optional[str]
|
||||
Additional context about the user's needs
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
ImprovePromptResponse
|
||||
Successful Response
|
||||
|
||||
Examples
|
||||
--------
|
||||
from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
client.prompts.improve_prompt(
|
||||
use_case="use-case",
|
||||
prompt="prompt",
|
||||
)
|
||||
"""
|
||||
_response = self._raw_client.improve_prompt(
|
||||
use_case=use_case, prompt=prompt, context=context, request_options=request_options
|
||||
)
|
||||
return _response.data
|
||||
|
||||
|
||||
class AsyncPromptsClient:
|
||||
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
||||
self._raw_client = AsyncRawPromptsClient(client_wrapper=client_wrapper)
|
||||
|
||||
@property
|
||||
def with_raw_response(self) -> AsyncRawPromptsClient:
|
||||
"""
|
||||
Retrieves a raw implementation of this client that returns raw responses.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncRawPromptsClient
|
||||
"""
|
||||
return self._raw_client
|
||||
|
||||
async def improve_prompt(
|
||||
self,
|
||||
*,
|
||||
use_case: str,
|
||||
prompt: str,
|
||||
context: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> ImprovePromptResponse:
|
||||
"""
|
||||
Improve a prompt based on a specific use-case
|
||||
|
||||
Parameters
|
||||
----------
|
||||
use_case : str
|
||||
The use-case for prompt improvement
|
||||
|
||||
prompt : str
|
||||
The original prompt to improve
|
||||
|
||||
context : typing.Optional[str]
|
||||
Additional context about the user's needs
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
ImprovePromptResponse
|
||||
Successful Response
|
||||
|
||||
Examples
|
||||
--------
|
||||
import asyncio
|
||||
|
||||
from skyvern import AsyncSkyvern
|
||||
|
||||
client = AsyncSkyvern(
|
||||
api_key="YOUR_API_KEY",
|
||||
)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
await client.prompts.improve_prompt(
|
||||
use_case="use-case",
|
||||
prompt="prompt",
|
||||
)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
"""
|
||||
_response = await self._raw_client.improve_prompt(
|
||||
use_case=use_case, prompt=prompt, context=context, request_options=request_options
|
||||
)
|
||||
return _response.data
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
from json.decoder import JSONDecodeError
|
||||
|
||||
from ..core.api_error import ApiError
|
||||
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
||||
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
||||
from ..core.pydantic_utilities import parse_obj_as
|
||||
from ..core.request_options import RequestOptions
|
||||
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
||||
from ..types.improve_prompt_response import ImprovePromptResponse
|
||||
|
||||
# this is used as the default value for optional parameters
|
||||
OMIT = typing.cast(typing.Any, ...)
|
||||
|
||||
|
||||
class RawPromptsClient:
|
||||
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
||||
self._client_wrapper = client_wrapper
|
||||
|
||||
def improve_prompt(
|
||||
self,
|
||||
*,
|
||||
use_case: str,
|
||||
prompt: str,
|
||||
context: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> HttpResponse[ImprovePromptResponse]:
|
||||
"""
|
||||
Improve a prompt based on a specific use-case
|
||||
|
||||
Parameters
|
||||
----------
|
||||
use_case : str
|
||||
The use-case for prompt improvement
|
||||
|
||||
prompt : str
|
||||
The original prompt to improve
|
||||
|
||||
context : typing.Optional[str]
|
||||
Additional context about the user's needs
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[ImprovePromptResponse]
|
||||
Successful Response
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
"v1/prompts/improve",
|
||||
method="POST",
|
||||
params={
|
||||
"use-case": use_case,
|
||||
},
|
||||
json={
|
||||
"context": context,
|
||||
"prompt": prompt,
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
ImprovePromptResponse,
|
||||
parse_obj_as(
|
||||
type_=ImprovePromptResponse, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
|
||||
class AsyncRawPromptsClient:
|
||||
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
||||
self._client_wrapper = client_wrapper
|
||||
|
||||
async def improve_prompt(
|
||||
self,
|
||||
*,
|
||||
use_case: str,
|
||||
prompt: str,
|
||||
context: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> AsyncHttpResponse[ImprovePromptResponse]:
|
||||
"""
|
||||
Improve a prompt based on a specific use-case
|
||||
|
||||
Parameters
|
||||
----------
|
||||
use_case : str
|
||||
The use-case for prompt improvement
|
||||
|
||||
prompt : str
|
||||
The original prompt to improve
|
||||
|
||||
context : typing.Optional[str]
|
||||
Additional context about the user's needs
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[ImprovePromptResponse]
|
||||
Successful Response
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
"v1/prompts/improve",
|
||||
method="POST",
|
||||
params={
|
||||
"use-case": use_case,
|
||||
},
|
||||
json={
|
||||
"context": context,
|
||||
"prompt": prompt,
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
ImprovePromptResponse,
|
||||
parse_obj_as(
|
||||
type_=ImprovePromptResponse, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
|
@ -12,11 +12,13 @@ from .core.pydantic_utilities import parse_obj_as
|
|||
from .core.request_options import RequestOptions
|
||||
from .core.serialization import convert_and_respect_annotation_metadata
|
||||
from .errors.bad_request_error import BadRequestError
|
||||
from .errors.conflict_error import ConflictError
|
||||
from .errors.forbidden_error import ForbiddenError
|
||||
from .errors.not_found_error import NotFoundError
|
||||
from .errors.unprocessable_entity_error import UnprocessableEntityError
|
||||
from .types.artifact import Artifact
|
||||
from .types.artifact_type import ArtifactType
|
||||
from .types.browser_profile import BrowserProfile
|
||||
from .types.browser_session_response import BrowserSessionResponse
|
||||
from .types.create_credential_request_credential import CreateCredentialRequestCredential
|
||||
from .types.create_script_response import CreateScriptResponse
|
||||
|
|
@ -31,10 +33,12 @@ from .types.script_file_create import ScriptFileCreate
|
|||
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
|
||||
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
|
||||
from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
|
||||
from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
|
||||
from .types.task_run_response import TaskRunResponse
|
||||
from .types.totp_code import TotpCode
|
||||
from .types.workflow import Workflow
|
||||
from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest
|
||||
from .types.workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
|
||||
from .types.workflow_run_response import WorkflowRunResponse
|
||||
from .types.workflow_run_timeline import WorkflowRunTimeline
|
||||
from .types.workflow_status import WorkflowStatus
|
||||
|
|
@ -55,7 +59,7 @@ class RawSkyvern:
|
|||
url: typing.Optional[str] = OMIT,
|
||||
engine: typing.Optional[RunEngine] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
|
||||
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
|
||||
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
||||
max_steps: typing.Optional[int] = OMIT,
|
||||
|
|
@ -93,7 +97,7 @@ class RawSkyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for the task
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -117,6 +121,7 @@ class RawSkyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
|
||||
|
||||
|
|
@ -181,7 +186,9 @@ class RawSkyvern:
|
|||
"url": url,
|
||||
"engine": engine,
|
||||
"title": title,
|
||||
"proxy_location": proxy_location,
|
||||
"proxy_location": convert_and_respect_annotation_metadata(
|
||||
object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write"
|
||||
),
|
||||
"data_extraction_schema": convert_and_respect_annotation_metadata(
|
||||
object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
|
||||
),
|
||||
|
|
@ -251,7 +258,7 @@ class RawSkyvern:
|
|||
user_agent: typing.Optional[str] = None,
|
||||
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
|
||||
webhook_url: typing.Optional[str] = OMIT,
|
||||
totp_url: typing.Optional[str] = OMIT,
|
||||
totp_identifier: typing.Optional[str] = OMIT,
|
||||
|
|
@ -284,7 +291,7 @@ class RawSkyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for this workflow run
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -308,6 +315,7 @@ class RawSkyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
webhook_url : typing.Optional[str]
|
||||
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
|
||||
|
|
@ -359,7 +367,9 @@ class RawSkyvern:
|
|||
"workflow_id": workflow_id,
|
||||
"parameters": parameters,
|
||||
"title": title,
|
||||
"proxy_location": proxy_location,
|
||||
"proxy_location": convert_and_respect_annotation_metadata(
|
||||
object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write"
|
||||
),
|
||||
"webhook_url": webhook_url,
|
||||
"totp_url": totp_url,
|
||||
"totp_identifier": totp_identifier,
|
||||
|
|
@ -1066,6 +1076,270 @@ class RawSkyvern:
|
|||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[typing.List[BrowserProfile]]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[typing.List[BrowserProfile]]
|
||||
Successfully retrieved browser profiles
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="GET",
|
||||
params={
|
||||
"include_deleted": include_deleted,
|
||||
},
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
typing.List[BrowserProfile],
|
||||
parse_obj_as(
|
||||
type_=typing.List[BrowserProfile], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> HttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Create a browser profile from a persistent browser session or workflow run.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[BrowserProfile]
|
||||
Successfully created browser profile
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="POST",
|
||||
json={
|
||||
"name": name,
|
||||
"description": description,
|
||||
"browser_session_id": browser_session_id,
|
||||
"workflow_run_id": workflow_run_id,
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 400:
|
||||
raise BadRequestError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 409:
|
||||
raise ConflictError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[BrowserProfile]
|
||||
Successfully retrieved browser profile
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="GET",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return HttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[None]:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[None]
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="DELETE",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
return HttpResponse(response=_response, data=None)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
def get_browser_sessions(
|
||||
self, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> HttpResponse[typing.List[BrowserSessionResponse]]:
|
||||
|
|
@ -2176,7 +2450,7 @@ class AsyncRawSkyvern:
|
|||
url: typing.Optional[str] = OMIT,
|
||||
engine: typing.Optional[RunEngine] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
|
||||
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
|
||||
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
||||
max_steps: typing.Optional[int] = OMIT,
|
||||
|
|
@ -2214,7 +2488,7 @@ class AsyncRawSkyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for the task
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -2238,6 +2512,7 @@ class AsyncRawSkyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
|
||||
|
||||
|
|
@ -2302,7 +2577,9 @@ class AsyncRawSkyvern:
|
|||
"url": url,
|
||||
"engine": engine,
|
||||
"title": title,
|
||||
"proxy_location": proxy_location,
|
||||
"proxy_location": convert_and_respect_annotation_metadata(
|
||||
object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write"
|
||||
),
|
||||
"data_extraction_schema": convert_and_respect_annotation_metadata(
|
||||
object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
|
||||
),
|
||||
|
|
@ -2372,7 +2649,7 @@ class AsyncRawSkyvern:
|
|||
user_agent: typing.Optional[str] = None,
|
||||
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
||||
title: typing.Optional[str] = OMIT,
|
||||
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
|
||||
webhook_url: typing.Optional[str] = OMIT,
|
||||
totp_url: typing.Optional[str] = OMIT,
|
||||
totp_identifier: typing.Optional[str] = OMIT,
|
||||
|
|
@ -2405,7 +2682,7 @@ class AsyncRawSkyvern:
|
|||
title : typing.Optional[str]
|
||||
The title for this workflow run
|
||||
|
||||
proxy_location : typing.Optional[ProxyLocation]
|
||||
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
|
||||
|
||||
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
|
||||
|
||||
|
|
@ -2429,6 +2706,7 @@ class AsyncRawSkyvern:
|
|||
- US-FL: Florida
|
||||
- US-WA: Washington
|
||||
- NONE: No proxy
|
||||
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
|
||||
|
||||
webhook_url : typing.Optional[str]
|
||||
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
|
||||
|
|
@ -2480,7 +2758,9 @@ class AsyncRawSkyvern:
|
|||
"workflow_id": workflow_id,
|
||||
"parameters": parameters,
|
||||
"title": title,
|
||||
"proxy_location": proxy_location,
|
||||
"proxy_location": convert_and_respect_annotation_metadata(
|
||||
object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write"
|
||||
),
|
||||
"webhook_url": webhook_url,
|
||||
"totp_url": totp_url,
|
||||
"totp_identifier": totp_identifier,
|
||||
|
|
@ -3187,6 +3467,270 @@ class AsyncRawSkyvern:
|
|||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def list_browser_profiles(
|
||||
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[typing.List[BrowserProfile]]:
|
||||
"""
|
||||
Get all browser profiles for the organization
|
||||
|
||||
Parameters
|
||||
----------
|
||||
include_deleted : typing.Optional[bool]
|
||||
Include deleted browser profiles
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[typing.List[BrowserProfile]]
|
||||
Successfully retrieved browser profiles
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="GET",
|
||||
params={
|
||||
"include_deleted": include_deleted,
|
||||
},
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
typing.List[BrowserProfile],
|
||||
parse_obj_as(
|
||||
type_=typing.List[BrowserProfile], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def create_browser_profile(
|
||||
self,
|
||||
*,
|
||||
name: str,
|
||||
description: typing.Optional[str] = OMIT,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> AsyncHttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Create a browser profile from a persistent browser session or workflow run.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
name : str
|
||||
Name for the browser profile
|
||||
|
||||
description : typing.Optional[str]
|
||||
Optional profile description
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
Persistent browser session to convert into a profile
|
||||
|
||||
workflow_run_id : typing.Optional[str]
|
||||
Workflow run whose persisted session should be captured
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[BrowserProfile]
|
||||
Successfully created browser profile
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
"v1/browser_profiles",
|
||||
method="POST",
|
||||
json={
|
||||
"name": name,
|
||||
"description": description,
|
||||
"browser_session_id": browser_session_id,
|
||||
"workflow_run_id": workflow_run_id,
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 400:
|
||||
raise BadRequestError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 409:
|
||||
raise ConflictError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def get_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[BrowserProfile]:
|
||||
"""
|
||||
Get a specific browser profile by ID
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[BrowserProfile]
|
||||
Successfully retrieved browser profile
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="GET",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
_data = typing.cast(
|
||||
BrowserProfile,
|
||||
parse_obj_as(
|
||||
type_=BrowserProfile, # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
)
|
||||
return AsyncHttpResponse(response=_response, data=_data)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def delete_browser_profile(
|
||||
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[None]:
|
||||
"""
|
||||
Delete a browser profile (soft delete)
|
||||
|
||||
Parameters
|
||||
----------
|
||||
profile_id : str
|
||||
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
Request-specific configuration.
|
||||
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[None]
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
|
||||
method="DELETE",
|
||||
request_options=request_options,
|
||||
)
|
||||
try:
|
||||
if 200 <= _response.status_code < 300:
|
||||
return AsyncHttpResponse(response=_response, data=None)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
_response_json = _response.json()
|
||||
except JSONDecodeError:
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
||||
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
||||
|
||||
async def get_browser_sessions(
|
||||
self, *, request_options: typing.Optional[RequestOptions] = None
|
||||
) -> AsyncHttpResponse[typing.List[BrowserSessionResponse]]:
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ if typing.TYPE_CHECKING:
|
|||
from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter
|
||||
from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml
|
||||
from .block_type import BlockType
|
||||
from .branch_condition import BranchCondition
|
||||
from .branch_criteria import BranchCriteria
|
||||
from .browser_profile import BrowserProfile
|
||||
from .browser_session_response import BrowserSessionResponse
|
||||
from .click_action import ClickAction
|
||||
|
|
@ -63,6 +65,7 @@ if typing.TYPE_CHECKING:
|
|||
CodeBlockParametersItem_Workflow,
|
||||
)
|
||||
from .code_block_yaml import CodeBlockYaml
|
||||
from .conditional_block import ConditionalBlock
|
||||
from .context_parameter import ContextParameter
|
||||
from .context_parameter_source import (
|
||||
ContextParameterSource,
|
||||
|
|
@ -143,6 +146,7 @@ if typing.TYPE_CHECKING:
|
|||
ForLoopBlockLoopBlocksItem,
|
||||
ForLoopBlockLoopBlocksItem_Action,
|
||||
ForLoopBlockLoopBlocksItem_Code,
|
||||
ForLoopBlockLoopBlocksItem_Conditional,
|
||||
ForLoopBlockLoopBlocksItem_DownloadToS3,
|
||||
ForLoopBlockLoopBlocksItem_Extraction,
|
||||
ForLoopBlockLoopBlocksItem_FileDownload,
|
||||
|
|
@ -202,6 +206,7 @@ if typing.TYPE_CHECKING:
|
|||
ForLoopBlockYamlLoopBlocksItem_Validation,
|
||||
ForLoopBlockYamlLoopBlocksItem_Wait,
|
||||
)
|
||||
from .geo_target import GeoTarget
|
||||
from .get_run_response import (
|
||||
GetRunResponse,
|
||||
GetRunResponse_AnthropicCua,
|
||||
|
|
@ -245,7 +250,6 @@ if typing.TYPE_CHECKING:
|
|||
HumanInteractionBlockParametersItem_Workflow,
|
||||
)
|
||||
from .human_interaction_block_yaml import HumanInteractionBlockYaml
|
||||
from .improve_prompt_response import ImprovePromptResponse
|
||||
from .input_or_select_context import InputOrSelectContext
|
||||
from .input_text_action import InputTextAction
|
||||
from .input_text_action_data import InputTextActionData
|
||||
|
|
@ -338,6 +342,7 @@ if typing.TYPE_CHECKING:
|
|||
from .task_block_yaml_data_schema import TaskBlockYamlDataSchema
|
||||
from .task_run_request import TaskRunRequest
|
||||
from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
|
||||
from .task_run_request_proxy_location import TaskRunRequestProxyLocation
|
||||
from .task_run_response import TaskRunResponse
|
||||
from .task_run_response_output import TaskRunResponseOutput
|
||||
from .task_v2block import TaskV2Block
|
||||
|
|
@ -422,11 +427,13 @@ if typing.TYPE_CHECKING:
|
|||
from .wait_block_yaml import WaitBlockYaml
|
||||
from .workflow import Workflow
|
||||
from .workflow_create_yaml_request import WorkflowCreateYamlRequest
|
||||
from .workflow_create_yaml_request_proxy_location import WorkflowCreateYamlRequestProxyLocation
|
||||
from .workflow_definition import WorkflowDefinition
|
||||
from .workflow_definition_blocks_item import (
|
||||
WorkflowDefinitionBlocksItem,
|
||||
WorkflowDefinitionBlocksItem_Action,
|
||||
WorkflowDefinitionBlocksItem_Code,
|
||||
WorkflowDefinitionBlocksItem_Conditional,
|
||||
WorkflowDefinitionBlocksItem_DownloadToS3,
|
||||
WorkflowDefinitionBlocksItem_Extraction,
|
||||
WorkflowDefinitionBlocksItem_FileDownload,
|
||||
|
|
@ -504,12 +511,14 @@ if typing.TYPE_CHECKING:
|
|||
from .workflow_parameter_type import WorkflowParameterType
|
||||
from .workflow_parameter_yaml import WorkflowParameterYaml
|
||||
from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue
|
||||
from .workflow_proxy_location import WorkflowProxyLocation
|
||||
from .workflow_request import WorkflowRequest
|
||||
from .workflow_run_block import WorkflowRunBlock
|
||||
from .workflow_run_block_data_schema import WorkflowRunBlockDataSchema
|
||||
from .workflow_run_block_navigation_payload import WorkflowRunBlockNavigationPayload
|
||||
from .workflow_run_block_output import WorkflowRunBlockOutput
|
||||
from .workflow_run_request import WorkflowRunRequest
|
||||
from .workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
|
||||
from .workflow_run_response import WorkflowRunResponse
|
||||
from .workflow_run_response_output import WorkflowRunResponseOutput
|
||||
from .workflow_run_timeline import WorkflowRunTimeline
|
||||
|
|
@ -550,6 +559,8 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"BitwardenSensitiveInformationParameter": ".bitwarden_sensitive_information_parameter",
|
||||
"BitwardenSensitiveInformationParameterYaml": ".bitwarden_sensitive_information_parameter_yaml",
|
||||
"BlockType": ".block_type",
|
||||
"BranchCondition": ".branch_condition",
|
||||
"BranchCriteria": ".branch_criteria",
|
||||
"BrowserProfile": ".browser_profile",
|
||||
"BrowserSessionResponse": ".browser_session_response",
|
||||
"ClickAction": ".click_action",
|
||||
|
|
@ -569,6 +580,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"CodeBlockParametersItem_Output": ".code_block_parameters_item",
|
||||
"CodeBlockParametersItem_Workflow": ".code_block_parameters_item",
|
||||
"CodeBlockYaml": ".code_block_yaml",
|
||||
"ConditionalBlock": ".conditional_block",
|
||||
"ContextParameter": ".context_parameter",
|
||||
"ContextParameterSource": ".context_parameter_source",
|
||||
"ContextParameterSource_AwsSecret": ".context_parameter_source",
|
||||
|
|
@ -642,6 +654,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"ForLoopBlockLoopBlocksItem": ".for_loop_block_loop_blocks_item",
|
||||
"ForLoopBlockLoopBlocksItem_Action": ".for_loop_block_loop_blocks_item",
|
||||
"ForLoopBlockLoopBlocksItem_Code": ".for_loop_block_loop_blocks_item",
|
||||
"ForLoopBlockLoopBlocksItem_Conditional": ".for_loop_block_loop_blocks_item",
|
||||
"ForLoopBlockLoopBlocksItem_DownloadToS3": ".for_loop_block_loop_blocks_item",
|
||||
"ForLoopBlockLoopBlocksItem_Extraction": ".for_loop_block_loop_blocks_item",
|
||||
"ForLoopBlockLoopBlocksItem_FileDownload": ".for_loop_block_loop_blocks_item",
|
||||
|
|
@ -696,6 +709,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"ForLoopBlockYamlLoopBlocksItem_UploadToS3": ".for_loop_block_yaml_loop_blocks_item",
|
||||
"ForLoopBlockYamlLoopBlocksItem_Validation": ".for_loop_block_yaml_loop_blocks_item",
|
||||
"ForLoopBlockYamlLoopBlocksItem_Wait": ".for_loop_block_yaml_loop_blocks_item",
|
||||
"GeoTarget": ".geo_target",
|
||||
"GetRunResponse": ".get_run_response",
|
||||
"GetRunResponse_AnthropicCua": ".get_run_response",
|
||||
"GetRunResponse_OpenaiCua": ".get_run_response",
|
||||
|
|
@ -733,7 +747,6 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"HumanInteractionBlockParametersItem_Output": ".human_interaction_block_parameters_item",
|
||||
"HumanInteractionBlockParametersItem_Workflow": ".human_interaction_block_parameters_item",
|
||||
"HumanInteractionBlockYaml": ".human_interaction_block_yaml",
|
||||
"ImprovePromptResponse": ".improve_prompt_response",
|
||||
"InputOrSelectContext": ".input_or_select_context",
|
||||
"InputTextAction": ".input_text_action",
|
||||
"InputTextActionData": ".input_text_action_data",
|
||||
|
|
@ -818,6 +831,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"TaskBlockYamlDataSchema": ".task_block_yaml_data_schema",
|
||||
"TaskRunRequest": ".task_run_request",
|
||||
"TaskRunRequestDataExtractionSchema": ".task_run_request_data_extraction_schema",
|
||||
"TaskRunRequestProxyLocation": ".task_run_request_proxy_location",
|
||||
"TaskRunResponse": ".task_run_response",
|
||||
"TaskRunResponseOutput": ".task_run_response_output",
|
||||
"TaskV2Block": ".task_v2block",
|
||||
|
|
@ -894,10 +908,12 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"WaitBlockYaml": ".wait_block_yaml",
|
||||
"Workflow": ".workflow",
|
||||
"WorkflowCreateYamlRequest": ".workflow_create_yaml_request",
|
||||
"WorkflowCreateYamlRequestProxyLocation": ".workflow_create_yaml_request_proxy_location",
|
||||
"WorkflowDefinition": ".workflow_definition",
|
||||
"WorkflowDefinitionBlocksItem": ".workflow_definition_blocks_item",
|
||||
"WorkflowDefinitionBlocksItem_Action": ".workflow_definition_blocks_item",
|
||||
"WorkflowDefinitionBlocksItem_Code": ".workflow_definition_blocks_item",
|
||||
"WorkflowDefinitionBlocksItem_Conditional": ".workflow_definition_blocks_item",
|
||||
"WorkflowDefinitionBlocksItem_DownloadToS3": ".workflow_definition_blocks_item",
|
||||
"WorkflowDefinitionBlocksItem_Extraction": ".workflow_definition_blocks_item",
|
||||
"WorkflowDefinitionBlocksItem_FileDownload": ".workflow_definition_blocks_item",
|
||||
|
|
@ -968,12 +984,14 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|||
"WorkflowParameterType": ".workflow_parameter_type",
|
||||
"WorkflowParameterYaml": ".workflow_parameter_yaml",
|
||||
"WorkflowParameterYamlDefaultValue": ".workflow_parameter_yaml_default_value",
|
||||
"WorkflowProxyLocation": ".workflow_proxy_location",
|
||||
"WorkflowRequest": ".workflow_request",
|
||||
"WorkflowRunBlock": ".workflow_run_block",
|
||||
"WorkflowRunBlockDataSchema": ".workflow_run_block_data_schema",
|
||||
"WorkflowRunBlockNavigationPayload": ".workflow_run_block_navigation_payload",
|
||||
"WorkflowRunBlockOutput": ".workflow_run_block_output",
|
||||
"WorkflowRunRequest": ".workflow_run_request",
|
||||
"WorkflowRunRequestProxyLocation": ".workflow_run_request_proxy_location",
|
||||
"WorkflowRunResponse": ".workflow_run_response",
|
||||
"WorkflowRunResponseOutput": ".workflow_run_response_output",
|
||||
"WorkflowRunTimeline": ".workflow_run_timeline",
|
||||
|
|
@ -1038,6 +1056,8 @@ __all__ = [
|
|||
"BitwardenSensitiveInformationParameter",
|
||||
"BitwardenSensitiveInformationParameterYaml",
|
||||
"BlockType",
|
||||
"BranchCondition",
|
||||
"BranchCriteria",
|
||||
"BrowserProfile",
|
||||
"BrowserSessionResponse",
|
||||
"ClickAction",
|
||||
|
|
@ -1057,6 +1077,7 @@ __all__ = [
|
|||
"CodeBlockParametersItem_Output",
|
||||
"CodeBlockParametersItem_Workflow",
|
||||
"CodeBlockYaml",
|
||||
"ConditionalBlock",
|
||||
"ContextParameter",
|
||||
"ContextParameterSource",
|
||||
"ContextParameterSource_AwsSecret",
|
||||
|
|
@ -1130,6 +1151,7 @@ __all__ = [
|
|||
"ForLoopBlockLoopBlocksItem",
|
||||
"ForLoopBlockLoopBlocksItem_Action",
|
||||
"ForLoopBlockLoopBlocksItem_Code",
|
||||
"ForLoopBlockLoopBlocksItem_Conditional",
|
||||
"ForLoopBlockLoopBlocksItem_DownloadToS3",
|
||||
"ForLoopBlockLoopBlocksItem_Extraction",
|
||||
"ForLoopBlockLoopBlocksItem_FileDownload",
|
||||
|
|
@ -1184,6 +1206,7 @@ __all__ = [
|
|||
"ForLoopBlockYamlLoopBlocksItem_UploadToS3",
|
||||
"ForLoopBlockYamlLoopBlocksItem_Validation",
|
||||
"ForLoopBlockYamlLoopBlocksItem_Wait",
|
||||
"GeoTarget",
|
||||
"GetRunResponse",
|
||||
"GetRunResponse_AnthropicCua",
|
||||
"GetRunResponse_OpenaiCua",
|
||||
|
|
@ -1221,7 +1244,6 @@ __all__ = [
|
|||
"HumanInteractionBlockParametersItem_Output",
|
||||
"HumanInteractionBlockParametersItem_Workflow",
|
||||
"HumanInteractionBlockYaml",
|
||||
"ImprovePromptResponse",
|
||||
"InputOrSelectContext",
|
||||
"InputTextAction",
|
||||
"InputTextActionData",
|
||||
|
|
@ -1306,6 +1328,7 @@ __all__ = [
|
|||
"TaskBlockYamlDataSchema",
|
||||
"TaskRunRequest",
|
||||
"TaskRunRequestDataExtractionSchema",
|
||||
"TaskRunRequestProxyLocation",
|
||||
"TaskRunResponse",
|
||||
"TaskRunResponseOutput",
|
||||
"TaskV2Block",
|
||||
|
|
@ -1382,10 +1405,12 @@ __all__ = [
|
|||
"WaitBlockYaml",
|
||||
"Workflow",
|
||||
"WorkflowCreateYamlRequest",
|
||||
"WorkflowCreateYamlRequestProxyLocation",
|
||||
"WorkflowDefinition",
|
||||
"WorkflowDefinitionBlocksItem",
|
||||
"WorkflowDefinitionBlocksItem_Action",
|
||||
"WorkflowDefinitionBlocksItem_Code",
|
||||
"WorkflowDefinitionBlocksItem_Conditional",
|
||||
"WorkflowDefinitionBlocksItem_DownloadToS3",
|
||||
"WorkflowDefinitionBlocksItem_Extraction",
|
||||
"WorkflowDefinitionBlocksItem_FileDownload",
|
||||
|
|
@ -1456,12 +1481,14 @@ __all__ = [
|
|||
"WorkflowParameterType",
|
||||
"WorkflowParameterYaml",
|
||||
"WorkflowParameterYamlDefaultValue",
|
||||
"WorkflowProxyLocation",
|
||||
"WorkflowRequest",
|
||||
"WorkflowRunBlock",
|
||||
"WorkflowRunBlockDataSchema",
|
||||
"WorkflowRunBlockNavigationPayload",
|
||||
"WorkflowRunBlockOutput",
|
||||
"WorkflowRunRequest",
|
||||
"WorkflowRunRequestProxyLocation",
|
||||
"WorkflowRunResponse",
|
||||
"WorkflowRunResponseOutput",
|
||||
"WorkflowRunTimeline",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,16 @@ from .run_engine import RunEngine
|
|||
|
||||
|
||||
class ActionBlock(UniversalBaseModel):
|
||||
label: str
|
||||
label: str = pydantic.Field()
|
||||
"""
|
||||
Author-facing identifier for a block; unique within a workflow.
|
||||
"""
|
||||
|
||||
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
|
||||
"""
|
||||
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
|
||||
"""
|
||||
|
||||
output_parameter: OutputParameter
|
||||
continue_on_failure: typing.Optional[bool] = None
|
||||
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
||||
|
|
@ -35,7 +44,6 @@ class ActionBlock(UniversalBaseModel):
|
|||
download_suffix: typing.Optional[str] = None
|
||||
totp_verification_url: typing.Optional[str] = None
|
||||
totp_identifier: typing.Optional[str] = None
|
||||
cache_actions: typing.Optional[bool] = None
|
||||
complete_verification: typing.Optional[bool] = None
|
||||
include_action_history_in_verification: typing.Optional[bool] = None
|
||||
download_timeout: typing.Optional[float] = None
|
||||
|
|
|
|||
|
|
@ -8,7 +8,16 @@ from .run_engine import RunEngine
|
|||
|
||||
|
||||
class ActionBlockYaml(UniversalBaseModel):
|
||||
label: str
|
||||
label: str = pydantic.Field()
|
||||
"""
|
||||
Author-facing identifier; must be unique per workflow.
|
||||
"""
|
||||
|
||||
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
|
||||
"""
|
||||
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
|
||||
"""
|
||||
|
||||
continue_on_failure: typing.Optional[bool] = None
|
||||
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
||||
url: typing.Optional[str] = None
|
||||
|
|
@ -22,7 +31,6 @@ class ActionBlockYaml(UniversalBaseModel):
|
|||
download_suffix: typing.Optional[str] = None
|
||||
totp_verification_url: typing.Optional[str] = None
|
||||
totp_identifier: typing.Optional[str] = None
|
||||
cache_actions: typing.Optional[bool] = None
|
||||
disable_cache: typing.Optional[bool] = None
|
||||
|
||||
if IS_PYDANTIC_V2:
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ BlockType = typing.Union[
|
|||
"task",
|
||||
"task_v2",
|
||||
"for_loop",
|
||||
"conditional",
|
||||
"code",
|
||||
"text_prompt",
|
||||
"download_to_s3",
|
||||
|
|
|
|||
27
skyvern/client/types/branch_condition.py
Normal file
27
skyvern/client/types/branch_condition.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
|
||||
import pydantic
|
||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
||||
from .branch_criteria import BranchCriteria
|
||||
|
||||
|
||||
class BranchCondition(UniversalBaseModel):
|
||||
"""
|
||||
Represents a single conditional branch edge within a ConditionalBlock.
|
||||
"""
|
||||
|
||||
criteria: typing.Optional[BranchCriteria] = None
|
||||
next_block_label: typing.Optional[str] = None
|
||||
description: typing.Optional[str] = None
|
||||
is_default: typing.Optional[bool] = None
|
||||
|
||||
if IS_PYDANTIC_V2:
|
||||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
||||
else:
|
||||
|
||||
class Config:
|
||||
frozen = True
|
||||
smart_union = True
|
||||
extra = pydantic.Extra.allow
|
||||
|
|
@ -6,21 +6,14 @@ import pydantic
|
|||
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
||||
|
||||
|
||||
class ImprovePromptResponse(UniversalBaseModel):
|
||||
error: typing.Optional[str] = pydantic.Field(default=None)
|
||||
class BranchCriteria(UniversalBaseModel):
|
||||
"""
|
||||
Error message if prompt improvement failed
|
||||
Abstract interface describing how a branch condition should be evaluated.
|
||||
"""
|
||||
|
||||
improved: str = pydantic.Field()
|
||||
"""
|
||||
The improved version of the prompt
|
||||
"""
|
||||
|
||||
original: str = pydantic.Field()
|
||||
"""
|
||||
The original prompt provided for improvement
|
||||
"""
|
||||
criteria_type: str
|
||||
expression: str
|
||||
description: typing.Optional[str] = None
|
||||
|
||||
if IS_PYDANTIC_V2:
|
||||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue