Release v1.0.2 (#4175)

This commit is contained in:
Stanislav Novosad
2025-12-02 20:21:25 -07:00
committed by GitHub
parent 2961fdd721
commit d9610701d3
159 changed files with 2793 additions and 2382 deletions

View File

@@ -41,6 +41,8 @@ if typing.TYPE_CHECKING:
BitwardenSensitiveInformationParameter,
BitwardenSensitiveInformationParameterYaml,
BlockType,
BranchCondition,
BranchCriteria,
BrowserProfile,
BrowserSessionResponse,
ClickAction,
@@ -60,6 +62,7 @@ if typing.TYPE_CHECKING:
CodeBlockParametersItem_Output,
CodeBlockParametersItem_Workflow,
CodeBlockYaml,
ConditionalBlock,
ContextParameter,
ContextParameterSource,
ContextParameterSource_AwsSecret,
@@ -133,6 +136,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockLoopBlocksItem,
ForLoopBlockLoopBlocksItem_Action,
ForLoopBlockLoopBlocksItem_Code,
ForLoopBlockLoopBlocksItem_Conditional,
ForLoopBlockLoopBlocksItem_DownloadToS3,
ForLoopBlockLoopBlocksItem_Extraction,
ForLoopBlockLoopBlocksItem_FileDownload,
@@ -187,6 +191,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockYamlLoopBlocksItem_UploadToS3,
ForLoopBlockYamlLoopBlocksItem_Validation,
ForLoopBlockYamlLoopBlocksItem_Wait,
GeoTarget,
GetRunResponse,
GetRunResponse_AnthropicCua,
GetRunResponse_OpenaiCua,
@@ -224,7 +229,6 @@ if typing.TYPE_CHECKING:
HumanInteractionBlockParametersItem_Output,
HumanInteractionBlockParametersItem_Workflow,
HumanInteractionBlockYaml,
ImprovePromptResponse,
InputOrSelectContext,
InputTextAction,
InputTextActionData,
@@ -309,6 +313,7 @@ if typing.TYPE_CHECKING:
TaskBlockYamlDataSchema,
TaskRunRequest,
TaskRunRequestDataExtractionSchema,
TaskRunRequestProxyLocation,
TaskRunResponse,
TaskRunResponseOutput,
TaskV2Block,
@@ -385,10 +390,12 @@ if typing.TYPE_CHECKING:
WaitBlockYaml,
Workflow,
WorkflowCreateYamlRequest,
WorkflowCreateYamlRequestProxyLocation,
WorkflowDefinition,
WorkflowDefinitionBlocksItem,
WorkflowDefinitionBlocksItem_Action,
WorkflowDefinitionBlocksItem_Code,
WorkflowDefinitionBlocksItem_Conditional,
WorkflowDefinitionBlocksItem_DownloadToS3,
WorkflowDefinitionBlocksItem_Extraction,
WorkflowDefinitionBlocksItem_FileDownload,
@@ -459,20 +466,22 @@ if typing.TYPE_CHECKING:
WorkflowParameterType,
WorkflowParameterYaml,
WorkflowParameterYamlDefaultValue,
WorkflowProxyLocation,
WorkflowRequest,
WorkflowRunBlock,
WorkflowRunBlockDataSchema,
WorkflowRunBlockNavigationPayload,
WorkflowRunBlockOutput,
WorkflowRunRequest,
WorkflowRunRequestProxyLocation,
WorkflowRunResponse,
WorkflowRunResponseOutput,
WorkflowRunTimeline,
WorkflowRunTimelineType,
WorkflowStatus,
)
from .errors import BadRequestError, ForbiddenError, NotFoundError, UnprocessableEntityError
from . import browser_profiles, prompts, scripts, workflows
from .errors import BadRequestError, ConflictError, ForbiddenError, NotFoundError, UnprocessableEntityError
from . import scripts, workflows
from .client import AsyncSkyvern, Skyvern
from .environment import SkyvernEnvironment
from .version import __version__
@@ -513,6 +522,8 @@ _dynamic_imports: typing.Dict[str, str] = {
"BitwardenSensitiveInformationParameter": ".types",
"BitwardenSensitiveInformationParameterYaml": ".types",
"BlockType": ".types",
"BranchCondition": ".types",
"BranchCriteria": ".types",
"BrowserProfile": ".types",
"BrowserSessionResponse": ".types",
"ClickAction": ".types",
@@ -532,6 +543,8 @@ _dynamic_imports: typing.Dict[str, str] = {
"CodeBlockParametersItem_Output": ".types",
"CodeBlockParametersItem_Workflow": ".types",
"CodeBlockYaml": ".types",
"ConditionalBlock": ".types",
"ConflictError": ".errors",
"ContextParameter": ".types",
"ContextParameterSource": ".types",
"ContextParameterSource_AwsSecret": ".types",
@@ -605,6 +618,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockLoopBlocksItem": ".types",
"ForLoopBlockLoopBlocksItem_Action": ".types",
"ForLoopBlockLoopBlocksItem_Code": ".types",
"ForLoopBlockLoopBlocksItem_Conditional": ".types",
"ForLoopBlockLoopBlocksItem_DownloadToS3": ".types",
"ForLoopBlockLoopBlocksItem_Extraction": ".types",
"ForLoopBlockLoopBlocksItem_FileDownload": ".types",
@@ -660,6 +674,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockYamlLoopBlocksItem_Validation": ".types",
"ForLoopBlockYamlLoopBlocksItem_Wait": ".types",
"ForbiddenError": ".errors",
"GeoTarget": ".types",
"GetRunResponse": ".types",
"GetRunResponse_AnthropicCua": ".types",
"GetRunResponse_OpenaiCua": ".types",
@@ -697,7 +712,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"HumanInteractionBlockParametersItem_Output": ".types",
"HumanInteractionBlockParametersItem_Workflow": ".types",
"HumanInteractionBlockYaml": ".types",
"ImprovePromptResponse": ".types",
"InputOrSelectContext": ".types",
"InputTextAction": ".types",
"InputTextActionData": ".types",
@@ -785,6 +799,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"TaskBlockYamlDataSchema": ".types",
"TaskRunRequest": ".types",
"TaskRunRequestDataExtractionSchema": ".types",
"TaskRunRequestProxyLocation": ".types",
"TaskRunResponse": ".types",
"TaskRunResponseOutput": ".types",
"TaskV2Block": ".types",
@@ -862,10 +877,12 @@ _dynamic_imports: typing.Dict[str, str] = {
"WaitBlockYaml": ".types",
"Workflow": ".types",
"WorkflowCreateYamlRequest": ".types",
"WorkflowCreateYamlRequestProxyLocation": ".types",
"WorkflowDefinition": ".types",
"WorkflowDefinitionBlocksItem": ".types",
"WorkflowDefinitionBlocksItem_Action": ".types",
"WorkflowDefinitionBlocksItem_Code": ".types",
"WorkflowDefinitionBlocksItem_Conditional": ".types",
"WorkflowDefinitionBlocksItem_DownloadToS3": ".types",
"WorkflowDefinitionBlocksItem_Extraction": ".types",
"WorkflowDefinitionBlocksItem_FileDownload": ".types",
@@ -936,20 +953,20 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowParameterType": ".types",
"WorkflowParameterYaml": ".types",
"WorkflowParameterYamlDefaultValue": ".types",
"WorkflowProxyLocation": ".types",
"WorkflowRequest": ".types",
"WorkflowRunBlock": ".types",
"WorkflowRunBlockDataSchema": ".types",
"WorkflowRunBlockNavigationPayload": ".types",
"WorkflowRunBlockOutput": ".types",
"WorkflowRunRequest": ".types",
"WorkflowRunRequestProxyLocation": ".types",
"WorkflowRunResponse": ".types",
"WorkflowRunResponseOutput": ".types",
"WorkflowRunTimeline": ".types",
"WorkflowRunTimelineType": ".types",
"WorkflowStatus": ".types",
"__version__": ".version",
"browser_profiles": ".browser_profiles",
"prompts": ".prompts",
"scripts": ".scripts",
"workflows": ".workflows",
}
@@ -1013,6 +1030,8 @@ __all__ = [
"BitwardenSensitiveInformationParameter",
"BitwardenSensitiveInformationParameterYaml",
"BlockType",
"BranchCondition",
"BranchCriteria",
"BrowserProfile",
"BrowserSessionResponse",
"ClickAction",
@@ -1032,6 +1051,8 @@ __all__ = [
"CodeBlockParametersItem_Output",
"CodeBlockParametersItem_Workflow",
"CodeBlockYaml",
"ConditionalBlock",
"ConflictError",
"ContextParameter",
"ContextParameterSource",
"ContextParameterSource_AwsSecret",
@@ -1105,6 +1126,7 @@ __all__ = [
"ForLoopBlockLoopBlocksItem",
"ForLoopBlockLoopBlocksItem_Action",
"ForLoopBlockLoopBlocksItem_Code",
"ForLoopBlockLoopBlocksItem_Conditional",
"ForLoopBlockLoopBlocksItem_DownloadToS3",
"ForLoopBlockLoopBlocksItem_Extraction",
"ForLoopBlockLoopBlocksItem_FileDownload",
@@ -1160,6 +1182,7 @@ __all__ = [
"ForLoopBlockYamlLoopBlocksItem_Validation",
"ForLoopBlockYamlLoopBlocksItem_Wait",
"ForbiddenError",
"GeoTarget",
"GetRunResponse",
"GetRunResponse_AnthropicCua",
"GetRunResponse_OpenaiCua",
@@ -1197,7 +1220,6 @@ __all__ = [
"HumanInteractionBlockParametersItem_Output",
"HumanInteractionBlockParametersItem_Workflow",
"HumanInteractionBlockYaml",
"ImprovePromptResponse",
"InputOrSelectContext",
"InputTextAction",
"InputTextActionData",
@@ -1285,6 +1307,7 @@ __all__ = [
"TaskBlockYamlDataSchema",
"TaskRunRequest",
"TaskRunRequestDataExtractionSchema",
"TaskRunRequestProxyLocation",
"TaskRunResponse",
"TaskRunResponseOutput",
"TaskV2Block",
@@ -1362,10 +1385,12 @@ __all__ = [
"WaitBlockYaml",
"Workflow",
"WorkflowCreateYamlRequest",
"WorkflowCreateYamlRequestProxyLocation",
"WorkflowDefinition",
"WorkflowDefinitionBlocksItem",
"WorkflowDefinitionBlocksItem_Action",
"WorkflowDefinitionBlocksItem_Code",
"WorkflowDefinitionBlocksItem_Conditional",
"WorkflowDefinitionBlocksItem_DownloadToS3",
"WorkflowDefinitionBlocksItem_Extraction",
"WorkflowDefinitionBlocksItem_FileDownload",
@@ -1436,20 +1461,20 @@ __all__ = [
"WorkflowParameterType",
"WorkflowParameterYaml",
"WorkflowParameterYamlDefaultValue",
"WorkflowProxyLocation",
"WorkflowRequest",
"WorkflowRunBlock",
"WorkflowRunBlockDataSchema",
"WorkflowRunBlockNavigationPayload",
"WorkflowRunBlockOutput",
"WorkflowRunRequest",
"WorkflowRunRequestProxyLocation",
"WorkflowRunResponse",
"WorkflowRunResponseOutput",
"WorkflowRunTimeline",
"WorkflowRunTimelineType",
"WorkflowStatus",
"__version__",
"browser_profiles",
"prompts",
"scripts",
"workflows",
]

View File

@@ -1,4 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
# isort: skip_file

View File

@@ -1,379 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.browser_profile import BrowserProfile
from .raw_client import AsyncRawBrowserProfilesClient, RawBrowserProfilesClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
class BrowserProfilesClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._raw_client = RawBrowserProfilesClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> RawBrowserProfilesClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
RawBrowserProfilesClient
"""
return self._raw_client
def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[BrowserProfile]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.List[BrowserProfile]
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.browser_profiles.list_browser_profiles(
include_deleted=True,
)
"""
_response = self._raw_client.list_browser_profiles(
include_deleted=include_deleted, request_options=request_options
)
return _response.data
def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserProfile:
"""
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.browser_profiles.create_browser_profile(
name="name",
)
"""
_response = self._raw_client.create_browser_profile(
name=name,
description=description,
browser_session_id=browser_session_id,
workflow_run_id=workflow_run_id,
request_options=request_options,
)
return _response.data
def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserProfile:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successfully retrieved browser profile
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.browser_profiles.get_browser_profile(
profile_id="bp_123456",
)
"""
_response = self._raw_client.get_browser_profile(profile_id, request_options=request_options)
return _response.data
def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> None:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
None
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.browser_profiles.delete_browser_profile(
profile_id="bp_123456",
)
"""
_response = self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
return _response.data
class AsyncBrowserProfilesClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._raw_client = AsyncRawBrowserProfilesClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> AsyncRawBrowserProfilesClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
AsyncRawBrowserProfilesClient
"""
return self._raw_client
async def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[BrowserProfile]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.List[BrowserProfile]
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.browser_profiles.list_browser_profiles(
include_deleted=True,
)
asyncio.run(main())
"""
_response = await self._raw_client.list_browser_profiles(
include_deleted=include_deleted, request_options=request_options
)
return _response.data
async def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserProfile:
"""
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.browser_profiles.create_browser_profile(
name="name",
)
asyncio.run(main())
"""
_response = await self._raw_client.create_browser_profile(
name=name,
description=description,
browser_session_id=browser_session_id,
workflow_run_id=workflow_run_id,
request_options=request_options,
)
return _response.data
async def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserProfile:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successfully retrieved browser profile
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.browser_profiles.get_browser_profile(
profile_id="bp_123456",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_browser_profile(profile_id, request_options=request_options)
return _response.data
async def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> None:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
None
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.browser_profiles.delete_browser_profile(
profile_id="bp_123456",
)
asyncio.run(main())
"""
_response = await self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
return _response.data

View File

@@ -1,507 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.http_response import AsyncHttpResponse, HttpResponse
from ..core.jsonable_encoder import jsonable_encoder
from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
from ..errors.not_found_error import NotFoundError
from ..errors.unprocessable_entity_error import UnprocessableEntityError
from ..types.browser_profile import BrowserProfile
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
class RawBrowserProfilesClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[typing.List[BrowserProfile]]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[typing.List[BrowserProfile]]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="GET",
params={
"include_deleted": include_deleted,
},
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.List[BrowserProfile],
parse_obj_as(
type_=typing.List[BrowserProfile], # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BrowserProfile]:
"""
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[BrowserProfile]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="POST",
json={
"name": name,
"description": description,
"browser_session_id": browser_session_id,
"workflow_run_id": workflow_run_id,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[BrowserProfile]:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[BrowserProfile]
Successfully retrieved browser profile
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[None]:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[None]
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="DELETE",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return HttpResponse(response=_response, data=None)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawBrowserProfilesClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[typing.List[BrowserProfile]]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[typing.List[BrowserProfile]]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="GET",
params={
"include_deleted": include_deleted,
},
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.List[BrowserProfile],
parse_obj_as(
type_=typing.List[BrowserProfile], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BrowserProfile]:
"""
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[BrowserProfile]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="POST",
json={
"name": name,
"description": description,
"browser_session_id": browser_session_id,
"workflow_run_id": workflow_run_id,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[BrowserProfile]:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[BrowserProfile]
Successfully retrieved browser profile
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[None]:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[None]
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="DELETE",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return AsyncHttpResponse(response=_response, data=None)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

View File

@@ -12,6 +12,7 @@ from .environment import SkyvernEnvironment
from .raw_client import AsyncRawSkyvern, RawSkyvern
from .types.artifact import Artifact
from .types.artifact_type import ArtifactType
from .types.browser_profile import BrowserProfile
from .types.browser_session_response import BrowserSessionResponse
from .types.create_credential_request_credential import CreateCredentialRequestCredential
from .types.create_script_response import CreateScriptResponse
@@ -26,17 +27,17 @@ from .types.script_file_create import ScriptFileCreate
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
from .types.task_run_response import TaskRunResponse
from .types.totp_code import TotpCode
from .types.workflow import Workflow
from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest
from .types.workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
from .types.workflow_run_response import WorkflowRunResponse
from .types.workflow_run_timeline import WorkflowRunTimeline
from .types.workflow_status import WorkflowStatus
if typing.TYPE_CHECKING:
from .browser_profiles.client import AsyncBrowserProfilesClient, BrowserProfilesClient
from .prompts.client import AsyncPromptsClient, PromptsClient
from .scripts.client import AsyncScriptsClient, ScriptsClient
from .workflows.client import AsyncWorkflowsClient, WorkflowsClient
# this is used as the default value for optional parameters
@@ -110,8 +111,6 @@ class Skyvern:
)
self._raw_client = RawSkyvern(client_wrapper=self._client_wrapper)
self._workflows: typing.Optional[WorkflowsClient] = None
self._browser_profiles: typing.Optional[BrowserProfilesClient] = None
self._prompts: typing.Optional[PromptsClient] = None
self._scripts: typing.Optional[ScriptsClient] = None
@property
@@ -133,7 +132,7 @@ class Skyvern:
url: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
max_steps: typing.Optional[int] = OMIT,
@@ -171,7 +170,7 @@ class Skyvern:
title : typing.Optional[str]
The title for the task
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -195,6 +194,7 @@ class Skyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
@@ -296,7 +296,7 @@ class Skyvern:
user_agent: typing.Optional[str] = None,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
totp_url: typing.Optional[str] = OMIT,
totp_identifier: typing.Optional[str] = OMIT,
@@ -329,7 +329,7 @@ class Skyvern:
title : typing.Optional[str]
The title for this workflow run
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -353,6 +353,7 @@ class Skyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
webhook_url : typing.Optional[str]
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
@@ -849,6 +850,160 @@ class Skyvern:
_response = self._raw_client.get_run_timeline(run_id, request_options=request_options)
return _response.data
def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[BrowserProfile]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.List[BrowserProfile]
Successfully retrieved browser profiles
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.list_browser_profiles(
include_deleted=True,
)
"""
_response = self._raw_client.list_browser_profiles(
include_deleted=include_deleted, request_options=request_options
)
return _response.data
def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserProfile:
"""
Create a browser profile from a persistent browser session or workflow run.
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successfully created browser profile
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.create_browser_profile(
name="name",
)
"""
_response = self._raw_client.create_browser_profile(
name=name,
description=description,
browser_session_id=browser_session_id,
workflow_run_id=workflow_run_id,
request_options=request_options,
)
return _response.data
def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserProfile:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successfully retrieved browser profile
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.get_browser_profile(
profile_id="bp_123456",
)
"""
_response = self._raw_client.get_browser_profile(profile_id, request_options=request_options)
return _response.data
def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> None:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
None
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.delete_browser_profile(
profile_id="bp_123456",
)
"""
_response = self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
return _response.data
def get_browser_sessions(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[BrowserSessionResponse]:
@@ -1600,22 +1755,6 @@ class Skyvern:
self._workflows = WorkflowsClient(client_wrapper=self._client_wrapper)
return self._workflows
@property
def browser_profiles(self):
if self._browser_profiles is None:
from .browser_profiles.client import BrowserProfilesClient # noqa: E402
self._browser_profiles = BrowserProfilesClient(client_wrapper=self._client_wrapper)
return self._browser_profiles
@property
def prompts(self):
if self._prompts is None:
from .prompts.client import PromptsClient # noqa: E402
self._prompts = PromptsClient(client_wrapper=self._client_wrapper)
return self._prompts
@property
def scripts(self):
if self._scripts is None:
@@ -1692,8 +1831,6 @@ class AsyncSkyvern:
)
self._raw_client = AsyncRawSkyvern(client_wrapper=self._client_wrapper)
self._workflows: typing.Optional[AsyncWorkflowsClient] = None
self._browser_profiles: typing.Optional[AsyncBrowserProfilesClient] = None
self._prompts: typing.Optional[AsyncPromptsClient] = None
self._scripts: typing.Optional[AsyncScriptsClient] = None
@property
@@ -1715,7 +1852,7 @@ class AsyncSkyvern:
url: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
max_steps: typing.Optional[int] = OMIT,
@@ -1753,7 +1890,7 @@ class AsyncSkyvern:
title : typing.Optional[str]
The title for the task
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -1777,6 +1914,7 @@ class AsyncSkyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
@@ -1886,7 +2024,7 @@ class AsyncSkyvern:
user_agent: typing.Optional[str] = None,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
totp_url: typing.Optional[str] = OMIT,
totp_identifier: typing.Optional[str] = OMIT,
@@ -1919,7 +2057,7 @@ class AsyncSkyvern:
title : typing.Optional[str]
The title for this workflow run
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -1943,6 +2081,7 @@ class AsyncSkyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
webhook_url : typing.Optional[str]
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
@@ -2529,6 +2668,192 @@ class AsyncSkyvern:
_response = await self._raw_client.get_run_timeline(run_id, request_options=request_options)
return _response.data
async def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[BrowserProfile]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
typing.List[BrowserProfile]
Successfully retrieved browser profiles
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.list_browser_profiles(
include_deleted=True,
)
asyncio.run(main())
"""
_response = await self._raw_client.list_browser_profiles(
include_deleted=include_deleted, request_options=request_options
)
return _response.data
async def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> BrowserProfile:
"""
Create a browser profile from a persistent browser session or workflow run.
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successfully created browser profile
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.create_browser_profile(
name="name",
)
asyncio.run(main())
"""
_response = await self._raw_client.create_browser_profile(
name=name,
description=description,
browser_session_id=browser_session_id,
workflow_run_id=workflow_run_id,
request_options=request_options,
)
return _response.data
async def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> BrowserProfile:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
BrowserProfile
Successfully retrieved browser profile
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.get_browser_profile(
profile_id="bp_123456",
)
asyncio.run(main())
"""
_response = await self._raw_client.get_browser_profile(profile_id, request_options=request_options)
return _response.data
async def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> None:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
None
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.delete_browser_profile(
profile_id="bp_123456",
)
asyncio.run(main())
"""
_response = await self._raw_client.delete_browser_profile(profile_id, request_options=request_options)
return _response.data
async def get_browser_sessions(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> typing.List[BrowserSessionResponse]:
@@ -3404,22 +3729,6 @@ class AsyncSkyvern:
self._workflows = AsyncWorkflowsClient(client_wrapper=self._client_wrapper)
return self._workflows
@property
def browser_profiles(self):
if self._browser_profiles is None:
from .browser_profiles.client import AsyncBrowserProfilesClient # noqa: E402
self._browser_profiles = AsyncBrowserProfilesClient(client_wrapper=self._client_wrapper)
return self._browser_profiles
@property
def prompts(self):
if self._prompts is None:
from .prompts.client import AsyncPromptsClient # noqa: E402
self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper)
return self._prompts
@property
def scripts(self):
if self._scripts is None:

View File

@@ -22,10 +22,10 @@ class BaseClientWrapper:
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "skyvern/1.0.0",
"User-Agent": "skyvern/1.0.2",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "skyvern",
"X-Fern-SDK-Version": "1.0.0",
"X-Fern-SDK-Version": "1.0.2",
**(self.get_custom_headers() or {}),
}
if self._api_key is not None:

View File

@@ -7,10 +7,6 @@ from typing import Any, Callable, ClassVar, Dict, List, Mapping, Optional, Set,
import pydantic
from .datetime_utils import serialize_datetime
from .serialization import convert_and_respect_annotation_metadata
from typing_extensions import TypeAlias
IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
if IS_PYDANTIC_V2:
@@ -32,6 +28,9 @@ else:
from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef]
from pydantic.typing import is_union as is_union # type: ignore[no-redef]
from .datetime_utils import serialize_datetime
from .serialization import convert_and_respect_annotation_metadata
from typing_extensions import TypeAlias
T = TypeVar("T")
Model = TypeVar("Model", bound=pydantic.BaseModel)
@@ -248,7 +247,7 @@ def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]:
def _get_field_default(field: PydanticField) -> Any:
try:
value = field.get_default() # type: ignore[union-attr]
except Exception:
except:
value = field.default
if IS_PYDANTIC_V2:
from pydantic_core import PydanticUndefined

View File

@@ -72,7 +72,7 @@ def convert_and_respect_annotation_metadata(
if (
typing_extensions.get_origin(clean_type) == typing.Dict
or typing_extensions.get_origin(clean_type) is dict
or typing_extensions.get_origin(clean_type) == dict
or clean_type == typing.Dict
) and isinstance(object_, typing.Dict):
key_type = typing_extensions.get_args(clean_type)[0]
@@ -92,7 +92,7 @@ def convert_and_respect_annotation_metadata(
if not isinstance(object_, str):
if (
typing_extensions.get_origin(clean_type) == typing.Set
or typing_extensions.get_origin(clean_type) is set
or typing_extensions.get_origin(clean_type) == set
or clean_type == typing.Set
) and isinstance(object_, typing.Set):
inner_type = typing_extensions.get_args(clean_type)[0]
@@ -108,14 +108,14 @@ def convert_and_respect_annotation_metadata(
elif (
(
typing_extensions.get_origin(clean_type) == typing.List
or typing_extensions.get_origin(clean_type) is list
or typing_extensions.get_origin(clean_type) == list
or clean_type == typing.List
)
and isinstance(object_, typing.List)
) or (
(
typing_extensions.get_origin(clean_type) == typing.Sequence
or typing_extensions.get_origin(clean_type) is collections.abc.Sequence
or typing_extensions.get_origin(clean_type) == collections.abc.Sequence
or clean_type == typing.Sequence
)
and isinstance(object_, typing.Sequence)
@@ -131,7 +131,7 @@ def convert_and_respect_annotation_metadata(
for item in object_
]
if typing_extensions.get_origin(clean_type) is typing.Union:
if typing_extensions.get_origin(clean_type) == typing.Union:
# We should be able to ~relatively~ safely try to convert keys against all
# member types in the union, the edge case here is if one member aliases a field
# of the same name to a different name from another member

View File

@@ -7,11 +7,13 @@ from importlib import import_module
if typing.TYPE_CHECKING:
from .bad_request_error import BadRequestError
from .conflict_error import ConflictError
from .forbidden_error import ForbiddenError
from .not_found_error import NotFoundError
from .unprocessable_entity_error import UnprocessableEntityError
_dynamic_imports: typing.Dict[str, str] = {
"BadRequestError": ".bad_request_error",
"ConflictError": ".conflict_error",
"ForbiddenError": ".forbidden_error",
"NotFoundError": ".not_found_error",
"UnprocessableEntityError": ".unprocessable_entity_error",
@@ -39,4 +41,4 @@ def __dir__():
return sorted(lazy_attrs)
__all__ = ["BadRequestError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"]
__all__ = ["BadRequestError", "ConflictError", "ForbiddenError", "NotFoundError", "UnprocessableEntityError"]

View File

@@ -0,0 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from ..core.api_error import ApiError
class ConflictError(ApiError):
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
super().__init__(status_code=409, headers=headers, body=body)

View File

@@ -1,4 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
# isort: skip_file

View File

@@ -1,145 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.improve_prompt_response import ImprovePromptResponse
from .raw_client import AsyncRawPromptsClient, RawPromptsClient
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
class PromptsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._raw_client = RawPromptsClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> RawPromptsClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
RawPromptsClient
"""
return self._raw_client
def improve_prompt(
self,
*,
use_case: str,
prompt: str,
context: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ImprovePromptResponse:
"""
Improve a prompt based on a specific use-case
Parameters
----------
use_case : str
The use-case for prompt improvement
prompt : str
The original prompt to improve
context : typing.Optional[str]
Additional context about the user's needs
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
ImprovePromptResponse
Successful Response
Examples
--------
from skyvern import Skyvern
client = Skyvern(
api_key="YOUR_API_KEY",
)
client.prompts.improve_prompt(
use_case="use-case",
prompt="prompt",
)
"""
_response = self._raw_client.improve_prompt(
use_case=use_case, prompt=prompt, context=context, request_options=request_options
)
return _response.data
class AsyncPromptsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._raw_client = AsyncRawPromptsClient(client_wrapper=client_wrapper)
@property
def with_raw_response(self) -> AsyncRawPromptsClient:
"""
Retrieves a raw implementation of this client that returns raw responses.
Returns
-------
AsyncRawPromptsClient
"""
return self._raw_client
async def improve_prompt(
self,
*,
use_case: str,
prompt: str,
context: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ImprovePromptResponse:
"""
Improve a prompt based on a specific use-case
Parameters
----------
use_case : str
The use-case for prompt improvement
prompt : str
The original prompt to improve
context : typing.Optional[str]
Additional context about the user's needs
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
ImprovePromptResponse
Successful Response
Examples
--------
import asyncio
from skyvern import AsyncSkyvern
client = AsyncSkyvern(
api_key="YOUR_API_KEY",
)
async def main() -> None:
await client.prompts.improve_prompt(
use_case="use-case",
prompt="prompt",
)
asyncio.run(main())
"""
_response = await self._raw_client.improve_prompt(
use_case=use_case, prompt=prompt, context=context, request_options=request_options
)
return _response.data

View File

@@ -1,169 +0,0 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.http_response import AsyncHttpResponse, HttpResponse
from ..core.pydantic_utilities import parse_obj_as
from ..core.request_options import RequestOptions
from ..errors.unprocessable_entity_error import UnprocessableEntityError
from ..types.improve_prompt_response import ImprovePromptResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
class RawPromptsClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def improve_prompt(
self,
*,
use_case: str,
prompt: str,
context: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ImprovePromptResponse]:
"""
Improve a prompt based on a specific use-case
Parameters
----------
use_case : str
The use-case for prompt improvement
prompt : str
The original prompt to improve
context : typing.Optional[str]
Additional context about the user's needs
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[ImprovePromptResponse]
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
"v1/prompts/improve",
method="POST",
params={
"use-case": use_case,
},
json={
"context": context,
"prompt": prompt,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
ImprovePromptResponse,
parse_obj_as(
type_=ImprovePromptResponse, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
class AsyncRawPromptsClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def improve_prompt(
self,
*,
use_case: str,
prompt: str,
context: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ImprovePromptResponse]:
"""
Improve a prompt based on a specific use-case
Parameters
----------
use_case : str
The use-case for prompt improvement
prompt : str
The original prompt to improve
context : typing.Optional[str]
Additional context about the user's needs
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[ImprovePromptResponse]
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/prompts/improve",
method="POST",
params={
"use-case": use_case,
},
json={
"context": context,
"prompt": prompt,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
ImprovePromptResponse,
parse_obj_as(
type_=ImprovePromptResponse, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

View File

@@ -12,11 +12,13 @@ from .core.pydantic_utilities import parse_obj_as
from .core.request_options import RequestOptions
from .core.serialization import convert_and_respect_annotation_metadata
from .errors.bad_request_error import BadRequestError
from .errors.conflict_error import ConflictError
from .errors.forbidden_error import ForbiddenError
from .errors.not_found_error import NotFoundError
from .errors.unprocessable_entity_error import UnprocessableEntityError
from .types.artifact import Artifact
from .types.artifact_type import ArtifactType
from .types.browser_profile import BrowserProfile
from .types.browser_session_response import BrowserSessionResponse
from .types.create_credential_request_credential import CreateCredentialRequestCredential
from .types.create_script_response import CreateScriptResponse
@@ -31,10 +33,12 @@ from .types.script_file_create import ScriptFileCreate
from .types.skyvern_forge_sdk_schemas_credentials_credential_type import SkyvernForgeSdkSchemasCredentialsCredentialType
from .types.skyvern_schemas_run_blocks_credential_type import SkyvernSchemasRunBlocksCredentialType
from .types.task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .types.task_run_request_proxy_location import TaskRunRequestProxyLocation
from .types.task_run_response import TaskRunResponse
from .types.totp_code import TotpCode
from .types.workflow import Workflow
from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest
from .types.workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
from .types.workflow_run_response import WorkflowRunResponse
from .types.workflow_run_timeline import WorkflowRunTimeline
from .types.workflow_status import WorkflowStatus
@@ -55,7 +59,7 @@ class RawSkyvern:
url: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
max_steps: typing.Optional[int] = OMIT,
@@ -93,7 +97,7 @@ class RawSkyvern:
title : typing.Optional[str]
The title for the task
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -117,6 +121,7 @@ class RawSkyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
@@ -181,7 +186,9 @@ class RawSkyvern:
"url": url,
"engine": engine,
"title": title,
"proxy_location": proxy_location,
"proxy_location": convert_and_respect_annotation_metadata(
object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write"
),
"data_extraction_schema": convert_and_respect_annotation_metadata(
object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
),
@@ -251,7 +258,7 @@ class RawSkyvern:
user_agent: typing.Optional[str] = None,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
totp_url: typing.Optional[str] = OMIT,
totp_identifier: typing.Optional[str] = OMIT,
@@ -284,7 +291,7 @@ class RawSkyvern:
title : typing.Optional[str]
The title for this workflow run
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -308,6 +315,7 @@ class RawSkyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
webhook_url : typing.Optional[str]
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
@@ -359,7 +367,9 @@ class RawSkyvern:
"workflow_id": workflow_id,
"parameters": parameters,
"title": title,
"proxy_location": proxy_location,
"proxy_location": convert_and_respect_annotation_metadata(
object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write"
),
"webhook_url": webhook_url,
"totp_url": totp_url,
"totp_identifier": totp_identifier,
@@ -1066,6 +1076,270 @@ class RawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[typing.List[BrowserProfile]]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[typing.List[BrowserProfile]]
Successfully retrieved browser profiles
"""
_response = self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="GET",
params={
"include_deleted": include_deleted,
},
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.List[BrowserProfile],
parse_obj_as(
type_=typing.List[BrowserProfile], # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[BrowserProfile]:
"""
Create a browser profile from a persistent browser session or workflow run.
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[BrowserProfile]
Successfully created browser profile
"""
_response = self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="POST",
json={
"name": name,
"description": description,
"browser_session_id": browser_session_id,
"workflow_run_id": workflow_run_id,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 409:
raise ConflictError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[BrowserProfile]:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[BrowserProfile]
Successfully retrieved browser profile
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return HttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[None]:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
HttpResponse[None]
"""
_response = self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="DELETE",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return HttpResponse(response=_response, data=None)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get_browser_sessions(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[typing.List[BrowserSessionResponse]]:
@@ -2176,7 +2450,7 @@ class AsyncRawSkyvern:
url: typing.Optional[str] = OMIT,
engine: typing.Optional[RunEngine] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = OMIT,
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = OMIT,
error_code_mapping: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
max_steps: typing.Optional[int] = OMIT,
@@ -2214,7 +2488,7 @@ class AsyncRawSkyvern:
title : typing.Optional[str]
The title for the task
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[TaskRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -2238,6 +2512,7 @@ class AsyncRawSkyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
data_extraction_schema : typing.Optional[TaskRunRequestDataExtractionSchema]
@@ -2302,7 +2577,9 @@ class AsyncRawSkyvern:
"url": url,
"engine": engine,
"title": title,
"proxy_location": proxy_location,
"proxy_location": convert_and_respect_annotation_metadata(
object_=proxy_location, annotation=TaskRunRequestProxyLocation, direction="write"
),
"data_extraction_schema": convert_and_respect_annotation_metadata(
object_=data_extraction_schema, annotation=TaskRunRequestDataExtractionSchema, direction="write"
),
@@ -2372,7 +2649,7 @@ class AsyncRawSkyvern:
user_agent: typing.Optional[str] = None,
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
title: typing.Optional[str] = OMIT,
proxy_location: typing.Optional[ProxyLocation] = OMIT,
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = OMIT,
webhook_url: typing.Optional[str] = OMIT,
totp_url: typing.Optional[str] = OMIT,
totp_identifier: typing.Optional[str] = OMIT,
@@ -2405,7 +2682,7 @@ class AsyncRawSkyvern:
title : typing.Optional[str]
The title for this workflow run
proxy_location : typing.Optional[ProxyLocation]
proxy_location : typing.Optional[WorkflowRunRequestProxyLocation]
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -2429,6 +2706,7 @@ class AsyncRawSkyvern:
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
webhook_url : typing.Optional[str]
URL to send workflow status updates to after a run is finished. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for webhook questions.
@@ -2480,7 +2758,9 @@ class AsyncRawSkyvern:
"workflow_id": workflow_id,
"parameters": parameters,
"title": title,
"proxy_location": proxy_location,
"proxy_location": convert_and_respect_annotation_metadata(
object_=proxy_location, annotation=WorkflowRunRequestProxyLocation, direction="write"
),
"webhook_url": webhook_url,
"totp_url": totp_url,
"totp_identifier": totp_identifier,
@@ -3187,6 +3467,270 @@ class AsyncRawSkyvern:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def list_browser_profiles(
self, *, include_deleted: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[typing.List[BrowserProfile]]:
"""
Get all browser profiles for the organization
Parameters
----------
include_deleted : typing.Optional[bool]
Include deleted browser profiles
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[typing.List[BrowserProfile]]
Successfully retrieved browser profiles
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="GET",
params={
"include_deleted": include_deleted,
},
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
typing.List[BrowserProfile],
parse_obj_as(
type_=typing.List[BrowserProfile], # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def create_browser_profile(
self,
*,
name: str,
description: typing.Optional[str] = OMIT,
browser_session_id: typing.Optional[str] = OMIT,
workflow_run_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[BrowserProfile]:
"""
Create a browser profile from a persistent browser session or workflow run.
Parameters
----------
name : str
Name for the browser profile
description : typing.Optional[str]
Optional profile description
browser_session_id : typing.Optional[str]
Persistent browser session to convert into a profile
workflow_run_id : typing.Optional[str]
Workflow run whose persisted session should be captured
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[BrowserProfile]
Successfully created browser profile
"""
_response = await self._client_wrapper.httpx_client.request(
"v1/browser_profiles",
method="POST",
json={
"name": name,
"description": description,
"browser_session_id": browser_session_id,
"workflow_run_id": workflow_run_id,
},
headers={
"content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 409:
raise ConflictError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[BrowserProfile]:
"""
Get a specific browser profile by ID
Parameters
----------
profile_id : str
The ID of the browser profile. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[BrowserProfile]
Successfully retrieved browser profile
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
BrowserProfile,
parse_obj_as(
type_=BrowserProfile, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def delete_browser_profile(
self, profile_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[None]:
"""
Delete a browser profile (soft delete)
Parameters
----------
profile_id : str
The ID of the browser profile to delete. browser_profile_id starts with `bp_`
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
AsyncHttpResponse[None]
"""
_response = await self._client_wrapper.httpx_client.request(
f"v1/browser_profiles/{jsonable_encoder(profile_id)}",
method="DELETE",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return AsyncHttpResponse(response=_response, data=None)
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
if _response.status_code == 422:
raise UnprocessableEntityError(
headers=dict(_response.headers),
body=typing.cast(
typing.Optional[typing.Any],
parse_obj_as(
type_=typing.Optional[typing.Any], # type: ignore
object_=_response.json(),
),
),
)
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get_browser_sessions(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[typing.List[BrowserSessionResponse]]:

View File

@@ -42,6 +42,8 @@ if typing.TYPE_CHECKING:
from .bitwarden_sensitive_information_parameter import BitwardenSensitiveInformationParameter
from .bitwarden_sensitive_information_parameter_yaml import BitwardenSensitiveInformationParameterYaml
from .block_type import BlockType
from .branch_condition import BranchCondition
from .branch_criteria import BranchCriteria
from .browser_profile import BrowserProfile
from .browser_session_response import BrowserSessionResponse
from .click_action import ClickAction
@@ -63,6 +65,7 @@ if typing.TYPE_CHECKING:
CodeBlockParametersItem_Workflow,
)
from .code_block_yaml import CodeBlockYaml
from .conditional_block import ConditionalBlock
from .context_parameter import ContextParameter
from .context_parameter_source import (
ContextParameterSource,
@@ -143,6 +146,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockLoopBlocksItem,
ForLoopBlockLoopBlocksItem_Action,
ForLoopBlockLoopBlocksItem_Code,
ForLoopBlockLoopBlocksItem_Conditional,
ForLoopBlockLoopBlocksItem_DownloadToS3,
ForLoopBlockLoopBlocksItem_Extraction,
ForLoopBlockLoopBlocksItem_FileDownload,
@@ -202,6 +206,7 @@ if typing.TYPE_CHECKING:
ForLoopBlockYamlLoopBlocksItem_Validation,
ForLoopBlockYamlLoopBlocksItem_Wait,
)
from .geo_target import GeoTarget
from .get_run_response import (
GetRunResponse,
GetRunResponse_AnthropicCua,
@@ -245,7 +250,6 @@ if typing.TYPE_CHECKING:
HumanInteractionBlockParametersItem_Workflow,
)
from .human_interaction_block_yaml import HumanInteractionBlockYaml
from .improve_prompt_response import ImprovePromptResponse
from .input_or_select_context import InputOrSelectContext
from .input_text_action import InputTextAction
from .input_text_action_data import InputTextActionData
@@ -338,6 +342,7 @@ if typing.TYPE_CHECKING:
from .task_block_yaml_data_schema import TaskBlockYamlDataSchema
from .task_run_request import TaskRunRequest
from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .task_run_request_proxy_location import TaskRunRequestProxyLocation
from .task_run_response import TaskRunResponse
from .task_run_response_output import TaskRunResponseOutput
from .task_v2block import TaskV2Block
@@ -422,11 +427,13 @@ if typing.TYPE_CHECKING:
from .wait_block_yaml import WaitBlockYaml
from .workflow import Workflow
from .workflow_create_yaml_request import WorkflowCreateYamlRequest
from .workflow_create_yaml_request_proxy_location import WorkflowCreateYamlRequestProxyLocation
from .workflow_definition import WorkflowDefinition
from .workflow_definition_blocks_item import (
WorkflowDefinitionBlocksItem,
WorkflowDefinitionBlocksItem_Action,
WorkflowDefinitionBlocksItem_Code,
WorkflowDefinitionBlocksItem_Conditional,
WorkflowDefinitionBlocksItem_DownloadToS3,
WorkflowDefinitionBlocksItem_Extraction,
WorkflowDefinitionBlocksItem_FileDownload,
@@ -504,12 +511,14 @@ if typing.TYPE_CHECKING:
from .workflow_parameter_type import WorkflowParameterType
from .workflow_parameter_yaml import WorkflowParameterYaml
from .workflow_parameter_yaml_default_value import WorkflowParameterYamlDefaultValue
from .workflow_proxy_location import WorkflowProxyLocation
from .workflow_request import WorkflowRequest
from .workflow_run_block import WorkflowRunBlock
from .workflow_run_block_data_schema import WorkflowRunBlockDataSchema
from .workflow_run_block_navigation_payload import WorkflowRunBlockNavigationPayload
from .workflow_run_block_output import WorkflowRunBlockOutput
from .workflow_run_request import WorkflowRunRequest
from .workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
from .workflow_run_response import WorkflowRunResponse
from .workflow_run_response_output import WorkflowRunResponseOutput
from .workflow_run_timeline import WorkflowRunTimeline
@@ -550,6 +559,8 @@ _dynamic_imports: typing.Dict[str, str] = {
"BitwardenSensitiveInformationParameter": ".bitwarden_sensitive_information_parameter",
"BitwardenSensitiveInformationParameterYaml": ".bitwarden_sensitive_information_parameter_yaml",
"BlockType": ".block_type",
"BranchCondition": ".branch_condition",
"BranchCriteria": ".branch_criteria",
"BrowserProfile": ".browser_profile",
"BrowserSessionResponse": ".browser_session_response",
"ClickAction": ".click_action",
@@ -569,6 +580,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"CodeBlockParametersItem_Output": ".code_block_parameters_item",
"CodeBlockParametersItem_Workflow": ".code_block_parameters_item",
"CodeBlockYaml": ".code_block_yaml",
"ConditionalBlock": ".conditional_block",
"ContextParameter": ".context_parameter",
"ContextParameterSource": ".context_parameter_source",
"ContextParameterSource_AwsSecret": ".context_parameter_source",
@@ -642,6 +654,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockLoopBlocksItem": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_Action": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_Code": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_Conditional": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_DownloadToS3": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_Extraction": ".for_loop_block_loop_blocks_item",
"ForLoopBlockLoopBlocksItem_FileDownload": ".for_loop_block_loop_blocks_item",
@@ -696,6 +709,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"ForLoopBlockYamlLoopBlocksItem_UploadToS3": ".for_loop_block_yaml_loop_blocks_item",
"ForLoopBlockYamlLoopBlocksItem_Validation": ".for_loop_block_yaml_loop_blocks_item",
"ForLoopBlockYamlLoopBlocksItem_Wait": ".for_loop_block_yaml_loop_blocks_item",
"GeoTarget": ".geo_target",
"GetRunResponse": ".get_run_response",
"GetRunResponse_AnthropicCua": ".get_run_response",
"GetRunResponse_OpenaiCua": ".get_run_response",
@@ -733,7 +747,6 @@ _dynamic_imports: typing.Dict[str, str] = {
"HumanInteractionBlockParametersItem_Output": ".human_interaction_block_parameters_item",
"HumanInteractionBlockParametersItem_Workflow": ".human_interaction_block_parameters_item",
"HumanInteractionBlockYaml": ".human_interaction_block_yaml",
"ImprovePromptResponse": ".improve_prompt_response",
"InputOrSelectContext": ".input_or_select_context",
"InputTextAction": ".input_text_action",
"InputTextActionData": ".input_text_action_data",
@@ -818,6 +831,7 @@ _dynamic_imports: typing.Dict[str, str] = {
"TaskBlockYamlDataSchema": ".task_block_yaml_data_schema",
"TaskRunRequest": ".task_run_request",
"TaskRunRequestDataExtractionSchema": ".task_run_request_data_extraction_schema",
"TaskRunRequestProxyLocation": ".task_run_request_proxy_location",
"TaskRunResponse": ".task_run_response",
"TaskRunResponseOutput": ".task_run_response_output",
"TaskV2Block": ".task_v2block",
@@ -894,10 +908,12 @@ _dynamic_imports: typing.Dict[str, str] = {
"WaitBlockYaml": ".wait_block_yaml",
"Workflow": ".workflow",
"WorkflowCreateYamlRequest": ".workflow_create_yaml_request",
"WorkflowCreateYamlRequestProxyLocation": ".workflow_create_yaml_request_proxy_location",
"WorkflowDefinition": ".workflow_definition",
"WorkflowDefinitionBlocksItem": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_Action": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_Code": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_Conditional": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_DownloadToS3": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_Extraction": ".workflow_definition_blocks_item",
"WorkflowDefinitionBlocksItem_FileDownload": ".workflow_definition_blocks_item",
@@ -968,12 +984,14 @@ _dynamic_imports: typing.Dict[str, str] = {
"WorkflowParameterType": ".workflow_parameter_type",
"WorkflowParameterYaml": ".workflow_parameter_yaml",
"WorkflowParameterYamlDefaultValue": ".workflow_parameter_yaml_default_value",
"WorkflowProxyLocation": ".workflow_proxy_location",
"WorkflowRequest": ".workflow_request",
"WorkflowRunBlock": ".workflow_run_block",
"WorkflowRunBlockDataSchema": ".workflow_run_block_data_schema",
"WorkflowRunBlockNavigationPayload": ".workflow_run_block_navigation_payload",
"WorkflowRunBlockOutput": ".workflow_run_block_output",
"WorkflowRunRequest": ".workflow_run_request",
"WorkflowRunRequestProxyLocation": ".workflow_run_request_proxy_location",
"WorkflowRunResponse": ".workflow_run_response",
"WorkflowRunResponseOutput": ".workflow_run_response_output",
"WorkflowRunTimeline": ".workflow_run_timeline",
@@ -1038,6 +1056,8 @@ __all__ = [
"BitwardenSensitiveInformationParameter",
"BitwardenSensitiveInformationParameterYaml",
"BlockType",
"BranchCondition",
"BranchCriteria",
"BrowserProfile",
"BrowserSessionResponse",
"ClickAction",
@@ -1057,6 +1077,7 @@ __all__ = [
"CodeBlockParametersItem_Output",
"CodeBlockParametersItem_Workflow",
"CodeBlockYaml",
"ConditionalBlock",
"ContextParameter",
"ContextParameterSource",
"ContextParameterSource_AwsSecret",
@@ -1130,6 +1151,7 @@ __all__ = [
"ForLoopBlockLoopBlocksItem",
"ForLoopBlockLoopBlocksItem_Action",
"ForLoopBlockLoopBlocksItem_Code",
"ForLoopBlockLoopBlocksItem_Conditional",
"ForLoopBlockLoopBlocksItem_DownloadToS3",
"ForLoopBlockLoopBlocksItem_Extraction",
"ForLoopBlockLoopBlocksItem_FileDownload",
@@ -1184,6 +1206,7 @@ __all__ = [
"ForLoopBlockYamlLoopBlocksItem_UploadToS3",
"ForLoopBlockYamlLoopBlocksItem_Validation",
"ForLoopBlockYamlLoopBlocksItem_Wait",
"GeoTarget",
"GetRunResponse",
"GetRunResponse_AnthropicCua",
"GetRunResponse_OpenaiCua",
@@ -1221,7 +1244,6 @@ __all__ = [
"HumanInteractionBlockParametersItem_Output",
"HumanInteractionBlockParametersItem_Workflow",
"HumanInteractionBlockYaml",
"ImprovePromptResponse",
"InputOrSelectContext",
"InputTextAction",
"InputTextActionData",
@@ -1306,6 +1328,7 @@ __all__ = [
"TaskBlockYamlDataSchema",
"TaskRunRequest",
"TaskRunRequestDataExtractionSchema",
"TaskRunRequestProxyLocation",
"TaskRunResponse",
"TaskRunResponseOutput",
"TaskV2Block",
@@ -1382,10 +1405,12 @@ __all__ = [
"WaitBlockYaml",
"Workflow",
"WorkflowCreateYamlRequest",
"WorkflowCreateYamlRequestProxyLocation",
"WorkflowDefinition",
"WorkflowDefinitionBlocksItem",
"WorkflowDefinitionBlocksItem_Action",
"WorkflowDefinitionBlocksItem_Code",
"WorkflowDefinitionBlocksItem_Conditional",
"WorkflowDefinitionBlocksItem_DownloadToS3",
"WorkflowDefinitionBlocksItem_Extraction",
"WorkflowDefinitionBlocksItem_FileDownload",
@@ -1456,12 +1481,14 @@ __all__ = [
"WorkflowParameterType",
"WorkflowParameterYaml",
"WorkflowParameterYamlDefaultValue",
"WorkflowProxyLocation",
"WorkflowRequest",
"WorkflowRunBlock",
"WorkflowRunBlockDataSchema",
"WorkflowRunBlockNavigationPayload",
"WorkflowRunBlockOutput",
"WorkflowRunRequest",
"WorkflowRunRequestProxyLocation",
"WorkflowRunResponse",
"WorkflowRunResponseOutput",
"WorkflowRunTimeline",

View File

@@ -13,7 +13,16 @@ from .run_engine import RunEngine
class ActionBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class ActionBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -8,7 +8,16 @@ from .run_engine import RunEngine
class ActionBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -22,7 +31,6 @@ class ActionBlockYaml(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
if IS_PYDANTIC_V2:

View File

@@ -7,6 +7,7 @@ BlockType = typing.Union[
"task",
"task_v2",
"for_loop",
"conditional",
"code",
"text_prompt",
"download_to_s3",

View File

@@ -0,0 +1,27 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .branch_criteria import BranchCriteria
class BranchCondition(UniversalBaseModel):
"""
Represents a single conditional branch edge within a ConditionalBlock.
"""
criteria: typing.Optional[BranchCriteria] = None
next_block_label: typing.Optional[str] = None
description: typing.Optional[str] = None
is_default: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
class Config:
frozen = True
smart_union = True
extra = pydantic.Extra.allow

View File

@@ -6,21 +6,14 @@ import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class ImprovePromptResponse(UniversalBaseModel):
error: typing.Optional[str] = pydantic.Field(default=None)
class BranchCriteria(UniversalBaseModel):
"""
Error message if prompt improvement failed
Abstract interface describing how a branch condition should be evaluated.
"""
improved: str = pydantic.Field()
"""
The improved version of the prompt
"""
original: str = pydantic.Field()
"""
The original prompt provided for improvement
"""
criteria_type: str
expression: str
description: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2

View File

@@ -11,7 +11,16 @@ from .output_parameter import OutputParameter
class CodeBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class CodeBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
code: str

View File

@@ -0,0 +1,39 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .branch_condition import BranchCondition
from .output_parameter import OutputParameter
class ConditionalBlock(UniversalBaseModel):
"""
Branching block that selects the next block label based on list-ordered conditions.
"""
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
disable_cache: typing.Optional[bool] = None
branch_conditions: typing.Optional[typing.List[BranchCondition]] = 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

View File

@@ -8,7 +8,16 @@ from .output_parameter import OutputParameter
class DownloadToS3Block(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class DownloadToS3BlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: str

View File

@@ -13,7 +13,16 @@ from .run_engine import RunEngine
class ExtractionBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class ExtractionBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -9,7 +9,16 @@ from .run_engine import RunEngine
class ExtractionBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
data_extraction_goal: str
@@ -20,7 +29,6 @@ class ExtractionBlockYaml(UniversalBaseModel):
max_retries: typing.Optional[int] = None
max_steps_per_run: typing.Optional[int] = None
parameter_keys: typing.Optional[typing.List[str]] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
if IS_PYDANTIC_V2:

View File

@@ -13,7 +13,16 @@ from .run_engine import RunEngine
class FileDownloadBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class FileDownloadBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -8,7 +8,16 @@ from .run_engine import RunEngine
class FileDownloadBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
navigation_goal: str
@@ -22,7 +31,6 @@ class FileDownloadBlockYaml(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -9,7 +9,16 @@ from .output_parameter import OutputParameter
class FileParserBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -8,7 +8,16 @@ from .file_type import FileType
class FileParserBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
file_url: str

View File

@@ -11,7 +11,16 @@ from .output_parameter import OutputParameter
class FileUploadBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -10,7 +10,16 @@ from .file_storage_type import FileStorageType
class FileUploadBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
storage_type: typing.Optional[FileStorageType] = None

View File

@@ -11,7 +11,16 @@ from .output_parameter import OutputParameter
class ForLoopBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -11,6 +11,7 @@ from ..core.serialization import FieldMetadata
from .action_block_data_schema import ActionBlockDataSchema
from .action_block_parameters_item import ActionBlockParametersItem
from .aws_secret_parameter import AwsSecretParameter
from .branch_condition import BranchCondition
from .code_block_parameters_item import CodeBlockParametersItem
from .extraction_block_data_schema import ExtractionBlockDataSchema
from .extraction_block_parameters_item import ExtractionBlockParametersItem
@@ -41,6 +42,7 @@ from .wait_block_parameters_item import WaitBlockParametersItem
class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel):
block_type: typing.Literal["action"] = "action"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -62,7 +64,6 @@ class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -80,6 +81,7 @@ class ForLoopBlockLoopBlocksItem_Action(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Code(UniversalBaseModel):
block_type: typing.Literal["code"] = "code"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -97,9 +99,30 @@ class ForLoopBlockLoopBlocksItem_Code(UniversalBaseModel):
extra = pydantic.Extra.allow
class ForLoopBlockLoopBlocksItem_Conditional(UniversalBaseModel):
block_type: typing.Literal["conditional"] = "conditional"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
disable_cache: typing.Optional[bool] = None
branch_conditions: typing.Optional[typing.List[BranchCondition]] = 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 ForLoopBlockLoopBlocksItem_DownloadToS3(UniversalBaseModel):
block_type: typing.Literal["download_to_s3"] = "download_to_s3"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -119,6 +142,7 @@ class ForLoopBlockLoopBlocksItem_DownloadToS3(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel):
block_type: typing.Literal["extraction"] = "extraction"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -140,7 +164,6 @@ class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -158,6 +181,7 @@ class ForLoopBlockLoopBlocksItem_Extraction(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel):
block_type: typing.Literal["file_download"] = "file_download"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -179,7 +203,6 @@ class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -197,6 +220,7 @@ class ForLoopBlockLoopBlocksItem_FileDownload(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_FileUpload(UniversalBaseModel):
block_type: typing.Literal["file_upload"] = "file_upload"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -224,6 +248,7 @@ class ForLoopBlockLoopBlocksItem_FileUpload(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_FileUrlParser(UniversalBaseModel):
block_type: typing.Literal["file_url_parser"] = "file_url_parser"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -245,6 +270,7 @@ class ForLoopBlockLoopBlocksItem_FileUrlParser(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_ForLoop(UniversalBaseModel):
block_type: typing.Literal["for_loop"] = "for_loop"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -270,6 +296,7 @@ from .for_loop_block import ForLoopBlock # noqa: E402, F401, I001
class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel):
block_type: typing.Literal["goto_url"] = "goto_url"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -291,7 +318,6 @@ class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -309,6 +335,7 @@ class ForLoopBlockLoopBlocksItem_GotoUrl(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_HttpRequest(UniversalBaseModel):
block_type: typing.Literal["http_request"] = "http_request"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -334,6 +361,7 @@ class ForLoopBlockLoopBlocksItem_HttpRequest(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel):
block_type: typing.Literal["human_interaction"] = "human_interaction"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -355,7 +383,6 @@ class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -381,6 +408,7 @@ class ForLoopBlockLoopBlocksItem_HumanInteraction(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel):
block_type: typing.Literal["login"] = "login"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -402,7 +430,6 @@ class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -420,6 +447,7 @@ class ForLoopBlockLoopBlocksItem_Login(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel):
block_type: typing.Literal["navigation"] = "navigation"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -441,7 +469,6 @@ class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -459,6 +486,7 @@ class ForLoopBlockLoopBlocksItem_Navigation(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_PdfParser(UniversalBaseModel):
block_type: typing.Literal["pdf_parser"] = "pdf_parser"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -479,6 +507,7 @@ class ForLoopBlockLoopBlocksItem_PdfParser(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_SendEmail(UniversalBaseModel):
block_type: typing.Literal["send_email"] = "send_email"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -506,6 +535,7 @@ class ForLoopBlockLoopBlocksItem_SendEmail(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel):
block_type: typing.Literal["task"] = "task"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -527,7 +557,6 @@ class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -545,6 +574,7 @@ class ForLoopBlockLoopBlocksItem_Task(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_TaskV2(UniversalBaseModel):
block_type: typing.Literal["task_v2"] = "task_v2"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -569,6 +599,7 @@ class ForLoopBlockLoopBlocksItem_TaskV2(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_TextPrompt(UniversalBaseModel):
block_type: typing.Literal["text_prompt"] = "text_prompt"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -591,6 +622,7 @@ class ForLoopBlockLoopBlocksItem_TextPrompt(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_UploadToS3(UniversalBaseModel):
block_type: typing.Literal["upload_to_s3"] = "upload_to_s3"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -610,6 +642,7 @@ class ForLoopBlockLoopBlocksItem_UploadToS3(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel):
block_type: typing.Literal["validation"] = "validation"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -631,7 +664,6 @@ class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -649,6 +681,7 @@ class ForLoopBlockLoopBlocksItem_Validation(UniversalBaseModel):
class ForLoopBlockLoopBlocksItem_Wait(UniversalBaseModel):
block_type: typing.Literal["wait"] = "wait"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -671,6 +704,7 @@ from .context_parameter import ContextParameter # noqa: E402, F401, I001
ForLoopBlockLoopBlocksItem = typing.Union[
ForLoopBlockLoopBlocksItem_Action,
ForLoopBlockLoopBlocksItem_Code,
ForLoopBlockLoopBlocksItem_Conditional,
ForLoopBlockLoopBlocksItem_DownloadToS3,
ForLoopBlockLoopBlocksItem_Extraction,
ForLoopBlockLoopBlocksItem_FileDownload,

View File

@@ -9,7 +9,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update
class ForLoopBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"]

View File

@@ -18,6 +18,7 @@ from .task_block_yaml_data_schema import TaskBlockYamlDataSchema
class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel):
block_type: typing.Literal["task"] = "task"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -34,7 +35,6 @@ class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
@@ -54,6 +54,7 @@ class ForLoopBlockYamlLoopBlocksItem_Task(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_ForLoop(UniversalBaseModel):
block_type: typing.Literal["for_loop"] = "for_loop"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"]
@@ -77,6 +78,7 @@ from .for_loop_block_yaml import ForLoopBlockYaml # noqa: E402, F401, I001
class ForLoopBlockYamlLoopBlocksItem_Code(UniversalBaseModel):
block_type: typing.Literal["code"] = "code"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
code: str
@@ -95,6 +97,7 @@ class ForLoopBlockYamlLoopBlocksItem_Code(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_TextPrompt(UniversalBaseModel):
block_type: typing.Literal["text_prompt"] = "text_prompt"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
llm_key: typing.Optional[str] = None
@@ -115,6 +118,7 @@ class ForLoopBlockYamlLoopBlocksItem_TextPrompt(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_DownloadToS3(UniversalBaseModel):
block_type: typing.Literal["download_to_s3"] = "download_to_s3"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: str
@@ -132,6 +136,7 @@ class ForLoopBlockYamlLoopBlocksItem_DownloadToS3(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_UploadToS3(UniversalBaseModel):
block_type: typing.Literal["upload_to_s3"] = "upload_to_s3"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
path: typing.Optional[str] = None
@@ -149,6 +154,7 @@ class ForLoopBlockYamlLoopBlocksItem_UploadToS3(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_FileUpload(UniversalBaseModel):
block_type: typing.Literal["file_upload"] = "file_upload"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
storage_type: typing.Optional[FileStorageType] = None
@@ -175,6 +181,7 @@ class ForLoopBlockYamlLoopBlocksItem_FileUpload(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_SendEmail(UniversalBaseModel):
block_type: typing.Literal["send_email"] = "send_email"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
smtp_host_secret_parameter_key: str
@@ -200,6 +207,7 @@ class ForLoopBlockYamlLoopBlocksItem_SendEmail(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_FileUrlParser(UniversalBaseModel):
block_type: typing.Literal["file_url_parser"] = "file_url_parser"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
file_url: str
@@ -219,6 +227,7 @@ class ForLoopBlockYamlLoopBlocksItem_FileUrlParser(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_Validation(UniversalBaseModel):
block_type: typing.Literal["validation"] = "validation"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
complete_criterion: typing.Optional[str] = None
@@ -240,6 +249,7 @@ class ForLoopBlockYamlLoopBlocksItem_Validation(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel):
block_type: typing.Literal["action"] = "action"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -253,7 +263,6 @@ class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
@@ -269,6 +278,7 @@ class ForLoopBlockYamlLoopBlocksItem_Action(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel):
block_type: typing.Literal["navigation"] = "navigation"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
navigation_goal: str
@@ -283,7 +293,6 @@ class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
@@ -303,6 +312,7 @@ class ForLoopBlockYamlLoopBlocksItem_Navigation(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel):
block_type: typing.Literal["extraction"] = "extraction"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
data_extraction_goal: str
@@ -313,7 +323,6 @@ class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel):
max_retries: typing.Optional[int] = None
max_steps_per_run: typing.Optional[int] = None
parameter_keys: typing.Optional[typing.List[str]] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
@@ -329,6 +338,7 @@ class ForLoopBlockYamlLoopBlocksItem_Extraction(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel):
block_type: typing.Literal["login"] = "login"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -341,7 +351,6 @@ class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel):
parameter_keys: typing.Optional[typing.List[str]] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
@@ -360,6 +369,7 @@ class ForLoopBlockYamlLoopBlocksItem_Login(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_Wait(UniversalBaseModel):
block_type: typing.Literal["wait"] = "wait"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
wait_sec: typing.Optional[int] = None
@@ -377,6 +387,7 @@ class ForLoopBlockYamlLoopBlocksItem_Wait(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_HumanInteraction(UniversalBaseModel):
block_type: typing.Literal["human_interaction"] = "human_interaction"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
instructions: typing.Optional[str] = None
@@ -401,6 +412,7 @@ class ForLoopBlockYamlLoopBlocksItem_HumanInteraction(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel):
block_type: typing.Literal["file_download"] = "file_download"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
navigation_goal: str
@@ -414,7 +426,6 @@ class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -431,6 +442,7 @@ class ForLoopBlockYamlLoopBlocksItem_FileDownload(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_GotoUrl(UniversalBaseModel):
block_type: typing.Literal["goto_url"] = "goto_url"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: str
@@ -448,6 +460,7 @@ class ForLoopBlockYamlLoopBlocksItem_GotoUrl(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_PdfParser(UniversalBaseModel):
block_type: typing.Literal["pdf_parser"] = "pdf_parser"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
file_url: str
@@ -466,6 +479,7 @@ class ForLoopBlockYamlLoopBlocksItem_PdfParser(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_TaskV2(UniversalBaseModel):
block_type: typing.Literal["task_v2"] = "task_v2"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
prompt: str
@@ -489,6 +503,7 @@ class ForLoopBlockYamlLoopBlocksItem_TaskV2(UniversalBaseModel):
class ForLoopBlockYamlLoopBlocksItem_HttpRequest(UniversalBaseModel):
block_type: typing.Literal["http_request"] = "http_request"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
method: typing.Optional[str] = None

View File

@@ -0,0 +1,46 @@
# This file was auto-generated by Fern from our API Definition.
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class GeoTarget(UniversalBaseModel):
"""
Granular geographic targeting for proxy selection.
Supports country, subdivision (state/region), and city level targeting.
Uses ISO 3166-1 alpha-2 for countries, ISO 3166-2 for subdivisions,
and GeoNames English names for cities.
Examples:
- {"country": "US"} - United States (same as RESIDENTIAL)
- {"country": "US", "subdivision": "CA"} - California, US
- {"country": "US", "subdivision": "NY", "city": "New York"} - New York City
- {"country": "GB", "city": "London"} - London, UK
"""
country: str = pydantic.Field()
"""
ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'DE')
"""
subdivision: typing.Optional[str] = pydantic.Field(default=None)
"""
ISO 3166-2 subdivision code without country prefix (e.g., 'CA' for California, 'NY' for New York)
"""
city: typing.Optional[str] = pydantic.Field(default=None)
"""
City name in English from GeoNames (e.g., 'New York', 'Los Angeles', 'London')
"""
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

@@ -11,7 +11,16 @@ from .output_parameter import OutputParameter
class HttpRequestBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class HttpRequestBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
method: typing.Optional[str] = None

View File

@@ -25,7 +25,16 @@ class HumanInteractionBlock(UniversalBaseModel):
- does not respond within the timeout period, the workflow terminates
"""
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -47,7 +56,6 @@ class HumanInteractionBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class HumanInteractionBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
instructions: typing.Optional[str] = None

View File

@@ -13,7 +13,16 @@ from .run_engine import RunEngine
class LoginBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class LoginBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -8,7 +8,16 @@ from .run_engine import RunEngine
class LoginBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -21,7 +30,6 @@ class LoginBlockYaml(UniversalBaseModel):
parameter_keys: typing.Optional[typing.List[str]] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None

View File

@@ -13,7 +13,16 @@ from .run_engine import RunEngine
class NavigationBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class NavigationBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -8,7 +8,16 @@ from .run_engine import RunEngine
class NavigationBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
navigation_goal: str
@@ -23,7 +32,6 @@ class NavigationBlockYaml(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None

View File

@@ -32,6 +32,11 @@ class NonEmptyPasswordCredential(UniversalBaseModel):
Type of 2FA method used for this credential
"""
totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
"""
Identifier (email or phone number) used to fetch TOTP codes
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

View File

@@ -22,6 +22,11 @@ class PasswordCredentialResponse(UniversalBaseModel):
Type of 2FA method used for this credential
"""
totp_identifier: typing.Optional[str] = pydantic.Field(default=None)
"""
Identifier (email or phone number) used to fetch TOTP codes
"""
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:

View File

@@ -13,7 +13,16 @@ class PdfParserBlock(UniversalBaseModel):
This block will be removed in a future version.
"""
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class PdfParserBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
file_url: str

View File

@@ -9,7 +9,16 @@ from .output_parameter import OutputParameter
class SendEmailBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class SendEmailBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
smtp_host_secret_parameter_key: str

View File

@@ -13,7 +13,16 @@ from .task_block_parameters_item import TaskBlockParametersItem
class TaskBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class TaskBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -9,7 +9,16 @@ from .task_block_yaml_data_schema import TaskBlockYamlDataSchema
class TaskBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -26,7 +35,6 @@ class TaskBlockYaml(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None

View File

@@ -4,9 +4,9 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .proxy_location import ProxyLocation
from .run_engine import RunEngine
from .task_run_request_data_extraction_schema import TaskRunRequestDataExtractionSchema
from .task_run_request_proxy_location import TaskRunRequestProxyLocation
class TaskRunRequest(UniversalBaseModel):
@@ -33,7 +33,7 @@ class TaskRunRequest(UniversalBaseModel):
The title for the task
"""
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
proxy_location: typing.Optional[TaskRunRequestProxyLocation] = pydantic.Field(default=None)
"""
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -58,6 +58,7 @@ class TaskRunRequest(UniversalBaseModel):
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
"""
data_extraction_schema: typing.Optional[TaskRunRequestDataExtractionSchema] = pydantic.Field(default=None)

View File

@@ -0,0 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
TaskRunRequestProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]]

View File

@@ -8,7 +8,16 @@ from .output_parameter import OutputParameter
class TaskV2Block(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class TaskV2BlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
prompt: str

View File

@@ -11,7 +11,16 @@ from .text_prompt_block_parameters_item import TextPromptBlockParametersItem
class TextPromptBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class TextPromptBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
llm_key: typing.Optional[str] = None

View File

@@ -8,7 +8,16 @@ from .output_parameter import OutputParameter
class UploadToS3Block(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class UploadToS3BlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
path: typing.Optional[str] = None

View File

@@ -13,7 +13,16 @@ from .url_block_parameters_item import UrlBlockParametersItem
class UrlBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class UrlBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class UrlBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: str

View File

@@ -13,7 +13,16 @@ from .validation_block_parameters_item import ValidationBlockParametersItem
class ValidationBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -35,7 +44,6 @@ class ValidationBlock(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class ValidationBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
complete_criterion: typing.Optional[str] = None

View File

@@ -11,7 +11,16 @@ from .wait_block_parameters_item import WaitBlockParametersItem
class WaitBlock(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier for a block; unique within a workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the next block label when constructing a DAG. Defaults to sequential order when omitted.
"""
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None

View File

@@ -7,7 +7,16 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
class WaitBlockYaml(UniversalBaseModel):
label: str
label: str = pydantic.Field()
"""
Author-facing identifier; must be unique per workflow.
"""
next_block_label: typing.Optional[str] = pydantic.Field(default=None)
"""
Optional pointer to the label of the next block. When omitted, it will default to sequential order. See [[s-4bnl]].
"""
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
wait_sec: typing.Optional[int] = None

View File

@@ -7,8 +7,8 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from .proxy_location import ProxyLocation
from .workflow_definition import WorkflowDefinition
from .workflow_proxy_location import WorkflowProxyLocation
from .workflow_status import WorkflowStatus
@@ -21,7 +21,7 @@ class Workflow(UniversalBaseModel):
is_saved_task: bool
description: typing.Optional[str] = None
workflow_definition: WorkflowDefinition
proxy_location: typing.Optional[ProxyLocation] = None
proxy_location: typing.Optional[WorkflowProxyLocation] = None
webhook_callback_url: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None

View File

@@ -6,7 +6,7 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from .proxy_location import ProxyLocation
from .workflow_create_yaml_request_proxy_location import WorkflowCreateYamlRequestProxyLocation
from .workflow_definition_yaml import WorkflowDefinitionYaml
from .workflow_status import WorkflowStatus
@@ -14,7 +14,7 @@ from .workflow_status import WorkflowStatus
class WorkflowCreateYamlRequest(UniversalBaseModel):
title: str
description: typing.Optional[str] = None
proxy_location: typing.Optional[ProxyLocation] = None
proxy_location: typing.Optional[WorkflowCreateYamlRequestProxyLocation] = None
webhook_callback_url: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None

View File

@@ -0,0 +1,10 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
WorkflowCreateYamlRequestProxyLocation = typing.Union[
ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]
]

View File

@@ -11,6 +11,7 @@ from .workflow_definition_parameters_item import WorkflowDefinitionParametersIte
class WorkflowDefinition(UniversalBaseModel):
version: typing.Optional[int] = None
parameters: typing.List[WorkflowDefinitionParametersItem]
blocks: typing.List[WorkflowDefinitionBlocksItem]

View File

@@ -11,6 +11,7 @@ from ..core.serialization import FieldMetadata
from .action_block_data_schema import ActionBlockDataSchema
from .action_block_parameters_item import ActionBlockParametersItem
from .aws_secret_parameter import AwsSecretParameter
from .branch_condition import BranchCondition
from .code_block_parameters_item import CodeBlockParametersItem
from .extraction_block_data_schema import ExtractionBlockDataSchema
from .extraction_block_parameters_item import ExtractionBlockParametersItem
@@ -41,6 +42,7 @@ from .wait_block_parameters_item import WaitBlockParametersItem
class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel):
block_type: typing.Literal["action"] = "action"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -62,7 +64,6 @@ class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -80,6 +81,7 @@ class WorkflowDefinitionBlocksItem_Action(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Code(UniversalBaseModel):
block_type: typing.Literal["code"] = "code"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -97,9 +99,30 @@ class WorkflowDefinitionBlocksItem_Code(UniversalBaseModel):
extra = pydantic.Extra.allow
class WorkflowDefinitionBlocksItem_Conditional(UniversalBaseModel):
block_type: typing.Literal["conditional"] = "conditional"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
disable_cache: typing.Optional[bool] = None
branch_conditions: typing.Optional[typing.List[BranchCondition]] = 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 WorkflowDefinitionBlocksItem_DownloadToS3(UniversalBaseModel):
block_type: typing.Literal["download_to_s3"] = "download_to_s3"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -119,6 +142,7 @@ class WorkflowDefinitionBlocksItem_DownloadToS3(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel):
block_type: typing.Literal["extraction"] = "extraction"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -140,7 +164,6 @@ class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -158,6 +181,7 @@ class WorkflowDefinitionBlocksItem_Extraction(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel):
block_type: typing.Literal["file_download"] = "file_download"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -179,7 +203,6 @@ class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -197,6 +220,7 @@ class WorkflowDefinitionBlocksItem_FileDownload(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_FileUpload(UniversalBaseModel):
block_type: typing.Literal["file_upload"] = "file_upload"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -224,6 +248,7 @@ class WorkflowDefinitionBlocksItem_FileUpload(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_FileUrlParser(UniversalBaseModel):
block_type: typing.Literal["file_url_parser"] = "file_url_parser"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -245,6 +270,7 @@ class WorkflowDefinitionBlocksItem_FileUrlParser(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_ForLoop(UniversalBaseModel):
block_type: typing.Literal["for_loop"] = "for_loop"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -271,6 +297,7 @@ from .for_loop_block_loop_blocks_item import ForLoopBlockLoopBlocksItem # noqa:
class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel):
block_type: typing.Literal["goto_url"] = "goto_url"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -292,7 +319,6 @@ class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -310,6 +336,7 @@ class WorkflowDefinitionBlocksItem_GotoUrl(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_HttpRequest(UniversalBaseModel):
block_type: typing.Literal["http_request"] = "http_request"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -335,6 +362,7 @@ class WorkflowDefinitionBlocksItem_HttpRequest(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel):
block_type: typing.Literal["human_interaction"] = "human_interaction"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -356,7 +384,6 @@ class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -382,6 +409,7 @@ class WorkflowDefinitionBlocksItem_HumanInteraction(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel):
block_type: typing.Literal["login"] = "login"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -403,7 +431,6 @@ class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -421,6 +448,7 @@ class WorkflowDefinitionBlocksItem_Login(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel):
block_type: typing.Literal["navigation"] = "navigation"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -442,7 +470,6 @@ class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -460,6 +487,7 @@ class WorkflowDefinitionBlocksItem_Navigation(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_PdfParser(UniversalBaseModel):
block_type: typing.Literal["pdf_parser"] = "pdf_parser"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -480,6 +508,7 @@ class WorkflowDefinitionBlocksItem_PdfParser(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_SendEmail(UniversalBaseModel):
block_type: typing.Literal["send_email"] = "send_email"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -507,6 +536,7 @@ class WorkflowDefinitionBlocksItem_SendEmail(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel):
block_type: typing.Literal["task"] = "task"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -528,7 +558,6 @@ class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -546,6 +575,7 @@ class WorkflowDefinitionBlocksItem_Task(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_TaskV2(UniversalBaseModel):
block_type: typing.Literal["task_v2"] = "task_v2"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -570,6 +600,7 @@ class WorkflowDefinitionBlocksItem_TaskV2(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_TextPrompt(UniversalBaseModel):
block_type: typing.Literal["text_prompt"] = "text_prompt"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -592,6 +623,7 @@ class WorkflowDefinitionBlocksItem_TextPrompt(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_UploadToS3(UniversalBaseModel):
block_type: typing.Literal["upload_to_s3"] = "upload_to_s3"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -611,6 +643,7 @@ class WorkflowDefinitionBlocksItem_UploadToS3(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel):
block_type: typing.Literal["validation"] = "validation"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -632,7 +665,6 @@ class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
complete_verification: typing.Optional[bool] = None
include_action_history_in_verification: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -650,6 +682,7 @@ class WorkflowDefinitionBlocksItem_Validation(UniversalBaseModel):
class WorkflowDefinitionBlocksItem_Wait(UniversalBaseModel):
block_type: typing.Literal["wait"] = "wait"
label: str
next_block_label: typing.Optional[str] = None
output_parameter: OutputParameter
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
@@ -672,6 +705,7 @@ from .context_parameter import ContextParameter # noqa: E402, F401, I001
WorkflowDefinitionBlocksItem = typing.Union[
WorkflowDefinitionBlocksItem_Action,
WorkflowDefinitionBlocksItem_Code,
WorkflowDefinitionBlocksItem_Conditional,
WorkflowDefinitionBlocksItem_DownloadToS3,
WorkflowDefinitionBlocksItem_Extraction,
WorkflowDefinitionBlocksItem_FileDownload,

View File

@@ -11,6 +11,7 @@ from .workflow_definition_yaml_parameters_item import WorkflowDefinitionYamlPara
class WorkflowDefinitionYaml(UniversalBaseModel):
version: typing.Optional[int] = None
parameters: typing.List[WorkflowDefinitionYamlParametersItem]
blocks: typing.List[WorkflowDefinitionYamlBlocksItem]

View File

@@ -18,6 +18,7 @@ from .task_block_yaml_data_schema import TaskBlockYamlDataSchema
class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel):
block_type: typing.Literal["action"] = "action"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -31,7 +32,6 @@ class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
@@ -47,6 +47,7 @@ class WorkflowDefinitionYamlBlocksItem_Action(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Code(UniversalBaseModel):
block_type: typing.Literal["code"] = "code"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
code: str
@@ -65,6 +66,7 @@ class WorkflowDefinitionYamlBlocksItem_Code(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_DownloadToS3(UniversalBaseModel):
block_type: typing.Literal["download_to_s3"] = "download_to_s3"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: str
@@ -82,6 +84,7 @@ class WorkflowDefinitionYamlBlocksItem_DownloadToS3(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel):
block_type: typing.Literal["extraction"] = "extraction"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
data_extraction_goal: str
@@ -92,7 +95,6 @@ class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel):
max_retries: typing.Optional[int] = None
max_steps_per_run: typing.Optional[int] = None
parameter_keys: typing.Optional[typing.List[str]] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
@@ -108,6 +110,7 @@ class WorkflowDefinitionYamlBlocksItem_Extraction(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel):
block_type: typing.Literal["file_download"] = "file_download"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
navigation_goal: str
@@ -121,7 +124,6 @@ class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
download_timeout: typing.Optional[float] = None
@@ -138,6 +140,7 @@ class WorkflowDefinitionYamlBlocksItem_FileDownload(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_FileUpload(UniversalBaseModel):
block_type: typing.Literal["file_upload"] = "file_upload"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
storage_type: typing.Optional[FileStorageType] = None
@@ -164,6 +167,7 @@ class WorkflowDefinitionYamlBlocksItem_FileUpload(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_FileUrlParser(UniversalBaseModel):
block_type: typing.Literal["file_url_parser"] = "file_url_parser"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
file_url: str
@@ -183,6 +187,7 @@ class WorkflowDefinitionYamlBlocksItem_FileUrlParser(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_ForLoop(UniversalBaseModel):
block_type: typing.Literal["for_loop"] = "for_loop"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
loop_blocks: typing.List["ForLoopBlockYamlLoopBlocksItem"]
@@ -207,6 +212,7 @@ from .for_loop_block_yaml_loop_blocks_item import ForLoopBlockYamlLoopBlocksItem
class WorkflowDefinitionYamlBlocksItem_GotoUrl(UniversalBaseModel):
block_type: typing.Literal["goto_url"] = "goto_url"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: str
@@ -224,6 +230,7 @@ class WorkflowDefinitionYamlBlocksItem_GotoUrl(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_HttpRequest(UniversalBaseModel):
block_type: typing.Literal["http_request"] = "http_request"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
method: typing.Optional[str] = None
@@ -247,6 +254,7 @@ class WorkflowDefinitionYamlBlocksItem_HttpRequest(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_HumanInteraction(UniversalBaseModel):
block_type: typing.Literal["human_interaction"] = "human_interaction"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
instructions: typing.Optional[str] = None
@@ -271,6 +279,7 @@ class WorkflowDefinitionYamlBlocksItem_HumanInteraction(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel):
block_type: typing.Literal["login"] = "login"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -283,7 +292,6 @@ class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel):
parameter_keys: typing.Optional[typing.List[str]] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
@@ -302,6 +310,7 @@ class WorkflowDefinitionYamlBlocksItem_Login(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel):
block_type: typing.Literal["navigation"] = "navigation"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
navigation_goal: str
@@ -316,7 +325,6 @@ class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
@@ -336,6 +344,7 @@ class WorkflowDefinitionYamlBlocksItem_Navigation(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_PdfParser(UniversalBaseModel):
block_type: typing.Literal["pdf_parser"] = "pdf_parser"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
file_url: str
@@ -354,6 +363,7 @@ class WorkflowDefinitionYamlBlocksItem_PdfParser(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_SendEmail(UniversalBaseModel):
block_type: typing.Literal["send_email"] = "send_email"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
smtp_host_secret_parameter_key: str
@@ -379,6 +389,7 @@ class WorkflowDefinitionYamlBlocksItem_SendEmail(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel):
block_type: typing.Literal["task"] = "task"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
url: typing.Optional[str] = None
@@ -395,7 +406,6 @@ class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel):
download_suffix: typing.Optional[str] = None
totp_verification_url: typing.Optional[str] = None
totp_identifier: typing.Optional[str] = None
cache_actions: typing.Optional[bool] = None
disable_cache: typing.Optional[bool] = None
complete_criterion: typing.Optional[str] = None
terminate_criterion: typing.Optional[str] = None
@@ -415,6 +425,7 @@ class WorkflowDefinitionYamlBlocksItem_Task(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_TaskV2(UniversalBaseModel):
block_type: typing.Literal["task_v2"] = "task_v2"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
prompt: str
@@ -438,6 +449,7 @@ class WorkflowDefinitionYamlBlocksItem_TaskV2(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_TextPrompt(UniversalBaseModel):
block_type: typing.Literal["text_prompt"] = "text_prompt"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
llm_key: typing.Optional[str] = None
@@ -458,6 +470,7 @@ class WorkflowDefinitionYamlBlocksItem_TextPrompt(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_UploadToS3(UniversalBaseModel):
block_type: typing.Literal["upload_to_s3"] = "upload_to_s3"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
path: typing.Optional[str] = None
@@ -475,6 +488,7 @@ class WorkflowDefinitionYamlBlocksItem_UploadToS3(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Validation(UniversalBaseModel):
block_type: typing.Literal["validation"] = "validation"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
complete_criterion: typing.Optional[str] = None
@@ -496,6 +510,7 @@ class WorkflowDefinitionYamlBlocksItem_Validation(UniversalBaseModel):
class WorkflowDefinitionYamlBlocksItem_Wait(UniversalBaseModel):
block_type: typing.Literal["wait"] = "wait"
label: str
next_block_label: typing.Optional[str] = None
continue_on_failure: typing.Optional[bool] = None
model: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
wait_sec: typing.Optional[int] = None

View File

@@ -0,0 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
WorkflowProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]]

View File

@@ -4,7 +4,7 @@ import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .proxy_location import ProxyLocation
from .workflow_run_request_proxy_location import WorkflowRunRequestProxyLocation
class WorkflowRunRequest(UniversalBaseModel):
@@ -23,7 +23,7 @@ class WorkflowRunRequest(UniversalBaseModel):
The title for this workflow run
"""
proxy_location: typing.Optional[ProxyLocation] = pydantic.Field(default=None)
proxy_location: typing.Optional[WorkflowRunRequestProxyLocation] = pydantic.Field(default=None)
"""
Geographic Proxy location to route the browser traffic through. This is only available in Skyvern Cloud.
@@ -48,6 +48,7 @@ class WorkflowRunRequest(UniversalBaseModel):
- US-FL: Florida
- US-WA: Washington
- NONE: No proxy
Can also be a GeoTarget object for granular city/state targeting: {"country": "US", "subdivision": "CA", "city": "San Francisco"}
"""
webhook_url: typing.Optional[str] = pydantic.Field(default=None)

View File

@@ -0,0 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
import typing
from .geo_target import GeoTarget
from .proxy_location import ProxyLocation
WorkflowRunRequestProxyLocation = typing.Union[ProxyLocation, GeoTarget, typing.Dict[str, typing.Optional[typing.Any]]]