mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 16:02:14 +00:00
sqlx
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from ...models.archive_flow_by_path_json_body import ArchiveFlowByPathJsonBody
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
json_body: ArchiveFlowByPathJsonBody,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": "/w/{workspace}/flows/archive/{path}".format(workspace=workspace,path=path,),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: ArchiveFlowByPathJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" archive flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
json_body (ArchiveFlowByPathJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: ArchiveFlowByPathJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" archive flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
json_body (ArchiveFlowByPathJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from ...models.create_flow_json_body import CreateFlowJsonBody
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
json_body: CreateFlowJsonBody,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": "/w/{workspace}/flows/create".format(workspace=workspace,),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: CreateFlowJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" create flow
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
json_body (CreateFlowJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: CreateFlowJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" create flow
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
json_body (CreateFlowJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "delete",
|
||||
"url": "/w/{workspace}/flows/delete/{path}".format(workspace=workspace,path=path,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[Any]:
|
||||
""" delete flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[Any]:
|
||||
""" delete flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/exists/{path}".format(workspace=workspace,path=path,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[bool]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = cast(bool, response.json())
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[bool]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[bool]:
|
||||
""" exists flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[bool]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[bool]:
|
||||
""" exists flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
bool
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[bool]:
|
||||
""" exists flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[bool]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[bool]:
|
||||
""" exists flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
bool
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,184 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import cast
|
||||
from ...models.get_flow_by_path_response_200 import GetFlowByPathResponse200
|
||||
from typing import Dict
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/get/{path}".format(workspace=workspace,path=path,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[GetFlowByPathResponse200]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = GetFlowByPathResponse200.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[GetFlowByPathResponse200]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[GetFlowByPathResponse200]:
|
||||
""" get flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[GetFlowByPathResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[GetFlowByPathResponse200]:
|
||||
""" get flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
GetFlowByPathResponse200
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[GetFlowByPathResponse200]:
|
||||
""" get flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[GetFlowByPathResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[GetFlowByPathResponse200]:
|
||||
""" get flow by path
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
GetFlowByPathResponse200
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,184 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import cast
|
||||
from ...models.get_flow_by_path_with_draft_response_200 import GetFlowByPathWithDraftResponse200
|
||||
from typing import Dict
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/get/draft/{path}".format(workspace=workspace,path=path,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[GetFlowByPathWithDraftResponse200]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = GetFlowByPathWithDraftResponse200.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[GetFlowByPathWithDraftResponse200]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[GetFlowByPathWithDraftResponse200]:
|
||||
""" get flow by path with draft
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[GetFlowByPathWithDraftResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[GetFlowByPathWithDraftResponse200]:
|
||||
""" get flow by path with draft
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
GetFlowByPathWithDraftResponse200
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[GetFlowByPathWithDraftResponse200]:
|
||||
""" get flow by path with draft
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[GetFlowByPathWithDraftResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[GetFlowByPathWithDraftResponse200]:
|
||||
""" get flow by path with draft
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
GetFlowByPathWithDraftResponse200
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,230 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ...models.get_flow_input_history_by_path_response_200_item import GetFlowInputHistoryByPathResponse200Item
|
||||
from typing import Optional
|
||||
from ...types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
params: Dict[str, Any] = {}
|
||||
params["page"] = page
|
||||
|
||||
|
||||
params["per_page"] = per_page
|
||||
|
||||
|
||||
|
||||
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/input_history/p/{path}".format(workspace=workspace,path=path,),
|
||||
"params": params,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['GetFlowInputHistoryByPathResponse200Item']]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in (_response_200):
|
||||
response_200_item = GetFlowInputHistoryByPathResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['GetFlowInputHistoryByPathResponse200Item']]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
|
||||
) -> Response[List['GetFlowInputHistoryByPathResponse200Item']]:
|
||||
""" list inputs for previous completed flow jobs
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[List['GetFlowInputHistoryByPathResponse200Item']]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
|
||||
) -> Optional[List['GetFlowInputHistoryByPathResponse200Item']]:
|
||||
""" list inputs for previous completed flow jobs
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
List['GetFlowInputHistoryByPathResponse200Item']
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
|
||||
) -> Response[List['GetFlowInputHistoryByPathResponse200Item']]:
|
||||
""" list inputs for previous completed flow jobs
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[List['GetFlowInputHistoryByPathResponse200Item']]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
|
||||
) -> Optional[List['GetFlowInputHistoryByPathResponse200Item']]:
|
||||
""" list inputs for previous completed flow jobs
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
List['GetFlowInputHistoryByPathResponse200Item']
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,171 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from ...models.get_hub_flow_by_id_response_200 import GetHubFlowByIdResponse200
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
id: int,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/flows/hub/get/{id}".format(id=id,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[GetHubFlowByIdResponse200]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = GetHubFlowByIdResponse200.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[GetHubFlowByIdResponse200]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
id: int,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[GetHubFlowByIdResponse200]:
|
||||
""" get hub flow by id
|
||||
|
||||
Args:
|
||||
id (int):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[GetHubFlowByIdResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
id: int,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[GetHubFlowByIdResponse200]:
|
||||
""" get hub flow by id
|
||||
|
||||
Args:
|
||||
id (int):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
GetHubFlowByIdResponse200
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
client=client,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
id: int,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[GetHubFlowByIdResponse200]:
|
||||
""" get hub flow by id
|
||||
|
||||
Args:
|
||||
id (int):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[GetHubFlowByIdResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
id: int,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[GetHubFlowByIdResponse200]:
|
||||
""" get hub flow by id
|
||||
|
||||
Args:
|
||||
id (int):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
GetHubFlowByIdResponse200
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
id=id,
|
||||
client=client,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,112 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/list_paths".format(workspace=workspace,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[Any]:
|
||||
""" list all flow paths
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[Any]:
|
||||
""" list all flow paths
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
@@ -0,0 +1,313 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ...models.list_flows_response_200_item import ListFlowsResponse200Item
|
||||
from typing import Optional
|
||||
from ...types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
*,
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
order_desc: Union[Unset, None, bool] = UNSET,
|
||||
created_by: Union[Unset, None, str] = UNSET,
|
||||
path_start: Union[Unset, None, str] = UNSET,
|
||||
path_exact: Union[Unset, None, str] = UNSET,
|
||||
show_archived: Union[Unset, None, bool] = UNSET,
|
||||
starred_only: Union[Unset, None, bool] = UNSET,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
params: Dict[str, Any] = {}
|
||||
params["page"] = page
|
||||
|
||||
|
||||
params["per_page"] = per_page
|
||||
|
||||
|
||||
params["order_desc"] = order_desc
|
||||
|
||||
|
||||
params["created_by"] = created_by
|
||||
|
||||
|
||||
params["path_start"] = path_start
|
||||
|
||||
|
||||
params["path_exact"] = path_exact
|
||||
|
||||
|
||||
params["show_archived"] = show_archived
|
||||
|
||||
|
||||
params["starred_only"] = starred_only
|
||||
|
||||
|
||||
|
||||
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/list".format(workspace=workspace,),
|
||||
"params": params,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['ListFlowsResponse200Item']]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in (_response_200):
|
||||
response_200_item = ListFlowsResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['ListFlowsResponse200Item']]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
order_desc: Union[Unset, None, bool] = UNSET,
|
||||
created_by: Union[Unset, None, str] = UNSET,
|
||||
path_start: Union[Unset, None, str] = UNSET,
|
||||
path_exact: Union[Unset, None, str] = UNSET,
|
||||
show_archived: Union[Unset, None, bool] = UNSET,
|
||||
starred_only: Union[Unset, None, bool] = UNSET,
|
||||
|
||||
) -> Response[List['ListFlowsResponse200Item']]:
|
||||
""" list all flows
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
order_desc (Union[Unset, None, bool]):
|
||||
created_by (Union[Unset, None, str]):
|
||||
path_start (Union[Unset, None, str]):
|
||||
path_exact (Union[Unset, None, str]):
|
||||
show_archived (Union[Unset, None, bool]):
|
||||
starred_only (Union[Unset, None, bool]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[List['ListFlowsResponse200Item']]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
order_desc=order_desc,
|
||||
created_by=created_by,
|
||||
path_start=path_start,
|
||||
path_exact=path_exact,
|
||||
show_archived=show_archived,
|
||||
starred_only=starred_only,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
order_desc: Union[Unset, None, bool] = UNSET,
|
||||
created_by: Union[Unset, None, str] = UNSET,
|
||||
path_start: Union[Unset, None, str] = UNSET,
|
||||
path_exact: Union[Unset, None, str] = UNSET,
|
||||
show_archived: Union[Unset, None, bool] = UNSET,
|
||||
starred_only: Union[Unset, None, bool] = UNSET,
|
||||
|
||||
) -> Optional[List['ListFlowsResponse200Item']]:
|
||||
""" list all flows
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
order_desc (Union[Unset, None, bool]):
|
||||
created_by (Union[Unset, None, str]):
|
||||
path_start (Union[Unset, None, str]):
|
||||
path_exact (Union[Unset, None, str]):
|
||||
show_archived (Union[Unset, None, bool]):
|
||||
starred_only (Union[Unset, None, bool]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
List['ListFlowsResponse200Item']
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
order_desc=order_desc,
|
||||
created_by=created_by,
|
||||
path_start=path_start,
|
||||
path_exact=path_exact,
|
||||
show_archived=show_archived,
|
||||
starred_only=starred_only,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
order_desc: Union[Unset, None, bool] = UNSET,
|
||||
created_by: Union[Unset, None, str] = UNSET,
|
||||
path_start: Union[Unset, None, str] = UNSET,
|
||||
path_exact: Union[Unset, None, str] = UNSET,
|
||||
show_archived: Union[Unset, None, bool] = UNSET,
|
||||
starred_only: Union[Unset, None, bool] = UNSET,
|
||||
|
||||
) -> Response[List['ListFlowsResponse200Item']]:
|
||||
""" list all flows
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
order_desc (Union[Unset, None, bool]):
|
||||
created_by (Union[Unset, None, str]):
|
||||
path_start (Union[Unset, None, str]):
|
||||
path_exact (Union[Unset, None, str]):
|
||||
show_archived (Union[Unset, None, bool]):
|
||||
starred_only (Union[Unset, None, bool]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[List['ListFlowsResponse200Item']]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
order_desc=order_desc,
|
||||
created_by=created_by,
|
||||
path_start=path_start,
|
||||
path_exact=path_exact,
|
||||
show_archived=show_archived,
|
||||
starred_only=starred_only,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
page: Union[Unset, None, int] = UNSET,
|
||||
per_page: Union[Unset, None, int] = UNSET,
|
||||
order_desc: Union[Unset, None, bool] = UNSET,
|
||||
created_by: Union[Unset, None, str] = UNSET,
|
||||
path_start: Union[Unset, None, str] = UNSET,
|
||||
path_exact: Union[Unset, None, str] = UNSET,
|
||||
show_archived: Union[Unset, None, bool] = UNSET,
|
||||
starred_only: Union[Unset, None, bool] = UNSET,
|
||||
|
||||
) -> Optional[List['ListFlowsResponse200Item']]:
|
||||
""" list all flows
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
page (Union[Unset, None, int]):
|
||||
per_page (Union[Unset, None, int]):
|
||||
order_desc (Union[Unset, None, bool]):
|
||||
created_by (Union[Unset, None, str]):
|
||||
path_start (Union[Unset, None, str]):
|
||||
path_exact (Union[Unset, None, str]):
|
||||
show_archived (Union[Unset, None, bool]):
|
||||
starred_only (Union[Unset, None, bool]):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
List['ListFlowsResponse200Item']
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
order_desc=order_desc,
|
||||
created_by=created_by,
|
||||
path_start=path_start,
|
||||
path_exact=path_exact,
|
||||
show_archived=show_archived,
|
||||
starred_only=starred_only,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,150 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from ...models.list_hub_flows_response_200 import ListHubFlowsResponse200
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/flows/hub/list",
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[ListHubFlowsResponse200]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = ListHubFlowsResponse200.from_dict(response.json())
|
||||
|
||||
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[ListHubFlowsResponse200]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[ListHubFlowsResponse200]:
|
||||
""" list all hub flows
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[ListHubFlowsResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[ListHubFlowsResponse200]:
|
||||
""" list all hub flows
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
ListHubFlowsResponse200
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[ListHubFlowsResponse200]:
|
||||
""" list all hub flows
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[ListHubFlowsResponse200]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[ListHubFlowsResponse200]:
|
||||
""" list all hub flows
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
ListHubFlowsResponse200
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
client=client,
|
||||
|
||||
)).parsed
|
||||
@@ -0,0 +1,177 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import cast
|
||||
from ...models.list_search_flow_response_200_item import ListSearchFlowResponse200Item
|
||||
from typing import Dict
|
||||
from typing import cast, List
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "get",
|
||||
"url": "/w/{workspace}/flows/list_search".format(workspace=workspace,),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['ListSearchFlowResponse200Item']]:
|
||||
if response.status_code == HTTPStatus.OK:
|
||||
response_200 = []
|
||||
_response_200 = response.json()
|
||||
for response_200_item_data in (_response_200):
|
||||
response_200_item = ListSearchFlowResponse200Item.from_dict(response_200_item_data)
|
||||
|
||||
|
||||
|
||||
response_200.append(response_200_item)
|
||||
|
||||
return response_200
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List['ListSearchFlowResponse200Item']]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[List['ListSearchFlowResponse200Item']]:
|
||||
""" list flows for search
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[List['ListSearchFlowResponse200Item']]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
def sync(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[List['ListSearchFlowResponse200Item']]:
|
||||
""" list flows for search
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
List['ListSearchFlowResponse200Item']
|
||||
"""
|
||||
|
||||
|
||||
return sync_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
|
||||
).parsed
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Response[List['ListSearchFlowResponse200Item']]:
|
||||
""" list flows for search
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[List['ListSearchFlowResponse200Item']]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
async def asyncio(
|
||||
workspace: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
|
||||
) -> Optional[List['ListSearchFlowResponse200Item']]:
|
||||
""" list flows for search
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
List['ListSearchFlowResponse200Item']
|
||||
"""
|
||||
|
||||
|
||||
return (await asyncio_detailed(
|
||||
workspace=workspace,
|
||||
client=client,
|
||||
|
||||
)).parsed
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from ...models.toggle_workspace_error_handler_for_flow_json_body import ToggleWorkspaceErrorHandlerForFlowJsonBody
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
json_body: ToggleWorkspaceErrorHandlerForFlowJsonBody,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": "/w/{workspace}/flows/toggle_workspace_error_handler/{path}".format(workspace=workspace,path=path,),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: ToggleWorkspaceErrorHandlerForFlowJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" Toggle ON and OFF the workspace error handler for a given flow
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
json_body (ToggleWorkspaceErrorHandlerForFlowJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: ToggleWorkspaceErrorHandlerForFlowJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" Toggle ON and OFF the workspace error handler for a given flow
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
json_body (ToggleWorkspaceErrorHandlerForFlowJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
from http import HTTPStatus
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import AuthenticatedClient, Client
|
||||
from ...types import Response, UNSET
|
||||
from ... import errors
|
||||
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from ...models.update_flow_json_body import UpdateFlowJsonBody
|
||||
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
json_body: UpdateFlowJsonBody,
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
|
||||
cookies = {}
|
||||
|
||||
|
||||
|
||||
|
||||
json_json_body = json_body.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
"method": "post",
|
||||
"url": "/w/{workspace}/flows/update/{path}".format(workspace=workspace,path=path,),
|
||||
"json": json_json_body,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
||||
if client.raise_on_unexpected_status:
|
||||
raise errors.UnexpectedStatus(response.status_code, response.content)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
||||
return Response(
|
||||
status_code=HTTPStatus(response.status_code),
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(client=client, response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: UpdateFlowJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" update flow
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
json_body (UpdateFlowJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = client.get_httpx_client().request(
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
workspace: str,
|
||||
path: str,
|
||||
*,
|
||||
client: Union[AuthenticatedClient, Client],
|
||||
json_body: UpdateFlowJsonBody,
|
||||
|
||||
) -> Response[Any]:
|
||||
""" update flow
|
||||
|
||||
Args:
|
||||
workspace (str):
|
||||
path (str):
|
||||
json_body (UpdateFlowJsonBody):
|
||||
|
||||
Raises:
|
||||
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
||||
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
||||
|
||||
Returns:
|
||||
Response[Any]
|
||||
"""
|
||||
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
workspace=workspace,
|
||||
path=path,
|
||||
json_body=json_body,
|
||||
|
||||
)
|
||||
|
||||
response = await client.get_async_httpx_client().request(
|
||||
**kwargs
|
||||
)
|
||||
|
||||
return _build_response(client=client, response=response)
|
||||
|
||||
Reference in New Issue
Block a user