update login interface to support wait_for_completion (#3018)
This commit is contained in:
@@ -1736,26 +1736,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"oneOf": [
|
"$ref": "#/components/schemas/LoginRequest"
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/SkyvernLoginRequest"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/BitwardenLoginRequest"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/OnePasswordLoginRequest"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"discriminator": {
|
|
||||||
"propertyName": "credential_type",
|
|
||||||
"mapping": {
|
|
||||||
"skyvern": "#/components/schemas/SkyvernLoginRequest",
|
|
||||||
"bitwarden": "#/components/schemas/BitwardenLoginRequest",
|
|
||||||
"1password": "#/components/schemas/OnePasswordLoginRequest"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"title": "Login Request"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1788,15 +1769,15 @@
|
|||||||
"code-samples": [
|
"code-samples": [
|
||||||
{
|
{
|
||||||
"sdk": "python",
|
"sdk": "python",
|
||||||
"code": "# Login with password saved in Skyvern\nfrom skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"YOUR_API_KEY\")\nawait skyvern.login(credential_id=\"cred_123\")\n"
|
"code": "# Login with password saved in Skyvern\nfrom skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"YOUR_API_KEY\")\nawait skyvern.login(\n url=\"https://example.com\",\n credential_type=\"skyvern\",\n credential_id=\"cred_123\"),\n)\n"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sdk": "python",
|
"sdk": "python",
|
||||||
"code": "# Login with password saved in Bitwarden\nfrom skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"YOUR_API_KEY\")\n# Login with a Bitwarden collection and website url filter\nawait skyvern.login(bitwarden_collection_id=\"BITWARDEN COLLECTION ID\", url_filter=\"https://example.com\")\n\n# Login with a Bitwarden item\nawait skyvern.login(bitwarden_item_id=\"BITWARDEN ITEM ID\")\n"
|
"code": "# Login with password saved in Bitwarden\nfrom skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"YOUR_API_KEY\")\n# Login with a Bitwarden collection and website url filter\nawait skyvern.login(\n url=\"https://example.com\",\n credential_type=\"bitwarden\",\n bitwarden_collection_id=\"BITWARDEN COLLECTION ID\",\n)\n\n# Login with a Bitwarden item\nawait skyvern.login(\n url=\"https://example.com\",\n credential_type=\"bitwarden\",\n bitwarden_item_id=\"BITWARDEN ITEM ID\",\n)\n"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"sdk": "python",
|
"sdk": "python",
|
||||||
"code": "# Login with password saved in 1Password\nfrom skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"YOUR_API_KEY\")\nawait skyvern.login(onepassword_vault_id=\"ONEPASSWORD VAULT ID\", onepassword_item_id=\"ONEPASSWORD ITEM ID\")\n"
|
"code": "# Login with password saved in 1Password\nfrom skyvern import Skyvern\n\nskyvern = Skyvern(api_key=\"YOUR_API_KEY\")\nawait skyvern.login(\n url=\"https://example.com\",\n credential_type=\"onepassword\",\n onepassword_vault_id=\"1PASSWORD VAULT ID\",\n onepassword_item_id=\"1PASSWORD ITEM ID\",\n)\n"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -2814,153 +2795,6 @@
|
|||||||
],
|
],
|
||||||
"title": "BitwardenLoginCredentialParameterYAML"
|
"title": "BitwardenLoginCredentialParameterYAML"
|
||||||
},
|
},
|
||||||
"BitwardenLoginRequest": {
|
|
||||||
"properties": {
|
|
||||||
"url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Url",
|
|
||||||
"description": "Website url"
|
|
||||||
},
|
|
||||||
"prompt": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Prompt",
|
|
||||||
"description": "Login instructions. Skyvern has default prompt/instruction for login if this field is not provided."
|
|
||||||
},
|
|
||||||
"webhook_url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Webhook Url",
|
|
||||||
"description": "Webhook URL to send login status updates"
|
|
||||||
},
|
|
||||||
"proxy_location": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ProxyLocation"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Proxy location to use"
|
|
||||||
},
|
|
||||||
"totp_identifier": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Totp Identifier",
|
|
||||||
"description": "Identifier for TOTP (Time-based One-Time Password) if required"
|
|
||||||
},
|
|
||||||
"totp_url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Totp Url",
|
|
||||||
"description": "TOTP URL to fetch one-time passwords"
|
|
||||||
},
|
|
||||||
"browser_session_id": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Browser Session Id",
|
|
||||||
"description": "ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`"
|
|
||||||
},
|
|
||||||
"extra_http_headers": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Extra Http Headers",
|
|
||||||
"description": "Additional HTTP headers to include in requests"
|
|
||||||
},
|
|
||||||
"max_screenshot_scrolling_times": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Max Screenshot Scrolling Times",
|
|
||||||
"description": "Maximum number of times to scroll for screenshots"
|
|
||||||
},
|
|
||||||
"credential_type": {
|
|
||||||
"type": "string",
|
|
||||||
"const": "bitwarden",
|
|
||||||
"title": "Credential Type",
|
|
||||||
"default": "bitwarden"
|
|
||||||
},
|
|
||||||
"bitwarden_collection_id": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Bitwarden Collection Id",
|
|
||||||
"description": "Bitwarden collection ID"
|
|
||||||
},
|
|
||||||
"bitwarden_item_id": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Bitwarden Item Id",
|
|
||||||
"description": "Bitwarden item ID"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "object",
|
|
||||||
"title": "BitwardenLoginRequest",
|
|
||||||
"description": "Login with password saved in Bitwarden"
|
|
||||||
},
|
|
||||||
"BitwardenSensitiveInformationParameter": {
|
"BitwardenSensitiveInformationParameter": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"parameter_type": {
|
"parameter_type": {
|
||||||
@@ -3584,7 +3418,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"credential_type": {
|
"credential_type": {
|
||||||
"$ref": "#/components/schemas/CredentialType",
|
"$ref": "#/components/schemas/skyvern__forge__sdk__schemas__credentials__CredentialType",
|
||||||
"description": "Type of credential to create"
|
"description": "Type of credential to create"
|
||||||
},
|
},
|
||||||
"credential": {
|
"credential": {
|
||||||
@@ -3742,7 +3576,7 @@
|
|||||||
"description": "The credential data"
|
"description": "The credential data"
|
||||||
},
|
},
|
||||||
"credential_type": {
|
"credential_type": {
|
||||||
"$ref": "#/components/schemas/CredentialType",
|
"$ref": "#/components/schemas/CredentialType-Output",
|
||||||
"description": "Type of the credential"
|
"description": "Type of the credential"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
@@ -3764,7 +3598,7 @@
|
|||||||
"title": "CredentialResponse",
|
"title": "CredentialResponse",
|
||||||
"description": "Response model for credential operations."
|
"description": "Response model for credential operations."
|
||||||
},
|
},
|
||||||
"CredentialType": {
|
"CredentialType-Output": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"password",
|
"password",
|
||||||
@@ -6021,6 +5855,195 @@
|
|||||||
],
|
],
|
||||||
"title": "LoginBlockYAML"
|
"title": "LoginBlockYAML"
|
||||||
},
|
},
|
||||||
|
"LoginRequest": {
|
||||||
|
"properties": {
|
||||||
|
"credential_type": {
|
||||||
|
"$ref": "#/components/schemas/skyvern__schemas__run_blocks__CredentialType",
|
||||||
|
"description": "Where to get the credential from"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Url",
|
||||||
|
"description": "Website url"
|
||||||
|
},
|
||||||
|
"prompt": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Prompt",
|
||||||
|
"description": "Login instructions. Skyvern has default prompt/instruction for login if this field is not provided."
|
||||||
|
},
|
||||||
|
"webhook_url": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Webhook Url",
|
||||||
|
"description": "Webhook URL to send login status updates"
|
||||||
|
},
|
||||||
|
"proxy_location": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/ProxyLocation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Proxy location to use"
|
||||||
|
},
|
||||||
|
"totp_identifier": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Totp Identifier",
|
||||||
|
"description": "Identifier for TOTP (Time-based One-Time Password) if required"
|
||||||
|
},
|
||||||
|
"totp_url": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Totp Url",
|
||||||
|
"description": "TOTP URL to fetch one-time passwords"
|
||||||
|
},
|
||||||
|
"browser_session_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Browser Session Id",
|
||||||
|
"description": "ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`",
|
||||||
|
"examples": [
|
||||||
|
"pbs_123456"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extra_http_headers": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Extra Http Headers",
|
||||||
|
"description": "Additional HTTP headers to include in requests"
|
||||||
|
},
|
||||||
|
"max_screenshot_scrolling_times": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Max Screenshot Scrolling Times",
|
||||||
|
"description": "Maximum number of times to scroll for screenshots"
|
||||||
|
},
|
||||||
|
"credential_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Credential Id",
|
||||||
|
"description": "ID of the Skyvern credential to use for login.",
|
||||||
|
"examples": [
|
||||||
|
"cred_123"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"bitwarden_collection_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Bitwarden Collection Id",
|
||||||
|
"description": "Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items`"
|
||||||
|
},
|
||||||
|
"bitwarden_item_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Bitwarden Item Id",
|
||||||
|
"description": "Bitwarden item ID"
|
||||||
|
},
|
||||||
|
"onepassword_vault_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Onepassword Vault Id",
|
||||||
|
"description": "1Password vault ID"
|
||||||
|
},
|
||||||
|
"onepassword_item_id": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Onepassword Item Id",
|
||||||
|
"description": "1Password item ID"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"credential_type"
|
||||||
|
],
|
||||||
|
"title": "LoginRequest"
|
||||||
|
},
|
||||||
"NavigationBlock": {
|
"NavigationBlock": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"label": {
|
"label": {
|
||||||
@@ -6685,143 +6708,6 @@
|
|||||||
],
|
],
|
||||||
"title": "OnePasswordCredentialParameterYAML"
|
"title": "OnePasswordCredentialParameterYAML"
|
||||||
},
|
},
|
||||||
"OnePasswordLoginRequest": {
|
|
||||||
"properties": {
|
|
||||||
"url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Url",
|
|
||||||
"description": "Website url"
|
|
||||||
},
|
|
||||||
"prompt": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Prompt",
|
|
||||||
"description": "Login instructions. Skyvern has default prompt/instruction for login if this field is not provided."
|
|
||||||
},
|
|
||||||
"webhook_url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Webhook Url",
|
|
||||||
"description": "Webhook URL to send login status updates"
|
|
||||||
},
|
|
||||||
"proxy_location": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ProxyLocation"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Proxy location to use"
|
|
||||||
},
|
|
||||||
"totp_identifier": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Totp Identifier",
|
|
||||||
"description": "Identifier for TOTP (Time-based One-Time Password) if required"
|
|
||||||
},
|
|
||||||
"totp_url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Totp Url",
|
|
||||||
"description": "TOTP URL to fetch one-time passwords"
|
|
||||||
},
|
|
||||||
"browser_session_id": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Browser Session Id",
|
|
||||||
"description": "ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`"
|
|
||||||
},
|
|
||||||
"extra_http_headers": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Extra Http Headers",
|
|
||||||
"description": "Additional HTTP headers to include in requests"
|
|
||||||
},
|
|
||||||
"max_screenshot_scrolling_times": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Max Screenshot Scrolling Times",
|
|
||||||
"description": "Maximum number of times to scroll for screenshots"
|
|
||||||
},
|
|
||||||
"credential_type": {
|
|
||||||
"type": "string",
|
|
||||||
"const": "1password",
|
|
||||||
"title": "Credential Type",
|
|
||||||
"default": "1password"
|
|
||||||
},
|
|
||||||
"onepassword_vault_id": {
|
|
||||||
"type": "string",
|
|
||||||
"title": "Onepassword Vault Id",
|
|
||||||
"description": "1Password vault ID."
|
|
||||||
},
|
|
||||||
"onepassword_item_id": {
|
|
||||||
"type": "string",
|
|
||||||
"title": "Onepassword Item Id",
|
|
||||||
"description": "1Password item ID."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"onepassword_vault_id",
|
|
||||||
"onepassword_item_id"
|
|
||||||
],
|
|
||||||
"title": "OnePasswordLoginRequest",
|
|
||||||
"description": "Login with password saved in 1Password"
|
|
||||||
},
|
|
||||||
"OutputParameter": {
|
"OutputParameter": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"parameter_type": {
|
"parameter_type": {
|
||||||
@@ -7274,137 +7160,6 @@
|
|||||||
],
|
],
|
||||||
"title": "SendEmailBlockYAML"
|
"title": "SendEmailBlockYAML"
|
||||||
},
|
},
|
||||||
"SkyvernLoginRequest": {
|
|
||||||
"properties": {
|
|
||||||
"url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Url",
|
|
||||||
"description": "Website url"
|
|
||||||
},
|
|
||||||
"prompt": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Prompt",
|
|
||||||
"description": "Login instructions. Skyvern has default prompt/instruction for login if this field is not provided."
|
|
||||||
},
|
|
||||||
"webhook_url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Webhook Url",
|
|
||||||
"description": "Webhook URL to send login status updates"
|
|
||||||
},
|
|
||||||
"proxy_location": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ProxyLocation"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Proxy location to use"
|
|
||||||
},
|
|
||||||
"totp_identifier": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Totp Identifier",
|
|
||||||
"description": "Identifier for TOTP (Time-based One-Time Password) if required"
|
|
||||||
},
|
|
||||||
"totp_url": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Totp Url",
|
|
||||||
"description": "TOTP URL to fetch one-time passwords"
|
|
||||||
},
|
|
||||||
"browser_session_id": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Browser Session Id",
|
|
||||||
"description": "ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`"
|
|
||||||
},
|
|
||||||
"extra_http_headers": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Extra Http Headers",
|
|
||||||
"description": "Additional HTTP headers to include in requests"
|
|
||||||
},
|
|
||||||
"max_screenshot_scrolling_times": {
|
|
||||||
"anyOf": [
|
|
||||||
{
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "null"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Max Screenshot Scrolling Times",
|
|
||||||
"description": "Maximum number of times to scroll for screenshots"
|
|
||||||
},
|
|
||||||
"credential_type": {
|
|
||||||
"type": "string",
|
|
||||||
"const": "skyvern",
|
|
||||||
"title": "Credential Type",
|
|
||||||
"default": "skyvern"
|
|
||||||
},
|
|
||||||
"credential_id": {
|
|
||||||
"type": "string",
|
|
||||||
"title": "Credential Id",
|
|
||||||
"description": "ID of the Skyvern credential to use for login."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"credential_id"
|
|
||||||
],
|
|
||||||
"title": "SkyvernLoginRequest",
|
|
||||||
"description": "Login with password saved in Skyvern"
|
|
||||||
},
|
|
||||||
"TOTPCode": {
|
"TOTPCode": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"totp_identifier": {
|
"totp_identifier": {
|
||||||
@@ -11052,6 +10807,24 @@
|
|||||||
"auto_generated"
|
"auto_generated"
|
||||||
],
|
],
|
||||||
"title": "WorkflowStatus"
|
"title": "WorkflowStatus"
|
||||||
|
},
|
||||||
|
"skyvern__forge__sdk__schemas__credentials__CredentialType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"password",
|
||||||
|
"credit_card"
|
||||||
|
],
|
||||||
|
"title": "CredentialType",
|
||||||
|
"description": "Type of credential stored in the system."
|
||||||
|
},
|
||||||
|
"skyvern__schemas__run_blocks__CredentialType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"skyvern",
|
||||||
|
"bitwarden",
|
||||||
|
"1password"
|
||||||
|
],
|
||||||
|
"title": "CredentialType"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ from .types import (
|
|||||||
BitwardenCreditCardDataParameterYaml,
|
BitwardenCreditCardDataParameterYaml,
|
||||||
BitwardenLoginCredentialParameter,
|
BitwardenLoginCredentialParameter,
|
||||||
BitwardenLoginCredentialParameterYaml,
|
BitwardenLoginCredentialParameterYaml,
|
||||||
BitwardenLoginRequest,
|
|
||||||
BitwardenSensitiveInformationParameter,
|
BitwardenSensitiveInformationParameter,
|
||||||
BitwardenSensitiveInformationParameterYaml,
|
BitwardenSensitiveInformationParameterYaml,
|
||||||
BrowserSessionResponse,
|
BrowserSessionResponse,
|
||||||
@@ -56,7 +55,7 @@ from .types import (
|
|||||||
CredentialParameterYaml,
|
CredentialParameterYaml,
|
||||||
CredentialResponse,
|
CredentialResponse,
|
||||||
CredentialResponseCredential,
|
CredentialResponseCredential,
|
||||||
CredentialType,
|
CredentialTypeOutput,
|
||||||
CreditCardCredentialResponse,
|
CreditCardCredentialResponse,
|
||||||
DownloadToS3Block,
|
DownloadToS3Block,
|
||||||
DownloadToS3BlockYaml,
|
DownloadToS3BlockYaml,
|
||||||
@@ -181,10 +180,6 @@ from .types import (
|
|||||||
LoginBlockParametersItem_Output,
|
LoginBlockParametersItem_Output,
|
||||||
LoginBlockParametersItem_Workflow,
|
LoginBlockParametersItem_Workflow,
|
||||||
LoginBlockYaml,
|
LoginBlockYaml,
|
||||||
LoginRequestBody,
|
|
||||||
LoginRequestBody_1Password,
|
|
||||||
LoginRequestBody_Bitwarden,
|
|
||||||
LoginRequestBody_Skyvern,
|
|
||||||
NavigationBlock,
|
NavigationBlock,
|
||||||
NavigationBlockDataSchema,
|
NavigationBlockDataSchema,
|
||||||
NavigationBlockParametersItem,
|
NavigationBlockParametersItem,
|
||||||
@@ -202,7 +197,6 @@ from .types import (
|
|||||||
NonEmptyPasswordCredential,
|
NonEmptyPasswordCredential,
|
||||||
OnePasswordCredentialParameter,
|
OnePasswordCredentialParameter,
|
||||||
OnePasswordCredentialParameterYaml,
|
OnePasswordCredentialParameterYaml,
|
||||||
OnePasswordLoginRequest,
|
|
||||||
OutputParameter,
|
OutputParameter,
|
||||||
OutputParameterYaml,
|
OutputParameterYaml,
|
||||||
PasswordCredentialResponse,
|
PasswordCredentialResponse,
|
||||||
@@ -213,7 +207,8 @@ from .types import (
|
|||||||
RunStatus,
|
RunStatus,
|
||||||
SendEmailBlock,
|
SendEmailBlock,
|
||||||
SendEmailBlockYaml,
|
SendEmailBlockYaml,
|
||||||
SkyvernLoginRequest,
|
SkyvernForgeSdkSchemasCredentialsCredentialType,
|
||||||
|
SkyvernSchemasRunBlocksCredentialType,
|
||||||
TaskBlock,
|
TaskBlock,
|
||||||
TaskBlockDataSchema,
|
TaskBlockDataSchema,
|
||||||
TaskBlockParametersItem,
|
TaskBlockParametersItem,
|
||||||
@@ -395,7 +390,6 @@ __all__ = [
|
|||||||
"BitwardenCreditCardDataParameterYaml",
|
"BitwardenCreditCardDataParameterYaml",
|
||||||
"BitwardenLoginCredentialParameter",
|
"BitwardenLoginCredentialParameter",
|
||||||
"BitwardenLoginCredentialParameterYaml",
|
"BitwardenLoginCredentialParameterYaml",
|
||||||
"BitwardenLoginRequest",
|
|
||||||
"BitwardenSensitiveInformationParameter",
|
"BitwardenSensitiveInformationParameter",
|
||||||
"BitwardenSensitiveInformationParameterYaml",
|
"BitwardenSensitiveInformationParameterYaml",
|
||||||
"BrowserSessionResponse",
|
"BrowserSessionResponse",
|
||||||
@@ -429,7 +423,7 @@ __all__ = [
|
|||||||
"CredentialParameterYaml",
|
"CredentialParameterYaml",
|
||||||
"CredentialResponse",
|
"CredentialResponse",
|
||||||
"CredentialResponseCredential",
|
"CredentialResponseCredential",
|
||||||
"CredentialType",
|
"CredentialTypeOutput",
|
||||||
"CreditCardCredentialResponse",
|
"CreditCardCredentialResponse",
|
||||||
"DownloadToS3Block",
|
"DownloadToS3Block",
|
||||||
"DownloadToS3BlockYaml",
|
"DownloadToS3BlockYaml",
|
||||||
@@ -555,10 +549,6 @@ __all__ = [
|
|||||||
"LoginBlockParametersItem_Output",
|
"LoginBlockParametersItem_Output",
|
||||||
"LoginBlockParametersItem_Workflow",
|
"LoginBlockParametersItem_Workflow",
|
||||||
"LoginBlockYaml",
|
"LoginBlockYaml",
|
||||||
"LoginRequestBody",
|
|
||||||
"LoginRequestBody_1Password",
|
|
||||||
"LoginRequestBody_Bitwarden",
|
|
||||||
"LoginRequestBody_Skyvern",
|
|
||||||
"NavigationBlock",
|
"NavigationBlock",
|
||||||
"NavigationBlockDataSchema",
|
"NavigationBlockDataSchema",
|
||||||
"NavigationBlockParametersItem",
|
"NavigationBlockParametersItem",
|
||||||
@@ -577,7 +567,6 @@ __all__ = [
|
|||||||
"NotFoundError",
|
"NotFoundError",
|
||||||
"OnePasswordCredentialParameter",
|
"OnePasswordCredentialParameter",
|
||||||
"OnePasswordCredentialParameterYaml",
|
"OnePasswordCredentialParameterYaml",
|
||||||
"OnePasswordLoginRequest",
|
|
||||||
"OutputParameter",
|
"OutputParameter",
|
||||||
"OutputParameterYaml",
|
"OutputParameterYaml",
|
||||||
"PasswordCredentialResponse",
|
"PasswordCredentialResponse",
|
||||||
@@ -590,7 +579,8 @@ __all__ = [
|
|||||||
"SendEmailBlockYaml",
|
"SendEmailBlockYaml",
|
||||||
"Skyvern",
|
"Skyvern",
|
||||||
"SkyvernEnvironment",
|
"SkyvernEnvironment",
|
||||||
"SkyvernLoginRequest",
|
"SkyvernForgeSdkSchemasCredentialsCredentialType",
|
||||||
|
"SkyvernSchemasRunBlocksCredentialType",
|
||||||
"TaskBlock",
|
"TaskBlock",
|
||||||
"TaskBlockDataSchema",
|
"TaskBlockDataSchema",
|
||||||
"TaskBlockParametersItem",
|
"TaskBlockParametersItem",
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ from .errors.forbidden_error import ForbiddenError
|
|||||||
import datetime as dt
|
import datetime as dt
|
||||||
from .types.totp_code import TotpCode
|
from .types.totp_code import TotpCode
|
||||||
from .types.credential_response import CredentialResponse
|
from .types.credential_response import CredentialResponse
|
||||||
from .types.credential_type import CredentialType
|
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
|
||||||
from .types.create_credential_request_credential import CreateCredentialRequestCredential
|
from .types.create_credential_request_credential import CreateCredentialRequestCredential
|
||||||
from .types.login_request_body import LoginRequestBody
|
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
|
||||||
from .core.client_wrapper import AsyncClientWrapper
|
from .core.client_wrapper import AsyncClientWrapper
|
||||||
|
|
||||||
# this is used as the default value for optional parameters
|
# this is used as the default value for optional parameters
|
||||||
@@ -1544,7 +1544,7 @@ class Skyvern:
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
name: str,
|
name: str,
|
||||||
credential_type: CredentialType,
|
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
|
||||||
credential: CreateCredentialRequestCredential,
|
credential: CreateCredentialRequestCredential,
|
||||||
request_options: typing.Optional[RequestOptions] = None,
|
request_options: typing.Optional[RequestOptions] = None,
|
||||||
) -> CredentialResponse:
|
) -> CredentialResponse:
|
||||||
@@ -1556,7 +1556,7 @@ class Skyvern:
|
|||||||
name : str
|
name : str
|
||||||
Name of the credential
|
Name of the credential
|
||||||
|
|
||||||
credential_type : CredentialType
|
credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType
|
||||||
Type of credential to create
|
Type of credential to create
|
||||||
|
|
||||||
credential : CreateCredentialRequestCredential
|
credential : CreateCredentialRequestCredential
|
||||||
@@ -1740,14 +1740,74 @@ class Skyvern:
|
|||||||
raise ApiError(status_code=_response.status_code, body=_response_json)
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
||||||
|
|
||||||
def login(
|
def login(
|
||||||
self, *, request: LoginRequestBody, request_options: typing.Optional[RequestOptions] = None
|
self,
|
||||||
|
*,
|
||||||
|
credential_type: SkyvernSchemasRunBlocksCredentialType,
|
||||||
|
url: typing.Optional[str] = OMIT,
|
||||||
|
prompt: typing.Optional[str] = OMIT,
|
||||||
|
webhook_url: typing.Optional[str] = OMIT,
|
||||||
|
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||||
|
totp_identifier: typing.Optional[str] = OMIT,
|
||||||
|
totp_url: typing.Optional[str] = OMIT,
|
||||||
|
browser_session_id: typing.Optional[str] = OMIT,
|
||||||
|
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
||||||
|
max_screenshot_scrolling_times: typing.Optional[int] = OMIT,
|
||||||
|
credential_id: typing.Optional[str] = OMIT,
|
||||||
|
bitwarden_collection_id: typing.Optional[str] = OMIT,
|
||||||
|
bitwarden_item_id: typing.Optional[str] = OMIT,
|
||||||
|
onepassword_vault_id: typing.Optional[str] = OMIT,
|
||||||
|
onepassword_item_id: typing.Optional[str] = OMIT,
|
||||||
|
request_options: typing.Optional[RequestOptions] = None,
|
||||||
) -> WorkflowRunResponse:
|
) -> WorkflowRunResponse:
|
||||||
"""
|
"""
|
||||||
Log in to a website using either credential stored in Skyvern, Bitwarden or 1Password
|
Log in to a website using either credential stored in Skyvern, Bitwarden or 1Password
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
request : LoginRequestBody
|
credential_type : SkyvernSchemasRunBlocksCredentialType
|
||||||
|
Where to get the credential from
|
||||||
|
|
||||||
|
url : typing.Optional[str]
|
||||||
|
Website url
|
||||||
|
|
||||||
|
prompt : typing.Optional[str]
|
||||||
|
Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
|
||||||
|
|
||||||
|
webhook_url : typing.Optional[str]
|
||||||
|
Webhook URL to send login status updates
|
||||||
|
|
||||||
|
proxy_location : typing.Optional[ProxyLocation]
|
||||||
|
Proxy location to use
|
||||||
|
|
||||||
|
totp_identifier : typing.Optional[str]
|
||||||
|
Identifier for TOTP (Time-based One-Time Password) if required
|
||||||
|
|
||||||
|
totp_url : typing.Optional[str]
|
||||||
|
TOTP URL to fetch one-time passwords
|
||||||
|
|
||||||
|
browser_session_id : typing.Optional[str]
|
||||||
|
ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
|
||||||
|
|
||||||
|
extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
|
||||||
|
Additional HTTP headers to include in requests
|
||||||
|
|
||||||
|
max_screenshot_scrolling_times : typing.Optional[int]
|
||||||
|
Maximum number of times to scroll for screenshots
|
||||||
|
|
||||||
|
credential_id : typing.Optional[str]
|
||||||
|
ID of the Skyvern credential to use for login.
|
||||||
|
|
||||||
|
bitwarden_collection_id : typing.Optional[str]
|
||||||
|
Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items`
|
||||||
|
|
||||||
|
bitwarden_item_id : typing.Optional[str]
|
||||||
|
Bitwarden item ID
|
||||||
|
|
||||||
|
onepassword_vault_id : typing.Optional[str]
|
||||||
|
1Password vault ID
|
||||||
|
|
||||||
|
onepassword_item_id : typing.Optional[str]
|
||||||
|
1Password item ID
|
||||||
|
|
||||||
request_options : typing.Optional[RequestOptions]
|
request_options : typing.Optional[RequestOptions]
|
||||||
Request-specific configuration.
|
Request-specific configuration.
|
||||||
@@ -1759,24 +1819,39 @@ class Skyvern:
|
|||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
from skyvern import LoginRequestBody_Skyvern, Skyvern
|
from skyvern import Skyvern
|
||||||
|
|
||||||
client = Skyvern(
|
client = Skyvern(
|
||||||
api_key="YOUR_API_KEY",
|
api_key="YOUR_API_KEY",
|
||||||
x_api_key="YOUR_X_API_KEY",
|
x_api_key="YOUR_X_API_KEY",
|
||||||
)
|
)
|
||||||
client.login(
|
client.login(
|
||||||
request=LoginRequestBody_Skyvern(
|
credential_type="skyvern",
|
||||||
credential_id="credential_id",
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
_response = self._client_wrapper.httpx_client.request(
|
_response = self._client_wrapper.httpx_client.request(
|
||||||
"v1/run/tasks/login",
|
"v1/run/tasks/login",
|
||||||
method="POST",
|
method="POST",
|
||||||
json=convert_and_respect_annotation_metadata(
|
json={
|
||||||
object_=request, annotation=LoginRequestBody, direction="write"
|
"credential_type": credential_type,
|
||||||
),
|
"url": url,
|
||||||
|
"prompt": prompt,
|
||||||
|
"webhook_url": webhook_url,
|
||||||
|
"proxy_location": proxy_location,
|
||||||
|
"totp_identifier": totp_identifier,
|
||||||
|
"totp_url": totp_url,
|
||||||
|
"browser_session_id": browser_session_id,
|
||||||
|
"extra_http_headers": extra_http_headers,
|
||||||
|
"max_screenshot_scrolling_times": max_screenshot_scrolling_times,
|
||||||
|
"credential_id": credential_id,
|
||||||
|
"bitwarden_collection_id": bitwarden_collection_id,
|
||||||
|
"bitwarden_item_id": bitwarden_item_id,
|
||||||
|
"onepassword_vault_id": onepassword_vault_id,
|
||||||
|
"onepassword_item_id": onepassword_item_id,
|
||||||
|
},
|
||||||
|
headers={
|
||||||
|
"content-type": "application/json",
|
||||||
|
},
|
||||||
request_options=request_options,
|
request_options=request_options,
|
||||||
omit=OMIT,
|
omit=OMIT,
|
||||||
)
|
)
|
||||||
@@ -3450,7 +3525,7 @@ class AsyncSkyvern:
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
name: str,
|
name: str,
|
||||||
credential_type: CredentialType,
|
credential_type: SkyvernForgeSdkSchemasCredentialsCredentialType,
|
||||||
credential: CreateCredentialRequestCredential,
|
credential: CreateCredentialRequestCredential,
|
||||||
request_options: typing.Optional[RequestOptions] = None,
|
request_options: typing.Optional[RequestOptions] = None,
|
||||||
) -> CredentialResponse:
|
) -> CredentialResponse:
|
||||||
@@ -3462,7 +3537,7 @@ class AsyncSkyvern:
|
|||||||
name : str
|
name : str
|
||||||
Name of the credential
|
Name of the credential
|
||||||
|
|
||||||
credential_type : CredentialType
|
credential_type : SkyvernForgeSdkSchemasCredentialsCredentialType
|
||||||
Type of credential to create
|
Type of credential to create
|
||||||
|
|
||||||
credential : CreateCredentialRequestCredential
|
credential : CreateCredentialRequestCredential
|
||||||
@@ -3672,14 +3747,74 @@ class AsyncSkyvern:
|
|||||||
raise ApiError(status_code=_response.status_code, body=_response_json)
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
||||||
|
|
||||||
async def login(
|
async def login(
|
||||||
self, *, request: LoginRequestBody, request_options: typing.Optional[RequestOptions] = None
|
self,
|
||||||
|
*,
|
||||||
|
credential_type: SkyvernSchemasRunBlocksCredentialType,
|
||||||
|
url: typing.Optional[str] = OMIT,
|
||||||
|
prompt: typing.Optional[str] = OMIT,
|
||||||
|
webhook_url: typing.Optional[str] = OMIT,
|
||||||
|
proxy_location: typing.Optional[ProxyLocation] = OMIT,
|
||||||
|
totp_identifier: typing.Optional[str] = OMIT,
|
||||||
|
totp_url: typing.Optional[str] = OMIT,
|
||||||
|
browser_session_id: typing.Optional[str] = OMIT,
|
||||||
|
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
||||||
|
max_screenshot_scrolling_times: typing.Optional[int] = OMIT,
|
||||||
|
credential_id: typing.Optional[str] = OMIT,
|
||||||
|
bitwarden_collection_id: typing.Optional[str] = OMIT,
|
||||||
|
bitwarden_item_id: typing.Optional[str] = OMIT,
|
||||||
|
onepassword_vault_id: typing.Optional[str] = OMIT,
|
||||||
|
onepassword_item_id: typing.Optional[str] = OMIT,
|
||||||
|
request_options: typing.Optional[RequestOptions] = None,
|
||||||
) -> WorkflowRunResponse:
|
) -> WorkflowRunResponse:
|
||||||
"""
|
"""
|
||||||
Log in to a website using either credential stored in Skyvern, Bitwarden or 1Password
|
Log in to a website using either credential stored in Skyvern, Bitwarden or 1Password
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
request : LoginRequestBody
|
credential_type : SkyvernSchemasRunBlocksCredentialType
|
||||||
|
Where to get the credential from
|
||||||
|
|
||||||
|
url : typing.Optional[str]
|
||||||
|
Website url
|
||||||
|
|
||||||
|
prompt : typing.Optional[str]
|
||||||
|
Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
|
||||||
|
|
||||||
|
webhook_url : typing.Optional[str]
|
||||||
|
Webhook URL to send login status updates
|
||||||
|
|
||||||
|
proxy_location : typing.Optional[ProxyLocation]
|
||||||
|
Proxy location to use
|
||||||
|
|
||||||
|
totp_identifier : typing.Optional[str]
|
||||||
|
Identifier for TOTP (Time-based One-Time Password) if required
|
||||||
|
|
||||||
|
totp_url : typing.Optional[str]
|
||||||
|
TOTP URL to fetch one-time passwords
|
||||||
|
|
||||||
|
browser_session_id : typing.Optional[str]
|
||||||
|
ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
|
||||||
|
|
||||||
|
extra_http_headers : typing.Optional[typing.Dict[str, typing.Optional[str]]]
|
||||||
|
Additional HTTP headers to include in requests
|
||||||
|
|
||||||
|
max_screenshot_scrolling_times : typing.Optional[int]
|
||||||
|
Maximum number of times to scroll for screenshots
|
||||||
|
|
||||||
|
credential_id : typing.Optional[str]
|
||||||
|
ID of the Skyvern credential to use for login.
|
||||||
|
|
||||||
|
bitwarden_collection_id : typing.Optional[str]
|
||||||
|
Bitwarden collection ID. You can find it in the Bitwarden collection URL. e.g. `https://vault.bitwarden.com/vaults/collection_id/items`
|
||||||
|
|
||||||
|
bitwarden_item_id : typing.Optional[str]
|
||||||
|
Bitwarden item ID
|
||||||
|
|
||||||
|
onepassword_vault_id : typing.Optional[str]
|
||||||
|
1Password vault ID
|
||||||
|
|
||||||
|
onepassword_item_id : typing.Optional[str]
|
||||||
|
1Password item ID
|
||||||
|
|
||||||
request_options : typing.Optional[RequestOptions]
|
request_options : typing.Optional[RequestOptions]
|
||||||
Request-specific configuration.
|
Request-specific configuration.
|
||||||
@@ -3693,7 +3828,7 @@ class AsyncSkyvern:
|
|||||||
--------
|
--------
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from skyvern import AsyncSkyvern, LoginRequestBody_Skyvern
|
from skyvern import AsyncSkyvern
|
||||||
|
|
||||||
client = AsyncSkyvern(
|
client = AsyncSkyvern(
|
||||||
api_key="YOUR_API_KEY",
|
api_key="YOUR_API_KEY",
|
||||||
@@ -3703,9 +3838,7 @@ class AsyncSkyvern:
|
|||||||
|
|
||||||
async def main() -> None:
|
async def main() -> None:
|
||||||
await client.login(
|
await client.login(
|
||||||
request=LoginRequestBody_Skyvern(
|
credential_type="skyvern",
|
||||||
credential_id="credential_id",
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -3714,9 +3847,26 @@ class AsyncSkyvern:
|
|||||||
_response = await self._client_wrapper.httpx_client.request(
|
_response = await self._client_wrapper.httpx_client.request(
|
||||||
"v1/run/tasks/login",
|
"v1/run/tasks/login",
|
||||||
method="POST",
|
method="POST",
|
||||||
json=convert_and_respect_annotation_metadata(
|
json={
|
||||||
object_=request, annotation=LoginRequestBody, direction="write"
|
"credential_type": credential_type,
|
||||||
),
|
"url": url,
|
||||||
|
"prompt": prompt,
|
||||||
|
"webhook_url": webhook_url,
|
||||||
|
"proxy_location": proxy_location,
|
||||||
|
"totp_identifier": totp_identifier,
|
||||||
|
"totp_url": totp_url,
|
||||||
|
"browser_session_id": browser_session_id,
|
||||||
|
"extra_http_headers": extra_http_headers,
|
||||||
|
"max_screenshot_scrolling_times": max_screenshot_scrolling_times,
|
||||||
|
"credential_id": credential_id,
|
||||||
|
"bitwarden_collection_id": bitwarden_collection_id,
|
||||||
|
"bitwarden_item_id": bitwarden_item_id,
|
||||||
|
"onepassword_vault_id": onepassword_vault_id,
|
||||||
|
"onepassword_item_id": onepassword_item_id,
|
||||||
|
},
|
||||||
|
headers={
|
||||||
|
"content-type": "application/json",
|
||||||
|
},
|
||||||
request_options=request_options,
|
request_options=request_options,
|
||||||
omit=OMIT,
|
omit=OMIT,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ from .bitwarden_credit_card_data_parameter import BitwardenCreditCardDataParamet
|
|||||||
from .bitwarden_credit_card_data_parameter_yaml import BitwardenCreditCardDataParameterYaml
|
from .bitwarden_credit_card_data_parameter_yaml import BitwardenCreditCardDataParameterYaml
|
||||||
from .bitwarden_login_credential_parameter import BitwardenLoginCredentialParameter
|
from .bitwarden_login_credential_parameter import BitwardenLoginCredentialParameter
|
||||||
from .bitwarden_login_credential_parameter_yaml import BitwardenLoginCredentialParameterYaml
|
from .bitwarden_login_credential_parameter_yaml import BitwardenLoginCredentialParameterYaml
|
||||||
from .bitwarden_login_request import BitwardenLoginRequest
|
|
||||||
from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter
|
from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter
|
||||||
from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml
|
from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml
|
||||||
from .browser_session_response import BrowserSessionResponse
|
from .browser_session_response import BrowserSessionResponse
|
||||||
@@ -61,7 +60,7 @@ from .credential_parameter import CredentialParameter
|
|||||||
from .credential_parameter_yaml import CredentialParameterYaml
|
from .credential_parameter_yaml import CredentialParameterYaml
|
||||||
from .credential_response import CredentialResponse
|
from .credential_response import CredentialResponse
|
||||||
from .credential_response_credential import CredentialResponseCredential
|
from .credential_response_credential import CredentialResponseCredential
|
||||||
from .credential_type import CredentialType
|
from .credential_type_output import CredentialTypeOutput
|
||||||
from .credit_card_credential_response import CreditCardCredentialResponse
|
from .credit_card_credential_response import CreditCardCredentialResponse
|
||||||
from .download_to_s3block import DownloadToS3Block
|
from .download_to_s3block import DownloadToS3Block
|
||||||
from .download_to_s3block_yaml import DownloadToS3BlockYaml
|
from .download_to_s3block_yaml import DownloadToS3BlockYaml
|
||||||
@@ -202,12 +201,6 @@ from .login_block_parameters_item import (
|
|||||||
LoginBlockParametersItem_Workflow,
|
LoginBlockParametersItem_Workflow,
|
||||||
)
|
)
|
||||||
from .login_block_yaml import LoginBlockYaml
|
from .login_block_yaml import LoginBlockYaml
|
||||||
from .login_request_body import (
|
|
||||||
LoginRequestBody,
|
|
||||||
LoginRequestBody_1Password,
|
|
||||||
LoginRequestBody_Bitwarden,
|
|
||||||
LoginRequestBody_Skyvern,
|
|
||||||
)
|
|
||||||
from .navigation_block import NavigationBlock
|
from .navigation_block import NavigationBlock
|
||||||
from .navigation_block_data_schema import NavigationBlockDataSchema
|
from .navigation_block_data_schema import NavigationBlockDataSchema
|
||||||
from .navigation_block_parameters_item import (
|
from .navigation_block_parameters_item import (
|
||||||
@@ -227,7 +220,6 @@ from .non_empty_credit_card_credential import NonEmptyCreditCardCredential
|
|||||||
from .non_empty_password_credential import NonEmptyPasswordCredential
|
from .non_empty_password_credential import NonEmptyPasswordCredential
|
||||||
from .one_password_credential_parameter import OnePasswordCredentialParameter
|
from .one_password_credential_parameter import OnePasswordCredentialParameter
|
||||||
from .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml
|
from .one_password_credential_parameter_yaml import OnePasswordCredentialParameterYaml
|
||||||
from .one_password_login_request import OnePasswordLoginRequest
|
|
||||||
from .output_parameter import OutputParameter
|
from .output_parameter import OutputParameter
|
||||||
from .output_parameter_yaml import OutputParameterYaml
|
from .output_parameter_yaml import OutputParameterYaml
|
||||||
from .password_credential_response import PasswordCredentialResponse
|
from .password_credential_response import PasswordCredentialResponse
|
||||||
@@ -238,7 +230,8 @@ from .run_engine import RunEngine
|
|||||||
from .run_status import RunStatus
|
from .run_status import RunStatus
|
||||||
from .send_email_block import SendEmailBlock
|
from .send_email_block import SendEmailBlock
|
||||||
from .send_email_block_yaml import SendEmailBlockYaml
|
from .send_email_block_yaml import SendEmailBlockYaml
|
||||||
from .skyvern_login_request import SkyvernLoginRequest
|
from .skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
|
||||||
|
from .skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
|
||||||
from .task_block import TaskBlock
|
from .task_block import TaskBlock
|
||||||
from .task_block_data_schema import TaskBlockDataSchema
|
from .task_block_data_schema import TaskBlockDataSchema
|
||||||
from .task_block_parameters_item import (
|
from .task_block_parameters_item import (
|
||||||
@@ -431,7 +424,6 @@ __all__ = [
|
|||||||
"BitwardenCreditCardDataParameterYaml",
|
"BitwardenCreditCardDataParameterYaml",
|
||||||
"BitwardenLoginCredentialParameter",
|
"BitwardenLoginCredentialParameter",
|
||||||
"BitwardenLoginCredentialParameterYaml",
|
"BitwardenLoginCredentialParameterYaml",
|
||||||
"BitwardenLoginRequest",
|
|
||||||
"BitwardenSensitiveInformationParameter",
|
"BitwardenSensitiveInformationParameter",
|
||||||
"BitwardenSensitiveInformationParameterYaml",
|
"BitwardenSensitiveInformationParameterYaml",
|
||||||
"BrowserSessionResponse",
|
"BrowserSessionResponse",
|
||||||
@@ -465,7 +457,7 @@ __all__ = [
|
|||||||
"CredentialParameterYaml",
|
"CredentialParameterYaml",
|
||||||
"CredentialResponse",
|
"CredentialResponse",
|
||||||
"CredentialResponseCredential",
|
"CredentialResponseCredential",
|
||||||
"CredentialType",
|
"CredentialTypeOutput",
|
||||||
"CreditCardCredentialResponse",
|
"CreditCardCredentialResponse",
|
||||||
"DownloadToS3Block",
|
"DownloadToS3Block",
|
||||||
"DownloadToS3BlockYaml",
|
"DownloadToS3BlockYaml",
|
||||||
@@ -590,10 +582,6 @@ __all__ = [
|
|||||||
"LoginBlockParametersItem_Output",
|
"LoginBlockParametersItem_Output",
|
||||||
"LoginBlockParametersItem_Workflow",
|
"LoginBlockParametersItem_Workflow",
|
||||||
"LoginBlockYaml",
|
"LoginBlockYaml",
|
||||||
"LoginRequestBody",
|
|
||||||
"LoginRequestBody_1Password",
|
|
||||||
"LoginRequestBody_Bitwarden",
|
|
||||||
"LoginRequestBody_Skyvern",
|
|
||||||
"NavigationBlock",
|
"NavigationBlock",
|
||||||
"NavigationBlockDataSchema",
|
"NavigationBlockDataSchema",
|
||||||
"NavigationBlockParametersItem",
|
"NavigationBlockParametersItem",
|
||||||
@@ -611,7 +599,6 @@ __all__ = [
|
|||||||
"NonEmptyPasswordCredential",
|
"NonEmptyPasswordCredential",
|
||||||
"OnePasswordCredentialParameter",
|
"OnePasswordCredentialParameter",
|
||||||
"OnePasswordCredentialParameterYaml",
|
"OnePasswordCredentialParameterYaml",
|
||||||
"OnePasswordLoginRequest",
|
|
||||||
"OutputParameter",
|
"OutputParameter",
|
||||||
"OutputParameterYaml",
|
"OutputParameterYaml",
|
||||||
"PasswordCredentialResponse",
|
"PasswordCredentialResponse",
|
||||||
@@ -622,7 +609,8 @@ __all__ = [
|
|||||||
"RunStatus",
|
"RunStatus",
|
||||||
"SendEmailBlock",
|
"SendEmailBlock",
|
||||||
"SendEmailBlockYaml",
|
"SendEmailBlockYaml",
|
||||||
"SkyvernLoginRequest",
|
"SkyvernForgeSdkSchemasCredentialsCredentialType",
|
||||||
|
"SkyvernSchemasRunBlocksCredentialType",
|
||||||
"TaskBlock",
|
"TaskBlock",
|
||||||
"TaskBlockDataSchema",
|
"TaskBlockDataSchema",
|
||||||
"TaskBlockParametersItem",
|
"TaskBlockParametersItem",
|
||||||
|
|||||||
@@ -1,77 +0,0 @@
|
|||||||
# This file was auto-generated by Fern from our API Definition.
|
|
||||||
|
|
||||||
from ..core.pydantic_utilities import UniversalBaseModel
|
|
||||||
import typing
|
|
||||||
import pydantic
|
|
||||||
from .proxy_location import ProxyLocation
|
|
||||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
||||||
|
|
||||||
|
|
||||||
class BitwardenLoginRequest(UniversalBaseModel):
|
|
||||||
"""
|
|
||||||
Login with password saved in Bitwarden
|
|
||||||
"""
|
|
||||||
|
|
||||||
url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Website url
|
|
||||||
"""
|
|
||||||
|
|
||||||
prompt: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
|
|
||||||
"""
|
|
||||||
|
|
||||||
webhook_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Webhook URL to send login status updates
|
|
||||||
"""
|
|
||||||
|
|
||||||
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Proxy location to use
|
|
||||||
"""
|
|
||||||
|
|
||||||
totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Identifier for TOTP (Time-based One-Time Password) if required
|
|
||||||
"""
|
|
||||||
|
|
||||||
totp_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
TOTP URL to fetch one-time passwords
|
|
||||||
"""
|
|
||||||
|
|
||||||
browser_session_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
|
|
||||||
"""
|
|
||||||
|
|
||||||
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Additional HTTP headers to include in requests
|
|
||||||
"""
|
|
||||||
|
|
||||||
max_screenshot_scrolling_times: typing.Optional[int] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Maximum number of times to scroll for screenshots
|
|
||||||
"""
|
|
||||||
|
|
||||||
bitwarden_collection_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Bitwarden collection ID
|
|
||||||
"""
|
|
||||||
|
|
||||||
bitwarden_item_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Bitwarden item ID
|
|
||||||
"""
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
from ..core.pydantic_utilities import UniversalBaseModel
|
from ..core.pydantic_utilities import UniversalBaseModel
|
||||||
import pydantic
|
import pydantic
|
||||||
from .credential_response_credential import CredentialResponseCredential
|
from .credential_response_credential import CredentialResponseCredential
|
||||||
from .credential_type import CredentialType
|
from .credential_type_output import CredentialTypeOutput
|
||||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ class CredentialResponse(UniversalBaseModel):
|
|||||||
The credential data
|
The credential data
|
||||||
"""
|
"""
|
||||||
|
|
||||||
credential_type: CredentialType = pydantic.Field()
|
credential_type: CredentialTypeOutput = pydantic.Field()
|
||||||
"""
|
"""
|
||||||
Type of the credential
|
Type of the credential
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# This file was auto-generated by Fern from our API Definition.
|
|
||||||
|
|
||||||
import typing
|
|
||||||
|
|
||||||
CredentialType = typing.Union[typing.Literal["password", "credit_card"], typing.Any]
|
|
||||||
5
skyvern/client/types/credential_type_output.py
Normal file
5
skyvern/client/types/credential_type_output.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# This file was auto-generated by Fern from our API Definition.
|
||||||
|
|
||||||
|
import typing
|
||||||
|
|
||||||
|
CredentialTypeOutput = typing.Union[typing.Literal["password", "credit_card"], typing.Any]
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
# This file was auto-generated by Fern from our API Definition.
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
from ..core.pydantic_utilities import UniversalBaseModel
|
|
||||||
import typing
|
|
||||||
from .proxy_location import ProxyLocation
|
|
||||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
||||||
import pydantic
|
|
||||||
|
|
||||||
|
|
||||||
class LoginRequestBody_Skyvern(UniversalBaseModel):
|
|
||||||
credential_type: typing.Literal["skyvern"] = "skyvern"
|
|
||||||
url: typing.Optional[str] = None
|
|
||||||
prompt: typing.Optional[str] = None
|
|
||||||
webhook_url: typing.Optional[str] = None
|
|
||||||
proxy_location: typing.Optional[ProxyLocation] = None
|
|
||||||
totp_identifier: typing.Optional[str] = None
|
|
||||||
totp_url: typing.Optional[str] = None
|
|
||||||
browser_session_id: typing.Optional[str] = None
|
|
||||||
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
||||||
max_screenshot_scrolling_times: typing.Optional[int] = None
|
|
||||||
credential_id: str
|
|
||||||
|
|
||||||
if IS_PYDANTIC_V2:
|
|
||||||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
||||||
else:
|
|
||||||
|
|
||||||
class Config:
|
|
||||||
frozen = True
|
|
||||||
smart_union = True
|
|
||||||
extra = pydantic.Extra.allow
|
|
||||||
|
|
||||||
|
|
||||||
class LoginRequestBody_Bitwarden(UniversalBaseModel):
|
|
||||||
credential_type: typing.Literal["bitwarden"] = "bitwarden"
|
|
||||||
url: typing.Optional[str] = None
|
|
||||||
prompt: typing.Optional[str] = None
|
|
||||||
webhook_url: typing.Optional[str] = None
|
|
||||||
proxy_location: typing.Optional[ProxyLocation] = None
|
|
||||||
totp_identifier: typing.Optional[str] = None
|
|
||||||
totp_url: typing.Optional[str] = None
|
|
||||||
browser_session_id: typing.Optional[str] = None
|
|
||||||
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
||||||
max_screenshot_scrolling_times: typing.Optional[int] = None
|
|
||||||
bitwarden_collection_id: typing.Optional[str] = None
|
|
||||||
bitwarden_item_id: typing.Optional[str] = None
|
|
||||||
|
|
||||||
if IS_PYDANTIC_V2:
|
|
||||||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
||||||
else:
|
|
||||||
|
|
||||||
class Config:
|
|
||||||
frozen = True
|
|
||||||
smart_union = True
|
|
||||||
extra = pydantic.Extra.allow
|
|
||||||
|
|
||||||
|
|
||||||
class LoginRequestBody_1Password(UniversalBaseModel):
|
|
||||||
credential_type: typing.Literal["1password"] = "1password"
|
|
||||||
url: typing.Optional[str] = None
|
|
||||||
prompt: typing.Optional[str] = None
|
|
||||||
webhook_url: typing.Optional[str] = None
|
|
||||||
proxy_location: typing.Optional[ProxyLocation] = None
|
|
||||||
totp_identifier: typing.Optional[str] = None
|
|
||||||
totp_url: typing.Optional[str] = None
|
|
||||||
browser_session_id: typing.Optional[str] = None
|
|
||||||
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
|
|
||||||
max_screenshot_scrolling_times: typing.Optional[int] = None
|
|
||||||
onepassword_vault_id: str
|
|
||||||
onepassword_item_id: str
|
|
||||||
|
|
||||||
if IS_PYDANTIC_V2:
|
|
||||||
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
||||||
else:
|
|
||||||
|
|
||||||
class Config:
|
|
||||||
frozen = True
|
|
||||||
smart_union = True
|
|
||||||
extra = pydantic.Extra.allow
|
|
||||||
|
|
||||||
|
|
||||||
LoginRequestBody = typing.Union[LoginRequestBody_Skyvern, LoginRequestBody_Bitwarden, LoginRequestBody_1Password]
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
# This file was auto-generated by Fern from our API Definition.
|
|
||||||
|
|
||||||
from ..core.pydantic_utilities import UniversalBaseModel
|
|
||||||
import typing
|
|
||||||
import pydantic
|
|
||||||
from .proxy_location import ProxyLocation
|
|
||||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
||||||
|
|
||||||
|
|
||||||
class OnePasswordLoginRequest(UniversalBaseModel):
|
|
||||||
"""
|
|
||||||
Login with password saved in 1Password
|
|
||||||
"""
|
|
||||||
|
|
||||||
url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Website url
|
|
||||||
"""
|
|
||||||
|
|
||||||
prompt: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
|
|
||||||
"""
|
|
||||||
|
|
||||||
webhook_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Webhook URL to send login status updates
|
|
||||||
"""
|
|
||||||
|
|
||||||
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Proxy location to use
|
|
||||||
"""
|
|
||||||
|
|
||||||
totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Identifier for TOTP (Time-based One-Time Password) if required
|
|
||||||
"""
|
|
||||||
|
|
||||||
totp_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
TOTP URL to fetch one-time passwords
|
|
||||||
"""
|
|
||||||
|
|
||||||
browser_session_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
|
|
||||||
"""
|
|
||||||
|
|
||||||
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Additional HTTP headers to include in requests
|
|
||||||
"""
|
|
||||||
|
|
||||||
max_screenshot_scrolling_times: typing.Optional[int] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Maximum number of times to scroll for screenshots
|
|
||||||
"""
|
|
||||||
|
|
||||||
onepassword_vault_id: str = pydantic.Field()
|
|
||||||
"""
|
|
||||||
1Password vault ID.
|
|
||||||
"""
|
|
||||||
|
|
||||||
onepassword_item_id: str = pydantic.Field()
|
|
||||||
"""
|
|
||||||
1Password item ID.
|
|
||||||
"""
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# This file was auto-generated by Fern from our API Definition.
|
||||||
|
|
||||||
|
import typing
|
||||||
|
|
||||||
|
SkyvernForgeSdkSchemasCredentialsCredentialType = typing.Union[typing.Literal["password", "credit_card"], typing.Any]
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
# This file was auto-generated by Fern from our API Definition.
|
|
||||||
|
|
||||||
from ..core.pydantic_utilities import UniversalBaseModel
|
|
||||||
import typing
|
|
||||||
import pydantic
|
|
||||||
from .proxy_location import ProxyLocation
|
|
||||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
||||||
|
|
||||||
|
|
||||||
class SkyvernLoginRequest(UniversalBaseModel):
|
|
||||||
"""
|
|
||||||
Login with password saved in Skyvern
|
|
||||||
"""
|
|
||||||
|
|
||||||
url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Website url
|
|
||||||
"""
|
|
||||||
|
|
||||||
prompt: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Login instructions. Skyvern has default prompt/instruction for login if this field is not provided.
|
|
||||||
"""
|
|
||||||
|
|
||||||
webhook_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Webhook URL to send login status updates
|
|
||||||
"""
|
|
||||||
|
|
||||||
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Proxy location to use
|
|
||||||
"""
|
|
||||||
|
|
||||||
totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Identifier for TOTP (Time-based One-Time Password) if required
|
|
||||||
"""
|
|
||||||
|
|
||||||
totp_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
TOTP URL to fetch one-time passwords
|
|
||||||
"""
|
|
||||||
|
|
||||||
browser_session_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
ID of the browser session to use, which is prefixed by `pbs_` e.g. `pbs_123456`
|
|
||||||
"""
|
|
||||||
|
|
||||||
extra_http_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Additional HTTP headers to include in requests
|
|
||||||
"""
|
|
||||||
|
|
||||||
max_screenshot_scrolling_times: typing.Optional[int] = pydantic.Field(default=None)
|
|
||||||
"""
|
|
||||||
Maximum number of times to scroll for screenshots
|
|
||||||
"""
|
|
||||||
|
|
||||||
credential_id: str = pydantic.Field()
|
|
||||||
"""
|
|
||||||
ID of the Skyvern credential to use for login.
|
|
||||||
"""
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# This file was auto-generated by Fern from our API Definition.
|
||||||
|
|
||||||
|
import typing
|
||||||
|
|
||||||
|
SkyvernSchemasRunBlocksCredentialType = typing.Union[typing.Literal["skyvern", "bitwarden", "1password"], typing.Any]
|
||||||
@@ -469,8 +469,37 @@ class Skyvern(AsyncSkyvern):
|
|||||||
totp_url: str | None = None,
|
totp_url: str | None = None,
|
||||||
browser_session_id: str | None = None,
|
browser_session_id: str | None = None,
|
||||||
extra_http_headers: dict[str, str] | None = None,
|
extra_http_headers: dict[str, str] | None = None,
|
||||||
|
wait_for_completion: bool = False,
|
||||||
|
timeout: float = DEFAULT_AGENT_TIMEOUT,
|
||||||
) -> None:
|
) -> None:
|
||||||
return
|
if not self._api_key:
|
||||||
|
raise ValueError(
|
||||||
|
"Local mode is not supported for run_workflow. Please instantiate Skyvern with an API key like this: Skyvern(api_key='your-api-key')"
|
||||||
|
)
|
||||||
|
workflow_run = await super().login(
|
||||||
|
credential_type=credential_type,
|
||||||
|
url=url,
|
||||||
|
credential_id=credential_id,
|
||||||
|
bitwarden_collection_id=bitwarden_collection_id,
|
||||||
|
bitwarden_item_id=bitwarden_item_id,
|
||||||
|
onepassword_vault_id=onepassword_vault_id,
|
||||||
|
onepassword_item_id=onepassword_item_id,
|
||||||
|
prompt=prompt,
|
||||||
|
webhook_url=webhook_url,
|
||||||
|
proxy_location=proxy_location,
|
||||||
|
totp_identifier=totp_identifier,
|
||||||
|
totp_url=totp_url,
|
||||||
|
browser_session_id=browser_session_id,
|
||||||
|
extra_http_headers=extra_http_headers,
|
||||||
|
)
|
||||||
|
if wait_for_completion:
|
||||||
|
async with asyncio.timeout(timeout):
|
||||||
|
while True:
|
||||||
|
workflow_run = await super().get_run(workflow_run.run_id)
|
||||||
|
if RunStatus(workflow_run.status).is_final():
|
||||||
|
break
|
||||||
|
await asyncio.sleep(DEFAULT_AGENT_HEARTBEAT_INTERVAL)
|
||||||
|
return WorkflowRunResponse.model_validate(workflow_run.model_dump())
|
||||||
|
|
||||||
|
|
||||||
def from_run_to_task_run_response(run_obj: GetRunResponse) -> TaskRunResponse:
|
def from_run_to_task_run_response(run_obj: GetRunResponse) -> TaskRunResponse:
|
||||||
|
|||||||
Reference in New Issue
Block a user