SDK: support select_option and extract (#3850)
This commit is contained in:
committed by
GitHub
parent
ac069838c7
commit
af9a5f31e4
@@ -265,6 +265,7 @@ if typing.TYPE_CHECKING:
|
||||
ProxyLocation,
|
||||
RunEngine,
|
||||
RunSdkActionResponse,
|
||||
RunSdkActionResponseResult,
|
||||
RunStatus,
|
||||
Script,
|
||||
ScriptFileCreate,
|
||||
@@ -727,6 +728,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
||||
"ProxyLocation": ".types",
|
||||
"RunEngine": ".types",
|
||||
"RunSdkActionResponse": ".types",
|
||||
"RunSdkActionResponseResult": ".types",
|
||||
"RunStatus": ".types",
|
||||
"Script": ".types",
|
||||
"ScriptFileCreate": ".types",
|
||||
@@ -1212,6 +1214,7 @@ __all__ = [
|
||||
"ProxyLocation",
|
||||
"RunEngine",
|
||||
"RunSdkActionResponse",
|
||||
"RunSdkActionResponseResult",
|
||||
"RunStatus",
|
||||
"Script",
|
||||
"ScriptFileCreate",
|
||||
|
||||
@@ -2146,6 +2146,17 @@ class RawSkyvern:
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 404:
|
||||
raise NotFoundError(
|
||||
headers=dict(_response.headers),
|
||||
body=typing.cast(
|
||||
typing.Optional[typing.Any],
|
||||
parse_obj_as(
|
||||
type_=typing.Optional[typing.Any], # type: ignore
|
||||
object_=_response.json(),
|
||||
),
|
||||
),
|
||||
)
|
||||
if _response.status_code == 422:
|
||||
raise UnprocessableEntityError(
|
||||
headers=dict(_response.headers),
|
||||
@@ -4267,6 +4278,17 @@ class AsyncRawSkyvern:
|
||||
),
|
||||
),
|
||||
)
|
||||
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),
|
||||
|
||||
@@ -290,6 +290,7 @@ if typing.TYPE_CHECKING:
|
||||
from .proxy_location import ProxyLocation
|
||||
from .run_engine import RunEngine
|
||||
from .run_sdk_action_response import RunSdkActionResponse
|
||||
from .run_sdk_action_response_result import RunSdkActionResponseResult
|
||||
from .run_status import RunStatus
|
||||
from .script import Script
|
||||
from .script_file_create import ScriptFileCreate
|
||||
@@ -762,6 +763,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
||||
"ProxyLocation": ".proxy_location",
|
||||
"RunEngine": ".run_engine",
|
||||
"RunSdkActionResponse": ".run_sdk_action_response",
|
||||
"RunSdkActionResponseResult": ".run_sdk_action_response_result",
|
||||
"RunStatus": ".run_status",
|
||||
"Script": ".script",
|
||||
"ScriptFileCreate": ".script_file_create",
|
||||
@@ -1238,6 +1240,7 @@ __all__ = [
|
||||
"ProxyLocation",
|
||||
"RunEngine",
|
||||
"RunSdkActionResponse",
|
||||
"RunSdkActionResponseResult",
|
||||
"RunStatus",
|
||||
"Script",
|
||||
"ScriptFileCreate",
|
||||
|
||||
@@ -4,6 +4,7 @@ import typing
|
||||
|
||||
import pydantic
|
||||
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
||||
from .run_sdk_action_response_result import RunSdkActionResponseResult
|
||||
|
||||
|
||||
class RunSdkActionResponse(UniversalBaseModel):
|
||||
@@ -12,7 +13,7 @@ class RunSdkActionResponse(UniversalBaseModel):
|
||||
The workflow run ID used for this action
|
||||
"""
|
||||
|
||||
result: typing.Optional[typing.Optional[typing.Any]] = pydantic.Field(default=None)
|
||||
result: typing.Optional[RunSdkActionResponseResult] = pydantic.Field(default=None)
|
||||
"""
|
||||
The result from the action (e.g., selector, value, extracted data)
|
||||
"""
|
||||
|
||||
7
skyvern/client/types/run_sdk_action_response_result.py
Normal file
7
skyvern/client/types/run_sdk_action_response_result.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file was auto-generated by Fern from our API Definition.
|
||||
|
||||
import typing
|
||||
|
||||
RunSdkActionResponseResult = typing.Union[
|
||||
str, typing.Dict[str, typing.Optional[typing.Any]], typing.List[typing.Optional[typing.Any]], float, bool
|
||||
]
|
||||
Reference in New Issue
Block a user