initial fixing

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2022-06-11 17:26:20 -07:00
parent 4631ca24cb
commit 9dc390a64d
58 changed files with 9685 additions and 6732 deletions

View File

@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union, cast
import httpx
from ...client import Client
from ...models.file_conversion_with_output import FileConversionWithOutput
from ...models.async_api_call_output import AsyncApiCallOutput
from ...models.error import Error
from ...types import Response
@ -25,9 +25,9 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, AsyncApiCallOutput, Error]]:
if response.status_code == 200:
response_200 = FileConversionWithOutput.from_dict(response.json())
response_200 = AsyncApiCallOutput.from_dict(response.json())
return response_200
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
@ -38,7 +38,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
return None
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversionWithOutput, Error]]:
def _build_response(*, response: httpx.Response) -> Response[Union[Any, AsyncApiCallOutput, Error]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -51,7 +51,7 @@ def sync_detailed(
id: str,
*,
client: Client,
) -> Response[Union[Any, FileConversionWithOutput, Error]]:
) -> Response[Union[Any, AsyncApiCallOutput, Error]]:
kwargs = _get_kwargs(
id=id,
client=client,
@ -69,7 +69,7 @@ def sync(
id: str,
*,
client: Client,
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
) -> Optional[Union[Any, AsyncApiCallOutput, Error]]:
""" Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """
@ -83,7 +83,7 @@ async def asyncio_detailed(
id: str,
*,
client: Client,
) -> Response[Union[Any, FileConversionWithOutput, Error]]:
) -> Response[Union[Any, AsyncApiCallOutput, Error]]:
kwargs = _get_kwargs(
id=id,
client=client,
@ -99,7 +99,7 @@ async def asyncio(
id: str,
*,
client: Client,
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
) -> Optional[Union[Any, AsyncApiCallOutput, Error]]:
""" Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """