@ -205,7 +205,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -273,7 +273,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
responses = endpoint['responses']
|
||||
for response_code in responses:
|
||||
response = responses[response_code]
|
||||
f.write("\tif response.status_code == " + response_code + ":\n")
|
||||
f.write("\tif response.status_code == " + response_code.replace("XX", "00") + ":\n")
|
||||
if 'content' in response:
|
||||
content = response['content']
|
||||
for content_type in content:
|
||||
@ -366,7 +366,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -397,7 +397,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -435,7 +435,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -469,7 +469,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -500,7 +500,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -531,7 +531,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -567,7 +567,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -602,7 +602,7 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
parameter_name = parameter['name']
|
||||
if 'type' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['type'].replace(
|
||||
'string', 'str')
|
||||
'string', 'str').replace('integer', 'int')
|
||||
elif '$ref' in parameter['schema']:
|
||||
parameter_type = parameter['schema']['$ref'].replace(
|
||||
'#/components/schemas/', '')
|
||||
@ -1201,12 +1201,12 @@ def getRequestBodyType(endpoint: dict) -> str:
|
||||
|
||||
def camel_to_snake(name: str):
|
||||
name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower()
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower().replace('-', '_')
|
||||
|
||||
|
||||
def camel_to_screaming_snake(name: str):
|
||||
name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).replace(' ', '').upper()
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).replace(' ', '').upper().replace('-', '_')
|
||||
|
||||
|
||||
if (__name__ == '__main__'):
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiCallW
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiCallW
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiCallWithPrice.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -33,10 +33,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiCall
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -93,7 +93,7 @@ def sync(
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -10,7 +10,7 @@ from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
id: str,
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -36,10 +36,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -56,7 +56,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiCall
|
||||
|
||||
def sync_detailed(
|
||||
id: str,
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -80,7 +80,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
id: str,
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -102,7 +102,7 @@ The API calls are returned in order of creation, with the most recently created
|
||||
|
||||
async def asyncio_detailed(
|
||||
id: str,
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -124,7 +124,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
id: str,
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiCall
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -94,7 +94,7 @@ The API calls are returned in order of creation, with the most recently created
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -114,7 +114,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -28,10 +28,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiToken
|
||||
if response.status_code == 201:
|
||||
response_201 = ApiToken.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -28,10 +28,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]:
|
||||
if response.status_code == 204:
|
||||
response_204 = None
|
||||
return response_204
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiToken
|
||||
if response.status_code == 200:
|
||||
response_200 = ApiToken.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiToke
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiToke
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -94,7 +94,7 @@ The API tokens are returned in order of creation, with the most recently created
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -114,7 +114,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -34,10 +34,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
if response.status_code == 201:
|
||||
response_201 = FileConversionWithOutput.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
if response.status_code == 200:
|
||||
response_200 = FileConversionWithOutput.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
if response.status_code == 200:
|
||||
response_200 = FileConversionWithOutput.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [FileCon
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [FileCon
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -94,7 +94,7 @@ This endpoint requires authentication by a KittyCAD employee. """
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -114,7 +114,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [FileCon
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [FileCon
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -95,7 +95,7 @@ The file conversions are returned in order of creation, with the most recently c
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -115,7 +115,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -28,10 +28,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, dict, Er
|
||||
if response.status_code == 200:
|
||||
response_200 = response.json()
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -28,10 +28,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Pong, Er
|
||||
if response.status_code == 200:
|
||||
response_200 = Pong.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, User, Er
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -29,10 +29,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Extended
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -28,10 +28,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, User, Er
|
||||
if response.status_code == 200:
|
||||
response_200 = User.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -28,10 +28,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Extended
|
||||
if response.status_code == 200:
|
||||
response_200 = ExtendedUser.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [User],
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [User],
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -93,7 +93,7 @@ def sync(
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -9,7 +9,7 @@ from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -35,10 +35,10 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [Extende
|
||||
for item in response.json()
|
||||
]
|
||||
return response_200
|
||||
if response.status_code == 4XX:
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 5XX:
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
@ -54,7 +54,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, [Extende
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -76,7 +76,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -93,7 +93,7 @@ def sync(
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
limit: integer,
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
|
@ -6,7 +6,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiCallQueryGroup")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiCallQueryGroup:
|
||||
""" """
|
||||
@ -36,6 +35,7 @@ class ApiCallQueryGroup:
|
||||
|
||||
query = d.pop("query", UNSET)
|
||||
|
||||
|
||||
api_call_query_group = cls(
|
||||
count= count,
|
||||
query= query,
|
||||
|
@ -1,6 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ApiCallQueryGroupBy(str, Enum):
|
||||
EMAIL = 'email'
|
||||
METHOD = 'method'
|
||||
|
@ -11,7 +11,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiCallWithPrice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiCallWithPrice:
|
||||
""" """
|
||||
@ -211,6 +210,7 @@ class ApiCallWithPrice:
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
api_call_with_price = cls(
|
||||
completed_at= completed_at,
|
||||
created_at= created_at,
|
||||
|
@ -9,7 +9,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiToken")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiToken:
|
||||
""" """
|
||||
@ -84,6 +83,7 @@ class ApiToken:
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
api_token = cls(
|
||||
created_at= created_at,
|
||||
id= id,
|
||||
|
@ -1,9 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CreatedAtSortMode(str, Enum):
|
||||
CREATED - AT - ASCENDING = 'created-at-ascending'
|
||||
CREATED - AT - DESCENDING = 'created-at-descending'
|
||||
CREATED_AT_ASCENDING = 'created-at-ascending'
|
||||
CREATED_AT_DESCENDING = 'created-at-descending'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -6,7 +6,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Error")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Error:
|
||||
""" """
|
||||
@ -42,6 +41,7 @@ class Error:
|
||||
|
||||
request_id = d.pop("request_id", UNSET)
|
||||
|
||||
|
||||
error = cls(
|
||||
error_code= error_code,
|
||||
message= message,
|
||||
|
@ -8,7 +8,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ExtendedUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExtendedUser:
|
||||
""" """
|
||||
@ -143,6 +142,7 @@ class ExtendedUser:
|
||||
|
||||
zendesk_id = d.pop("zendesk_id", UNSET)
|
||||
|
||||
|
||||
extended_user = cls(
|
||||
company= company,
|
||||
created_at= created_at,
|
||||
|
@ -12,7 +12,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversion:
|
||||
""" """
|
||||
@ -158,6 +157,7 @@ class FileConversion:
|
||||
|
||||
worker = d.pop("worker", UNSET)
|
||||
|
||||
|
||||
file_conversion = cls(
|
||||
completed_at= completed_at,
|
||||
created_at= created_at,
|
||||
|
@ -1,6 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileConversionOutputFormat(str, Enum):
|
||||
STL = 'stl'
|
||||
OBJ = 'obj'
|
||||
|
@ -1,6 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileConversionSourceFormat(str, Enum):
|
||||
STL = 'stl'
|
||||
OBJ = 'obj'
|
||||
|
@ -1,6 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileConversionStatus(str, Enum):
|
||||
QUEUED = 'Queued'
|
||||
UPLOADED = 'Uploaded'
|
||||
|
@ -12,7 +12,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileConversionWithOutput")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversionWithOutput:
|
||||
""" """
|
||||
@ -133,6 +132,7 @@ class FileConversionWithOutput:
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
file_conversion_with_output = cls(
|
||||
completed_at= completed_at,
|
||||
created_at= created_at,
|
||||
|
@ -1,6 +1,5 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class Method(str, Enum):
|
||||
OPTIONS = 'OPTIONS'
|
||||
GET = 'GET'
|
||||
|
@ -6,7 +6,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Pong")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Pong:
|
||||
""" """
|
||||
@ -30,6 +29,7 @@ class Pong:
|
||||
d = src_dict.copy()
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
|
||||
pong = cls(
|
||||
message= message,
|
||||
)
|
||||
|
@ -8,7 +8,6 @@ from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="User")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class User:
|
||||
""" """
|
||||
@ -125,6 +124,7 @@ class User:
|
||||
else:
|
||||
updated_at = isoparse(_updated_at)
|
||||
|
||||
|
||||
user = cls(
|
||||
company= company,
|
||||
created_at= created_at,
|
||||
|
Reference in New Issue
Block a user