This commit is contained in:
Ruben Fiszel
2024-01-16 23:46:36 +01:00
parent a24645ee00
commit c73e2760d4
1696 changed files with 160145 additions and 0 deletions

View File

@@ -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 typing import cast
from ...models.create_raw_app_json_body import CreateRawAppJsonBody
from typing import Dict
def _get_kwargs(
workspace: str,
*,
json_body: CreateRawAppJsonBody,
) -> Dict[str, Any]:
cookies = {}
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": "/w/{workspace}/raw_apps/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: CreateRawAppJsonBody,
) -> Response[Any]:
""" create raw app
Args:
workspace (str):
json_body (CreateRawAppJsonBody):
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: CreateRawAppJsonBody,
) -> Response[Any]:
""" create raw app
Args:
workspace (str):
json_body (CreateRawAppJsonBody):
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)

View File

@@ -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}/raw_apps/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 raw app
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 raw app
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)

View File

@@ -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}/raw_apps/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]:
""" does an app exisst at 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]:
""" does an app exisst at 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]:
""" does an app exisst at 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]:
""" does an app exisst at 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

View File

@@ -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
def _get_kwargs(
workspace: str,
version: float,
path: str,
) -> Dict[str, Any]:
cookies = {}
return {
"method": "get",
"url": "/w/{workspace}/apps/get_data/{version}/{path}".format(workspace=workspace,version=version,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,
version: float,
path: str,
*,
client: Union[AuthenticatedClient, Client],
) -> Response[Any]:
""" get app by path
Args:
workspace (str):
version (float):
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,
version=version,
path=path,
)
response = client.get_httpx_client().request(
**kwargs,
)
return _build_response(client=client, response=response)
async def asyncio_detailed(
workspace: str,
version: float,
path: str,
*,
client: Union[AuthenticatedClient, Client],
) -> Response[Any]:
""" get app by path
Args:
workspace (str):
version (float):
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,
version=version,
path=path,
)
response = await client.get_async_httpx_client().request(
**kwargs
)
return _build_response(client=client, response=response)

View File

@@ -0,0 +1,297 @@
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_raw_apps_response_200_item import ListRawAppsResponse200Item
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,
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["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}/raw_apps/list".format(workspace=workspace,),
"params": params,
}
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List['ListRawAppsResponse200Item']]:
if response.status_code == HTTPStatus.OK:
response_200 = []
_response_200 = response.json()
for response_200_item_data in (_response_200):
response_200_item = ListRawAppsResponse200Item.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['ListRawAppsResponse200Item']]:
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,
starred_only: Union[Unset, None, bool] = UNSET,
) -> Response[List['ListRawAppsResponse200Item']]:
""" list all raw apps
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]):
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['ListRawAppsResponse200Item']]
"""
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,
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,
starred_only: Union[Unset, None, bool] = UNSET,
) -> Optional[List['ListRawAppsResponse200Item']]:
""" list all raw apps
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]):
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['ListRawAppsResponse200Item']
"""
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,
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,
starred_only: Union[Unset, None, bool] = UNSET,
) -> Response[List['ListRawAppsResponse200Item']]:
""" list all raw apps
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]):
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['ListRawAppsResponse200Item']]
"""
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,
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,
starred_only: Union[Unset, None, bool] = UNSET,
) -> Optional[List['ListRawAppsResponse200Item']]:
""" list all raw apps
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]):
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['ListRawAppsResponse200Item']
"""
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,
starred_only=starred_only,
)).parsed

View File

@@ -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_raw_app_json_body import UpdateRawAppJsonBody
def _get_kwargs(
workspace: str,
path: str,
*,
json_body: UpdateRawAppJsonBody,
) -> Dict[str, Any]:
cookies = {}
json_json_body = json_body.to_dict()
return {
"method": "post",
"url": "/w/{workspace}/raw_apps/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: UpdateRawAppJsonBody,
) -> Response[Any]:
""" update app
Args:
workspace (str):
path (str):
json_body (UpdateRawAppJsonBody):
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: UpdateRawAppJsonBody,
) -> Response[Any]:
""" update app
Args:
workspace (str):
path (str):
json_body (UpdateRawAppJsonBody):
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)