This commit is contained in:
Ruben Fiszel
2022-10-08 13:25:07 +02:00
parent 6ebedfc5fb
commit ac09681d49
1430 changed files with 95542 additions and 14 deletions

View File

@@ -0,0 +1,93 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/archive/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""archive flow by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[Any]:
"""archive flow by path
Args:
workspace (str):
path (str):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)

View File

@@ -0,0 +1,97 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.create_flow_json_body import CreateFlowJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
*,
client: Client,
json_body: CreateFlowJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/create".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
*,
client: Client,
json_body: CreateFlowJsonBody,
) -> Response[Any]:
"""create flow
Args:
workspace (str):
json_body (CreateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
*,
client: Client,
json_body: CreateFlowJsonBody,
) -> Response[Any]:
"""create flow
Args:
workspace (str):
json_body (CreateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)

View File

@@ -0,0 +1,148 @@
from typing import Any, Dict, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/exists/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[bool]:
if response.status_code == 200:
response_200 = cast(bool, response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[bool]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[bool]:
"""exists flow by path
Args:
workspace (str):
path (str):
Returns:
Response[bool]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed

View File

@@ -0,0 +1,150 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_flow_by_path_response_200 import GetFlowByPathResponse200
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/get/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetFlowByPathResponse200]:
if response.status_code == 200:
response_200 = GetFlowByPathResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetFlowByPathResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
return sync_detailed(
workspace=workspace,
path=path,
client=client,
).parsed
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
) -> Response[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
path: str,
*,
client: Client,
) -> Optional[GetFlowByPathResponse200]:
"""get flow by path
Args:
workspace (str):
path (str):
Returns:
Response[GetFlowByPathResponse200]
"""
return (
await asyncio_detailed(
workspace=workspace,
path=path,
client=client,
)
).parsed

View File

@@ -0,0 +1,137 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.get_hub_flow_by_id_response_200 import GetHubFlowByIdResponse200
from ...types import Response
def _get_kwargs(
id: int,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/flows/hub/get/{id}".format(client.base_url, id=id)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[GetHubFlowByIdResponse200]:
if response.status_code == 200:
response_200 = GetHubFlowByIdResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[GetHubFlowByIdResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
id: int,
*,
client: Client,
) -> Response[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: int,
*,
client: Client,
) -> Optional[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: int,
*,
client: Client,
) -> Response[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
kwargs = _get_kwargs(
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
id: int,
*,
client: Client,
) -> Optional[GetHubFlowByIdResponse200]:
"""get hub flow by id
Args:
id (int):
Returns:
Response[GetHubFlowByIdResponse200]
"""
return (
await asyncio_detailed(
id=id,
client=client,
)
).parsed

View File

@@ -0,0 +1,251 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.list_flows_response_200_item import ListFlowsResponse200Item
from ...types import UNSET, Response, Unset
def _get_kwargs(
workspace: str,
*,
client: 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,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/list".format(client.base_url, workspace=workspace)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_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 = {k: v for k, v in params.items() if v is not UNSET and v is not None}
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"params": params,
}
def _parse_response(*, response: httpx.Response) -> Optional[List[ListFlowsResponse200Item]]:
if response.status_code == 200:
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
return None
def _build_response(*, response: httpx.Response) -> Response[List[ListFlowsResponse200Item]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
workspace: str,
*,
client: 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,
) -> Response[List[ListFlowsResponse200Item]]:
"""list all available 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]):
Returns:
Response[List[ListFlowsResponse200Item]]
"""
kwargs = _get_kwargs(
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,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
workspace: str,
*,
client: 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,
) -> Optional[List[ListFlowsResponse200Item]]:
"""list all available 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]):
Returns:
Response[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,
).parsed
async def asyncio_detailed(
workspace: str,
*,
client: 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,
) -> Response[List[ListFlowsResponse200Item]]:
"""list all available 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]):
Returns:
Response[List[ListFlowsResponse200Item]]
"""
kwargs = _get_kwargs(
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,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
workspace: str,
*,
client: 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,
) -> Optional[List[ListFlowsResponse200Item]]:
"""list all available 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]):
Returns:
Response[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,
)
).parsed

View File

@@ -0,0 +1,116 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.list_hub_flows_response_200 import ListHubFlowsResponse200
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/flows/hub/list".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"method": "get",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[ListHubFlowsResponse200]:
if response.status_code == 200:
response_200 = ListHubFlowsResponse200.from_dict(response.json())
return response_200
return None
def _build_response(*, response: httpx.Response) -> Response[ListHubFlowsResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
kwargs = _get_kwargs(
client=client,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[ListHubFlowsResponse200]:
"""list all available hub flows
Returns:
Response[ListHubFlowsResponse200]
"""
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@@ -0,0 +1,104 @@
from typing import Any, Dict
import httpx
from ...client import Client
from ...models.update_flow_json_body import UpdateFlowJsonBody
from ...types import Response
def _get_kwargs(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateFlowJsonBody,
) -> Dict[str, Any]:
url = "{}/w/{workspace}/flows/update/{path}".format(client.base_url, workspace=workspace, path=path)
headers: Dict[str, str] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"json": json_json_body,
}
def _build_response(*, response: httpx.Response) -> Response[Any]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=None,
)
def sync_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateFlowJsonBody,
) -> Response[Any]:
"""update flow
Args:
workspace (str):
path (str):
json_body (UpdateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
response = httpx.request(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
async def asyncio_detailed(
workspace: str,
path: str,
*,
client: Client,
json_body: UpdateFlowJsonBody,
) -> Response[Any]:
"""update flow
Args:
workspace (str):
path (str):
json_body (UpdateFlowJsonBody):
Returns:
Response[Any]
"""
kwargs = _get_kwargs(
workspace=workspace,
path=path,
client=client,
json_body=json_body,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.request(**kwargs)
return _build_response(response=response)