Regenerate Fern Python SDK (#3928)
This commit is contained in:
committed by
GitHub
parent
3c4df39fee
commit
8482ff4a75
@@ -24,10 +24,10 @@ from .types.credential_response import CredentialResponse
|
||||
from .types.get_run_response import GetRunResponse
|
||||
from .types.proxy_location import ProxyLocation
|
||||
from .types.run_engine import RunEngine
|
||||
from .types.run_sdk_action_request_action import RunSdkActionRequestAction
|
||||
from .types.run_sdk_action_response import RunSdkActionResponse
|
||||
from .types.script import Script
|
||||
from .types.script_file_create import ScriptFileCreate
|
||||
from .types.sdk_action import SdkAction
|
||||
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
|
||||
@@ -37,6 +37,7 @@ from .types.workflow import Workflow
|
||||
from .types.workflow_create_yaml_request import WorkflowCreateYamlRequest
|
||||
from .types.workflow_run_response import WorkflowRunResponse
|
||||
from .types.workflow_run_timeline import WorkflowRunTimeline
|
||||
from .types.workflow_status import WorkflowStatus
|
||||
|
||||
# this is used as the default value for optional parameters
|
||||
OMIT = typing.cast(typing.Any, ...)
|
||||
@@ -532,6 +533,8 @@ class RawSkyvern:
|
||||
only_workflows: typing.Optional[bool] = None,
|
||||
search_key: typing.Optional[str] = None,
|
||||
title: typing.Optional[str] = None,
|
||||
folder_id: typing.Optional[str] = None,
|
||||
status: typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]] = None,
|
||||
template: typing.Optional[bool] = None,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> HttpResponse[typing.List[Workflow]]:
|
||||
@@ -539,8 +542,8 @@ class RawSkyvern:
|
||||
Get all workflows with the latest version for the organization.
|
||||
|
||||
Search semantics:
|
||||
- If `search_key` is provided, its value is used as a unified search term for both
|
||||
`workflows.title` and workflow parameter metadata (key, description, and default_value for
|
||||
- If `search_key` is provided, its value is used as a unified search term for
|
||||
`workflows.title`, `folders.title`, and workflow parameter metadata (key, description, and default_value for
|
||||
`WorkflowParameterModel`).
|
||||
- Falls back to deprecated `title` (title-only search) if `search_key` is not provided.
|
||||
- Parameter metadata search excludes soft-deleted parameter rows across all parameter tables.
|
||||
@@ -556,11 +559,16 @@ class RawSkyvern:
|
||||
only_workflows : typing.Optional[bool]
|
||||
|
||||
search_key : typing.Optional[str]
|
||||
Unified search across workflow title and parameter metadata (key, description, default_value).
|
||||
Unified search across workflow title, folder name, and parameter metadata (key, description, default_value).
|
||||
|
||||
title : typing.Optional[str]
|
||||
Deprecated: use search_key instead.
|
||||
|
||||
folder_id : typing.Optional[str]
|
||||
Filter workflows by folder ID
|
||||
|
||||
status : typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]]
|
||||
|
||||
template : typing.Optional[bool]
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
@@ -581,6 +589,8 @@ class RawSkyvern:
|
||||
"only_workflows": only_workflows,
|
||||
"search_key": search_key,
|
||||
"title": title,
|
||||
"folder_id": folder_id,
|
||||
"status": status,
|
||||
"template": template,
|
||||
},
|
||||
request_options=request_options,
|
||||
@@ -2058,8 +2068,7 @@ class RawSkyvern:
|
||||
self,
|
||||
*,
|
||||
url: str,
|
||||
action: SdkAction,
|
||||
user_agent: typing.Optional[str] = None,
|
||||
action: RunSdkActionRequestAction,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
browser_address: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
@@ -2073,11 +2082,9 @@ class RawSkyvern:
|
||||
url : str
|
||||
The URL where the action should be executed
|
||||
|
||||
action : SdkAction
|
||||
action : RunSdkActionRequestAction
|
||||
The action to execute with its specific parameters
|
||||
|
||||
user_agent : typing.Optional[str]
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
The browser session ID
|
||||
|
||||
@@ -2093,7 +2100,7 @@ class RawSkyvern:
|
||||
Returns
|
||||
-------
|
||||
HttpResponse[RunSdkActionResponse]
|
||||
Successfully executed SDK action
|
||||
Successful Response
|
||||
"""
|
||||
_response = self._client_wrapper.httpx_client.request(
|
||||
"v1/sdk/run_action",
|
||||
@@ -2104,12 +2111,11 @@ class RawSkyvern:
|
||||
"browser_address": browser_address,
|
||||
"workflow_run_id": workflow_run_id,
|
||||
"action": convert_and_respect_annotation_metadata(
|
||||
object_=action, annotation=SdkAction, direction="write"
|
||||
object_=action, annotation=RunSdkActionRequestAction, direction="write"
|
||||
),
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
"x-user-agent": str(user_agent) if user_agent is not None else None,
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
@@ -2124,39 +2130,6 @@ class RawSkyvern:
|
||||
),
|
||||
)
|
||||
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 == 403:
|
||||
raise ForbiddenError(
|
||||
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 == 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),
|
||||
@@ -2664,6 +2637,8 @@ class AsyncRawSkyvern:
|
||||
only_workflows: typing.Optional[bool] = None,
|
||||
search_key: typing.Optional[str] = None,
|
||||
title: typing.Optional[str] = None,
|
||||
folder_id: typing.Optional[str] = None,
|
||||
status: typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]] = None,
|
||||
template: typing.Optional[bool] = None,
|
||||
request_options: typing.Optional[RequestOptions] = None,
|
||||
) -> AsyncHttpResponse[typing.List[Workflow]]:
|
||||
@@ -2671,8 +2646,8 @@ class AsyncRawSkyvern:
|
||||
Get all workflows with the latest version for the organization.
|
||||
|
||||
Search semantics:
|
||||
- If `search_key` is provided, its value is used as a unified search term for both
|
||||
`workflows.title` and workflow parameter metadata (key, description, and default_value for
|
||||
- If `search_key` is provided, its value is used as a unified search term for
|
||||
`workflows.title`, `folders.title`, and workflow parameter metadata (key, description, and default_value for
|
||||
`WorkflowParameterModel`).
|
||||
- Falls back to deprecated `title` (title-only search) if `search_key` is not provided.
|
||||
- Parameter metadata search excludes soft-deleted parameter rows across all parameter tables.
|
||||
@@ -2688,11 +2663,16 @@ class AsyncRawSkyvern:
|
||||
only_workflows : typing.Optional[bool]
|
||||
|
||||
search_key : typing.Optional[str]
|
||||
Unified search across workflow title and parameter metadata (key, description, default_value).
|
||||
Unified search across workflow title, folder name, and parameter metadata (key, description, default_value).
|
||||
|
||||
title : typing.Optional[str]
|
||||
Deprecated: use search_key instead.
|
||||
|
||||
folder_id : typing.Optional[str]
|
||||
Filter workflows by folder ID
|
||||
|
||||
status : typing.Optional[typing.Union[WorkflowStatus, typing.Sequence[WorkflowStatus]]]
|
||||
|
||||
template : typing.Optional[bool]
|
||||
|
||||
request_options : typing.Optional[RequestOptions]
|
||||
@@ -2713,6 +2693,8 @@ class AsyncRawSkyvern:
|
||||
"only_workflows": only_workflows,
|
||||
"search_key": search_key,
|
||||
"title": title,
|
||||
"folder_id": folder_id,
|
||||
"status": status,
|
||||
"template": template,
|
||||
},
|
||||
request_options=request_options,
|
||||
@@ -4190,8 +4172,7 @@ class AsyncRawSkyvern:
|
||||
self,
|
||||
*,
|
||||
url: str,
|
||||
action: SdkAction,
|
||||
user_agent: typing.Optional[str] = None,
|
||||
action: RunSdkActionRequestAction,
|
||||
browser_session_id: typing.Optional[str] = OMIT,
|
||||
browser_address: typing.Optional[str] = OMIT,
|
||||
workflow_run_id: typing.Optional[str] = OMIT,
|
||||
@@ -4205,11 +4186,9 @@ class AsyncRawSkyvern:
|
||||
url : str
|
||||
The URL where the action should be executed
|
||||
|
||||
action : SdkAction
|
||||
action : RunSdkActionRequestAction
|
||||
The action to execute with its specific parameters
|
||||
|
||||
user_agent : typing.Optional[str]
|
||||
|
||||
browser_session_id : typing.Optional[str]
|
||||
The browser session ID
|
||||
|
||||
@@ -4225,7 +4204,7 @@ class AsyncRawSkyvern:
|
||||
Returns
|
||||
-------
|
||||
AsyncHttpResponse[RunSdkActionResponse]
|
||||
Successfully executed SDK action
|
||||
Successful Response
|
||||
"""
|
||||
_response = await self._client_wrapper.httpx_client.request(
|
||||
"v1/sdk/run_action",
|
||||
@@ -4236,12 +4215,11 @@ class AsyncRawSkyvern:
|
||||
"browser_address": browser_address,
|
||||
"workflow_run_id": workflow_run_id,
|
||||
"action": convert_and_respect_annotation_metadata(
|
||||
object_=action, annotation=SdkAction, direction="write"
|
||||
object_=action, annotation=RunSdkActionRequestAction, direction="write"
|
||||
),
|
||||
},
|
||||
headers={
|
||||
"content-type": "application/json",
|
||||
"x-user-agent": str(user_agent) if user_agent is not None else None,
|
||||
},
|
||||
request_options=request_options,
|
||||
omit=OMIT,
|
||||
@@ -4256,39 +4234,6 @@ class AsyncRawSkyvern:
|
||||
),
|
||||
)
|
||||
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 == 403:
|
||||
raise ForbiddenError(
|
||||
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 == 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),
|
||||
|
||||
Reference in New Issue
Block a user