Skyvern Evaluation New Endpoint - general /runs (#2374)

This commit is contained in:
Shuchang Zheng
2025-05-17 10:33:43 -07:00
committed by GitHub
parent 6e27dbb8e0
commit 339c894340
32 changed files with 288 additions and 485 deletions

View File

@@ -159,7 +159,6 @@ from .types import (
TextPromptBlockParametersItem_Credential,
TextPromptBlockParametersItem_Output,
TextPromptBlockParametersItem_Workflow,
TotpCode,
UploadToS3Block,
UrlBlock,
UrlBlockDataSchema,
@@ -234,7 +233,7 @@ from .types import (
WorkflowRunResponseOutput,
WorkflowStatus,
)
from .errors import BadRequestError, ForbiddenError, NotFoundError, UnprocessableEntityError
from .errors import BadRequestError, NotFoundError, UnauthorizedError, UnprocessableEntityError
from . import agent, browser_session, credentials
from .agent import (
AgentGetRunResponse,
@@ -359,7 +358,6 @@ __all__ = [
"ForLoopBlockLoopOver_Credential",
"ForLoopBlockLoopOver_Output",
"ForLoopBlockLoopOver_Workflow",
"ForbiddenError",
"HttpValidationError",
"LoginBlock",
"LoginBlockDataSchema",
@@ -421,7 +419,7 @@ __all__ = [
"TextPromptBlockParametersItem_Credential",
"TextPromptBlockParametersItem_Output",
"TextPromptBlockParametersItem_Workflow",
"TotpCode",
"UnauthorizedError",
"UnprocessableEntityError",
"UploadToS3Block",
"UrlBlock",

View File

@@ -54,7 +54,7 @@ class AgentClient:
authorization="YOUR_AUTHORIZATION",
)
client.agent.get_run(
run_id="tsk_123",
run_id="run_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -156,7 +156,6 @@ class AgentClient:
Parameters
----------
workflow_id : str
The ID of the workflow to update. Workflow ID starts with `wpid_`.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -175,7 +174,7 @@ class AgentClient:
authorization="YOUR_AUTHORIZATION",
)
client.agent.update_workflow(
workflow_id="wpid_123",
workflow_id="workflow_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -216,7 +215,6 @@ class AgentClient:
Parameters
----------
workflow_id : str
The ID of the workflow to delete. Workflow ID starts with `wpid_`.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -235,7 +233,7 @@ class AgentClient:
authorization="YOUR_AUTHORIZATION",
)
client.agent.delete_workflow(
workflow_id="wpid_123",
workflow_id="workflow_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -273,8 +271,8 @@ class AgentClient:
prompt: str,
user_agent: typing.Optional[str] = None,
url: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -284,7 +282,6 @@ class AgentClient:
totp_url: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
publish_workflow: typing.Optional[bool] = OMIT,
include_action_history_in_verification: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TaskRunResponse:
"""
@@ -300,11 +297,11 @@ class AgentClient:
url : typing.Optional[str]
The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL
engine : typing.Optional[RunEngine]
The Skyvern engine version to use for this task. The default value is skyvern-2.0.
title : typing.Optional[str]
The title for the task
Optional title for the task
engine : typing.Optional[RunEngine]
The Skyvern engine version to use for this task
proxy_location : typing.Optional[ProxyLocation]
Geographic Proxy location to route the browser traffic through
@@ -331,10 +328,7 @@ class AgentClient:
ID of an existing browser session to reuse, having it continue from the current screen state
publish_workflow : typing.Optional[bool]
Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.
include_action_history_in_verification : typing.Optional[bool]
Whether to include action history when verifying that the task is complete
Whether to publish this task as a reusable workflow.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -352,7 +346,7 @@ class AgentClient:
api_key="YOUR_API_KEY",
authorization="YOUR_AUTHORIZATION",
)
client.agent.run_task(
await client.agent.run_task(
prompt="prompt",
)
"""
@@ -362,8 +356,8 @@ class AgentClient:
json={
"prompt": prompt,
"url": url,
"engine": engine,
"title": title,
"engine": engine,
"proxy_location": proxy_location,
"data_extraction_schema": convert_and_respect_annotation_metadata(
object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
@@ -375,7 +369,6 @@ class AgentClient:
"totp_url": totp_url,
"browser_session_id": browser_session_id,
"publish_workflow": publish_workflow,
"include_action_history_in_verification": include_action_history_in_verification,
},
headers={
"x-user-agent": str(user_agent) if user_agent is not None else None,
@@ -424,8 +417,8 @@ class AgentClient:
template: typing.Optional[bool] = None,
max_steps_override: typing.Optional[int] = None,
user_agent: typing.Optional[str] = None,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
title: typing.Optional[str] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
totp_url: typing.Optional[str] = OMIT,
@@ -439,7 +432,7 @@ class AgentClient:
Parameters
----------
workflow_id : str
ID of the workflow to run. Workflow ID starts with `wpid_`.
ID of the workflow to run
template : typing.Optional[bool]
@@ -447,26 +440,26 @@ class AgentClient:
user_agent : typing.Optional[str]
title : typing.Optional[str]
Optional title for this workflow run
parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
Parameters to pass to the workflow
title : typing.Optional[str]
The title for this workflow run
proxy_location : typing.Optional[ProxyLocation]
Location of proxy to use for this workflow run
webhook_url : typing.Optional[str]
URL to send workflow status updates to after a run is finished. Refer to https://docs.skyvern.com/running-tasks/webhooks-faq for webhook questions.
URL to send workflow status updates to after a run is finished
totp_url : typing.Optional[str]
URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://docs.skyvern.com/running-tasks/advanced-features#get-code-from-your-endpoint
URL for TOTP authentication setup if Skyvern should be polling endpoint for 2FA codes
totp_identifier : typing.Optional[str]
Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://docs.skyvern.com/running-tasks/advanced-features#time-based-one-time-password-totp
Identifier for TOTP (Time-based One-Time Password) authentication if codes are being pushed to Skyvern
browser_session_id : typing.Optional[str]
ID of a Skyvern browser session to reuse, having it continue from the current screen state
ID of an existing browser session to reuse, having it continue from the current screen state
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -485,7 +478,7 @@ class AgentClient:
authorization="YOUR_AUTHORIZATION",
)
client.agent.run_workflow(
workflow_id="wpid_123",
workflow_id="workflow_id",
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -496,8 +489,8 @@ class AgentClient:
},
json={
"workflow_id": workflow_id,
"parameters": parameters,
"title": title,
"parameters": parameters,
"proxy_location": proxy_location,
"webhook_url": webhook_url,
"totp_url": totp_url,
@@ -643,7 +636,7 @@ class AsyncAgentClient:
async def main() -> None:
await client.agent.get_run(
run_id="tsk_123",
run_id="run_id",
)
@@ -758,7 +751,6 @@ class AsyncAgentClient:
Parameters
----------
workflow_id : str
The ID of the workflow to update. Workflow ID starts with `wpid_`.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -782,7 +774,7 @@ class AsyncAgentClient:
async def main() -> None:
await client.agent.update_workflow(
workflow_id="wpid_123",
workflow_id="workflow_id",
)
@@ -826,7 +818,6 @@ class AsyncAgentClient:
Parameters
----------
workflow_id : str
The ID of the workflow to delete. Workflow ID starts with `wpid_`.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -850,7 +841,7 @@ class AsyncAgentClient:
async def main() -> None:
await client.agent.delete_workflow(
workflow_id="wpid_123",
workflow_id="workflow_id",
)
@@ -891,8 +882,8 @@ class AsyncAgentClient:
prompt: str,
user_agent: typing.Optional[str] = None,
url: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
@@ -902,7 +893,6 @@ class AsyncAgentClient:
totp_url: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
publish_workflow: typing.Optional[bool] = OMIT,
include_action_history_in_verification: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TaskRunResponse:
"""
@@ -918,11 +908,11 @@ class AsyncAgentClient:
url : typing.Optional[str]
The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL
engine : typing.Optional[RunEngine]
The Skyvern engine version to use for this task. The default value is skyvern-2.0.
title : typing.Optional[str]
The title for the task
Optional title for the task
engine : typing.Optional[RunEngine]
The Skyvern engine version to use for this task
proxy_location : typing.Optional[ProxyLocation]
Geographic Proxy location to route the browser traffic through
@@ -949,10 +939,7 @@ class AsyncAgentClient:
ID of an existing browser session to reuse, having it continue from the current screen state
publish_workflow : typing.Optional[bool]
Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.
include_action_history_in_verification : typing.Optional[bool]
Whether to include action history when verifying that the task is complete
Whether to publish this task as a reusable workflow.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -988,8 +975,8 @@ class AsyncAgentClient:
json={
"prompt": prompt,
"url": url,
"engine": engine,
"title": title,
"engine": engine,
"proxy_location": proxy_location,
"data_extraction_schema": convert_and_respect_annotation_metadata(
object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
@@ -1001,7 +988,6 @@ class AsyncAgentClient:
"totp_url": totp_url,
"browser_session_id": browser_session_id,
"publish_workflow": publish_workflow,
"include_action_history_in_verification": include_action_history_in_verification,
},
headers={
"x-user-agent": str(user_agent) if user_agent is not None else None,
@@ -1050,8 +1036,8 @@ class AsyncAgentClient:
template: typing.Optional[bool] = None,
max_steps_override: typing.Optional[int] = None,
user_agent: typing.Optional[str] = None,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
title: typing.Optional[str] = OMIT,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
totp_url: typing.Optional[str] = OMIT,
@@ -1065,7 +1051,7 @@ class AsyncAgentClient:
Parameters
----------
workflow_id : str
ID of the workflow to run. Workflow ID starts with `wpid_`.
ID of the workflow to run
template : typing.Optional[bool]
@@ -1073,26 +1059,26 @@ class AsyncAgentClient:
user_agent : typing.Optional[str]
title : typing.Optional[str]
Optional title for this workflow run
parameters : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
Parameters to pass to the workflow
title : typing.Optional[str]
The title for this workflow run
proxy_location : typing.Optional[ProxyLocation]
Location of proxy to use for this workflow run
webhook_url : typing.Optional[str]
URL to send workflow status updates to after a run is finished. Refer to https://docs.skyvern.com/running-tasks/webhooks-faq for webhook questions.
URL to send workflow status updates to after a run is finished
totp_url : typing.Optional[str]
URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://docs.skyvern.com/running-tasks/advanced-features#get-code-from-your-endpoint
URL for TOTP authentication setup if Skyvern should be polling endpoint for 2FA codes
totp_identifier : typing.Optional[str]
Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://docs.skyvern.com/running-tasks/advanced-features#time-based-one-time-password-totp
Identifier for TOTP (Time-based One-Time Password) authentication if codes are being pushed to Skyvern
browser_session_id : typing.Optional[str]
ID of a Skyvern browser session to reuse, having it continue from the current screen state
ID of an existing browser session to reuse, having it continue from the current screen state
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1116,7 +1102,7 @@ class AsyncAgentClient:
async def main() -> None:
await client.agent.run_workflow(
workflow_id="wpid_123",
workflow_id="workflow_id",
)
@@ -1130,8 +1116,8 @@ class AsyncAgentClient:
},
json={
"workflow_id": workflow_id,
"parameters": parameters,
"title": title,
"parameters": parameters,
"proxy_location": proxy_location,
"webhook_url": webhook_url,
"totp_url": totp_url,

View File

@@ -1,21 +1,18 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from ..core.client_wrapper import SyncClientWrapper
import typing
from ..core.request_options import RequestOptions
from ..types.browser_session_response import BrowserSessionResponse
from ..core.jsonable_encoder import jsonable_encoder
from ..core.pydantic_utilities import parse_obj_as
from ..errors.forbidden_error import ForbiddenError
from ..errors.unauthorized_error import UnauthorizedError
from ..errors.not_found_error import NotFoundError
from ..errors.unprocessable_entity_error import UnprocessableEntityError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError
from ..core.client_wrapper import AsyncClientWrapper
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
class BrowserSessionClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -65,8 +62,8 @@ class BrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -140,8 +137,8 @@ class BrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -166,16 +163,13 @@ class BrowserSessionClient:
raise ApiError(status_code=_response.status_code, body=_response_json)
def create_browser_session(
self, *, timeout: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None
self, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserSessionResponse:
"""
Create a new browser session
Parameters
----------
timeout : typing.Optional[int]
Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 10080. Defaults to 60.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -197,14 +191,7 @@ class BrowserSessionClient:
_response = self._client_wrapper.httpx_client.request(
"v1/browser_sessions",
method="POST",
json={
"timeout": timeout,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
@@ -215,8 +202,8 @@ class BrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -284,8 +271,8 @@ class BrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -366,8 +353,8 @@ class AsyncBrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -449,8 +436,8 @@ class AsyncBrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -475,16 +462,13 @@ class AsyncBrowserSessionClient:
raise ApiError(status_code=_response.status_code, body=_response_json)
async def create_browser_session(
self, *, timeout: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None
self, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserSessionResponse:
"""
Create a new browser session
Parameters
----------
timeout : typing.Optional[int]
Timeout in minutes for the session. Timeout is applied after the session is started. Must be between 5 and 10080. Defaults to 60.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -514,14 +498,7 @@ class AsyncBrowserSessionClient:
_response = await self._client_wrapper.httpx_client.request(
"v1/browser_sessions",
method="POST",
json={
"timeout": timeout,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
@@ -532,8 +509,8 @@ class AsyncBrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
@@ -609,8 +586,8 @@ class AsyncBrowserSessionClient:
object_=_response.json(),
),
)
if _response.status_code == 403:
raise ForbiddenError(
if _response.status_code == 401:
raise UnauthorizedError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(

View File

@@ -5,12 +5,12 @@ from .environment import SkyvernEnvironment
import httpx
from .core.client_wrapper import SyncClientWrapper
from .agent.client import AgentClient
from .browser_session.client import BrowserSessionClient
from .credentials.client import CredentialsClient
from .browser_session.client import BrowserSessionClient
from .core.client_wrapper import AsyncClientWrapper
from .agent.client import AsyncAgentClient
from .browser_session.client import AsyncBrowserSessionClient
from .credentials.client import AsyncCredentialsClient
from .browser_session.client import AsyncBrowserSessionClient
class Skyvern:
@@ -76,8 +76,8 @@ class Skyvern:
timeout=_defaulted_timeout,
)
self.agent = AgentClient(client_wrapper=self._client_wrapper)
self.browser_session = BrowserSessionClient(client_wrapper=self._client_wrapper)
self.credentials = CredentialsClient(client_wrapper=self._client_wrapper)
self.browser_session = BrowserSessionClient(client_wrapper=self._client_wrapper)
class AsyncSkyvern:
@@ -143,8 +143,8 @@ class AsyncSkyvern:
timeout=_defaulted_timeout,
)
self.agent = AsyncAgentClient(client_wrapper=self._client_wrapper)
self.browser_session = AsyncBrowserSessionClient(client_wrapper=self._client_wrapper)
self.credentials = AsyncCredentialsClient(client_wrapper=self._client_wrapper)
self.browser_session = AsyncBrowserSessionClient(client_wrapper=self._client_wrapper)
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SkyvernEnvironment) -> str:

View File

@@ -24,7 +24,7 @@ class BaseClientWrapper:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "0.1.83",
"X-Fern-SDK-Version": "0.1.82",
}
if self._api_key is not None:
headers["x-api-key"] = self._api_key

View File

@@ -2,14 +2,12 @@
import typing
from ..core.client_wrapper import SyncClientWrapper
import datetime as dt
from ..core.request_options import RequestOptions
from ..types.totp_code import TotpCode
from ..types.credential_response import CredentialResponse
from ..core.pydantic_utilities import parse_obj_as
from ..errors.unprocessable_entity_error import UnprocessableEntityError
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError
from ..types.credential_response import CredentialResponse
from ..types.credential_type import CredentialType
from .types.create_credential_request_credential import CreateCredentialRequestCredential
from ..core.serialization import convert_and_respect_annotation_metadata
@@ -24,107 +22,6 @@ class CredentialsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def send_totp_code(
self,
*,
totp_identifier: str,
content: str,
task_id: typing.Optional[str] = OMIT,
workflow_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
source: typing.Optional[str] = OMIT,
expired_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TotpCode:
"""
Forward a TOTP (2FA, MFA) code to Skyvern
Parameters
----------
totp_identifier : str
The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user.
content : str
The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content.
task_id : typing.Optional[str]
The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for.
workflow_id : typing.Optional[str]
The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for.
workflow_run_id : typing.Optional[str]
The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for.
source : typing.Optional[str]
An optional field. The source of the TOTP code. e.g. email, sms, etc.
expired_at : typing.Optional[dt.datetime]
The timestamp when the TOTP code expires
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
TotpCode
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
authorization="YOUR_AUTHORIZATION",
)
client.credentials.send_totp_code(
totp_identifier="john.doe@example.com",
content="Hello, your verification code is 123456",
)
"""
_response = self._client_wrapper.httpx_client.request(
"v1/credentials/totp",
method="POST",
json={
"totp_identifier": totp_identifier,
"task_id": task_id,
"workflow_id": workflow_id,
"workflow_run_id": workflow_run_id,
"source": source,
"content": content,
"expired_at": expired_at,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
return typing.cast(
TotpCode,
parse_obj_as(
type_=TotpCode, # type: ignore
object_=_response.json(),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
)
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
def get_credentials(
self,
*,
@@ -398,115 +295,6 @@ class AsyncCredentialsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def send_totp_code(
self,
*,
totp_identifier: str,
content: str,
task_id: typing.Optional[str] = OMIT,
workflow_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
source: typing.Optional[str] = OMIT,
expired_at: typing.Optional[dt.datetime] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TotpCode:
"""
Forward a TOTP (2FA, MFA) code to Skyvern
Parameters
----------
totp_identifier : str
The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user.
content : str
The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content.
task_id : typing.Optional[str]
The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for.
workflow_id : typing.Optional[str]
The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for.
workflow_run_id : typing.Optional[str]
The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for.
source : typing.Optional[str]
An optional field. The source of the TOTP code. e.g. email, sms, etc.
expired_at : typing.Optional[dt.datetime]
The timestamp when the TOTP code expires
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
TotpCode
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
authorization="YOUR_AUTHORIZATION",
)
async def main() -> None:
await client.credentials.send_totp_code(
totp_identifier="john.doe@example.com",
content="Hello, your verification code is 123456",
)
asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/credentials/totp",
method="POST",
json={
"totp_identifier": totp_identifier,
"task_id": task_id,
"workflow_id": workflow_id,
"workflow_run_id": workflow_run_id,
"source": source,
"content": content,
"expired_at": expired_at,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
return typing.cast(
TotpCode,
parse_obj_as(
type_=TotpCode, # type: ignore
object_=_response.json(),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
)
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
async def get_credentials(
self,
*,

View File

@@ -1,8 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
from .bad_request_error import BadRequestError
from .forbidden_error import ForbiddenError
from .not_found_error import NotFoundError
from .unauthorized_error import UnauthorizedError
from .unprocessable_entity_error import UnprocessableEntityError
__all__ = ["BadRequestError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"]
__all__ = ["BadRequestError", "NotFoundError", "UnauthorizedError", "UnprocessableEntityError"]

View File

@@ -4,6 +4,6 @@ from ..core.api_error import ApiError
import typing
class ForbiddenError(ApiError):
class UnauthorizedError(ApiError):
def __init__(self, body: typing.Optional[typing.Any]):
super().__init__(status_code=403, body=body)
super().__init__(status_code=401, body=body)

View File

@@ -180,7 +180,6 @@ from .text_prompt_block_parameters_item import (
TextPromptBlockParametersItem_Output,
TextPromptBlockParametersItem_Workflow,
)
from .totp_code import TotpCode
from .upload_to_s3block import UploadToS3Block
from .url_block import UrlBlock
from .url_block_data_schema import UrlBlockDataSchema
@@ -424,7 +423,6 @@ __all__ = [
"TextPromptBlockParametersItem_Credential",
"TextPromptBlockParametersItem_Output",
"TextPromptBlockParametersItem_Workflow",
"TotpCode",
"UploadToS3Block",
"UrlBlock",
"UrlBlockDataSchema",

View File

@@ -34,7 +34,6 @@ class ActionBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -32,24 +32,9 @@ class BrowserSessionResponse(UniversalBaseModel):
ID of the associated runnable
"""
timeout: typing.Optional[int] = pydantic.Field(default=None)
"""
Timeout in minutes for the session. Timeout is applied after the session is started.
"""
started_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
Timestamp when the session was started
"""
completed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
Timestamp when the session was completed
"""
created_at: dt.datetime = pydantic.Field()
"""
Timestamp when the session was created (the timestamp for the initial request)
Timestamp when the session was created
"""
modified_at: dt.datetime = pydantic.Field()

View File

@@ -34,7 +34,6 @@ class ExtractionBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -34,7 +34,6 @@ class FileDownloadBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -60,7 +60,6 @@ class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -131,7 +130,6 @@ class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -167,7 +165,6 @@ class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -266,7 +263,6 @@ class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -302,7 +298,6 @@ class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -338,7 +333,6 @@ class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -417,7 +411,6 @@ class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -512,7 +505,6 @@ class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -34,7 +34,6 @@ class LoginBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -34,7 +34,6 @@ class NavigationBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -34,7 +34,6 @@ class TaskBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -20,14 +20,14 @@ class TaskRunRequest(UniversalBaseModel):
The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL
"""
engine: typing.Optional[RunEngine] = pydantic.Field(default=None)
"""
The Skyvern engine version to use for this task. The default value is skyvern-2.0.
"""
title: typing.Optional[str] = pydantic.Field(default=None)
"""
The title for the task
Optional title for the task
"""
engine: typing.Optional[RunEngine] = pydantic.Field(default=None)
"""
The Skyvern engine version to use for this task
"""
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
@@ -72,12 +72,7 @@ class TaskRunRequest(UniversalBaseModel):
publish_workflow: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether to publish this task as a reusable workflow. Only available for skyvern-2.0.
"""
include_action_history_in_verification: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether to include action history when verifying that the task is complete
Whether to publish this task as a reusable workflow.
"""
if IS_PYDANTIC_V2:

View File

@@ -14,7 +14,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
class TaskRunResponse(UniversalBaseModel):
run_id: str = pydantic.Field()
"""
Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs.
Unique identifier for this run
"""
status: RunStatus = pydantic.Field()
@@ -24,7 +24,7 @@ class TaskRunResponse(UniversalBaseModel):
output: typing.Optional[TaskRunResponseOutput] = pydantic.Field(default=None)
"""
Output data from the run, if any. Format/schema depends on the data extracted by the run.
Output data from the run, if any. Format depends on the schema in the input
"""
downloaded_files: typing.Optional[typing.List[FileInfo]] = pydantic.Field(default=None)
@@ -39,7 +39,7 @@ class TaskRunResponse(UniversalBaseModel):
failure_reason: typing.Optional[str] = pydantic.Field(default=None)
"""
Reason for failure if the run failed or terminated
Reason for failure if the run failed
"""
created_at: dt.datetime = pydantic.Field()

View File

@@ -1,78 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
class TotpCode(UniversalBaseModel):
totp_identifier: str = pydantic.Field()
"""
The identifier of the TOTP code. It can be the email address, phone number, or the identifier of the user.
"""
task_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The task_id the totp code is for. It can be the task_id of the task that the TOTP code is for.
"""
workflow_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The workflow ID the TOTP code is for. It can be the workflow ID of the workflow that the TOTP code is for.
"""
workflow_run_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The workflow run id that the TOTP code is for. It can be the workflow run id of the workflow run that the TOTP code is for.
"""
source: typing.Optional[str] = pydantic.Field(default=None)
"""
An optional field. The source of the TOTP code. e.g. email, sms, etc.
"""
content: str = pydantic.Field()
"""
The content of the TOTP code. It can be the email content that contains the TOTP code, or the sms message that contains the TOTP code. Skyvern will automatically extract the TOTP code from the content.
"""
expired_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
"""
The timestamp when the TOTP code expires
"""
totp_code_id: str = pydantic.Field()
"""
The skyvern ID of the TOTP code.
"""
code: str = pydantic.Field()
"""
The TOTP code extracted from the content.
"""
organization_id: str = pydantic.Field()
"""
The ID of the organization that the TOTP code is for.
"""
created_at: dt.datetime = pydantic.Field()
"""
The timestamp when the TOTP code was created.
"""
modified_at: dt.datetime = pydantic.Field()
"""
The timestamp when the TOTP code was modified.
"""
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

View File

@@ -34,7 +34,6 @@ class UrlBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -34,7 +34,6 @@ class ValidationBlock(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -60,7 +60,6 @@ class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -131,7 +130,6 @@ class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -167,7 +165,6 @@ class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -267,7 +264,6 @@ class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -303,7 +299,6 @@ class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -339,7 +334,6 @@ class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -418,7 +412,6 @@ class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -513,7 +506,6 @@ class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel):
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
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -10,7 +10,12 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
class WorkflowRunRequest(UniversalBaseModel):
workflow_id: str = pydantic.Field()
"""
ID of the workflow to run. Workflow ID starts with `wpid_`.
ID of the workflow to run
"""
title: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional title for this workflow run
"""
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
@@ -18,11 +23,6 @@ class WorkflowRunRequest(UniversalBaseModel):
Parameters to pass to the workflow
"""
title: typing.Optional[str] = pydantic.Field(default=None)
"""
The title for this workflow run
"""
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
"""
Location of proxy to use for this workflow run
@@ -30,22 +30,22 @@ class WorkflowRunRequest(UniversalBaseModel):
webhook_url: typing.Optional[str] = pydantic.Field(default=None)
"""
URL to send workflow status updates to after a run is finished. Refer to https://docs.skyvern.com/running-tasks/webhooks-faq for webhook questions.
URL to send workflow status updates to after a run is finished
"""
totp_url: typing.Optional[str] = pydantic.Field(default=None)
"""
URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://docs.skyvern.com/running-tasks/advanced-features#get-code-from-your-endpoint
URL for TOTP authentication setup if Skyvern should be polling endpoint for 2FA codes
"""
totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
"""
Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://docs.skyvern.com/running-tasks/advanced-features#time-based-one-time-password-totp
Identifier for TOTP (Time-based One-Time Password) authentication if codes are being pushed to Skyvern
"""
browser_session_id: typing.Optional[str] = pydantic.Field(default=None)
"""
ID of a Skyvern browser session to reuse, having it continue from the current screen state
ID of an existing browser session to reuse, having it continue from the current screen state
"""
if IS_PYDANTIC_V2:

View File

@@ -14,7 +14,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
class WorkflowRunResponse(UniversalBaseModel):
run_id: str = pydantic.Field()
"""
Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs.
Unique identifier for this run
"""
status: RunStatus = pydantic.Field()
@@ -24,7 +24,7 @@ class WorkflowRunResponse(UniversalBaseModel):
output: typing.Optional[WorkflowRunResponseOutput] = pydantic.Field(default=None)
"""
Output data from the run, if any. Format/schema depends on the data extracted by the run.
Output data from the run, if any. Format depends on the schema in the input
"""
downloaded_files: typing.Optional[typing.List[FileInfo]] = pydantic.Field(default=None)
@@ -39,7 +39,7 @@ class WorkflowRunResponse(UniversalBaseModel):
failure_reason: typing.Optional[str] = pydantic.Field(default=None)
"""
Reason for failure if the run failed or terminated
Reason for failure if the run failed
"""
created_at: dt.datetime = pydantic.Field()