@ -729,6 +729,11 @@ def generateType(path: str, name: str, schema: dict):
|
||||
"\t" +
|
||||
property_name +
|
||||
": Union[Unset, bool] = False\n")
|
||||
elif property_type == 'array':
|
||||
f.write(
|
||||
"\t" +
|
||||
property_name +
|
||||
": Union[Unset, array] = []\n")
|
||||
else:
|
||||
raise Exception(" unknown type: ", property_type)
|
||||
elif '$ref' in property_schema:
|
||||
@ -815,6 +820,13 @@ def generateType(path: str, name: str, schema: dict):
|
||||
" = self." +
|
||||
property_name +
|
||||
"\n")
|
||||
elif property_type == 'array':
|
||||
f.write(
|
||||
"\t\t" +
|
||||
property_name +
|
||||
" = self." +
|
||||
property_name +
|
||||
"\n")
|
||||
else:
|
||||
raise Exception(" unknown type: ", property_type)
|
||||
elif '$ref' in property_schema:
|
||||
@ -945,6 +957,14 @@ def generateType(path: str, name: str, schema: dict):
|
||||
property_name +
|
||||
"\", UNSET)\n")
|
||||
f.write("\n")
|
||||
elif property_type == 'array':
|
||||
f.write(
|
||||
"\t\t" +
|
||||
property_name +
|
||||
" = d.pop(\"" +
|
||||
property_name +
|
||||
"\", UNSET)\n")
|
||||
f.write("\n")
|
||||
else:
|
||||
print(" unknown type: ", property_type)
|
||||
raise Exception(" unknown type: ", property_type)
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.api_call_with_price import ApiCallWithPrice
|
||||
from ...models.api_call_with_price_results_page import ApiCallWithPriceResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
ApiCallWithPrice.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first. """
|
||||
|
||||
return sync_detailed(
|
||||
@ -98,7 +95,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -118,7 +115,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first. """
|
||||
|
||||
return (
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.api_call_with_price import ApiCallWithPrice
|
||||
from ...models.api_call_with_price_results_page import ApiCallWithPriceResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -29,12 +29,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
ApiCallWithPrice.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -45,7 +42,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -61,7 +58,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
limit=limit,
|
||||
@ -85,7 +82,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id.
|
||||
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
|
||||
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
|
||||
@ -107,7 +104,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
limit=limit,
|
||||
@ -129,7 +126,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id.
|
||||
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
|
||||
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.api_call_with_price import ApiCallWithPrice
|
||||
from ...models.api_call_with_price_results_page import ApiCallWithPriceResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
ApiCallWithPrice.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = ApiCallWithPriceResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiCall
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first. """
|
||||
|
||||
@ -99,7 +96,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Response[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -119,7 +116,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiCallWithPrice], Error]]:
|
||||
) -> Optional[Union[Any, ApiCallWithPriceResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.
|
||||
The API calls are returned in order of creation, with the most recently created API calls first. """
|
||||
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.api_token import ApiToken
|
||||
from ...models.api_token_results_page import ApiTokenResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiToken], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ApiTokenResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
ApiToken.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = ApiTokenResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ApiToke
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ApiToken], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, ApiTokenResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiToken], Error]]:
|
||||
) -> Response[Union[Any, ApiTokenResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiToken], Error]]:
|
||||
) -> Optional[Union[Any, ApiTokenResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
|
||||
The API tokens are returned in order of creation, with the most recently created API tokens first. """
|
||||
|
||||
@ -99,7 +96,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ApiToken], Error]]:
|
||||
) -> Response[Union[Any, ApiTokenResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -119,7 +116,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ApiToken], Error]]:
|
||||
) -> Optional[Union[Any, ApiTokenResultsPage, Error]]:
|
||||
""" This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
|
||||
The API tokens are returned in order of creation, with the most recently created API tokens first. """
|
||||
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file_conversion_results_page import FileConversionResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [FileConversion], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversionResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
FileConversion.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = FileConversionResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [FileCon
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [FileConversion], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversionResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [FileConversion], Error]]:
|
||||
) -> Response[Union[Any, FileConversionResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [FileConversion], Error]]:
|
||||
) -> Optional[Union[Any, FileConversionResultsPage, Error]]:
|
||||
""" This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.
|
||||
This endpoint requires authentication by a KittyCAD employee. """
|
||||
|
||||
@ -99,7 +96,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [FileConversion], Error]]:
|
||||
) -> Response[Union[Any, FileConversionResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -119,7 +116,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [FileConversion], Error]]:
|
||||
) -> Optional[Union[Any, FileConversionResultsPage, Error]]:
|
||||
""" This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.
|
||||
This endpoint requires authentication by a KittyCAD employee. """
|
||||
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file_conversion_results_page import FileConversionResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [FileConversion], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversionResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
FileConversion.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = FileConversionResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [FileCon
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [FileConversion], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversionResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [FileConversion], Error]]:
|
||||
) -> Response[Union[Any, FileConversionResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [FileConversion], Error]]:
|
||||
) -> Optional[Union[Any, FileConversionResultsPage, Error]]:
|
||||
""" This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
|
||||
The file conversions are returned in order of creation, with the most recently created file conversions first. """
|
||||
@ -100,7 +97,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [FileConversion], Error]]:
|
||||
) -> Response[Union[Any, FileConversionResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -120,7 +117,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [FileConversion], Error]]:
|
||||
) -> Optional[Union[Any, FileConversionResultsPage, Error]]:
|
||||
""" This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
|
||||
The file conversions are returned in order of creation, with the most recently created file conversions first. """
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.user import User
|
||||
from ...models.user_results_page import UserResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [User], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, UserResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
User.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = UserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [User],
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [User], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, UserResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [User], Error]]:
|
||||
) -> Response[Union[Any, UserResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [User], Error]]:
|
||||
) -> Optional[Union[Any, UserResultsPage, Error]]:
|
||||
""" This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. """
|
||||
|
||||
return sync_detailed(
|
||||
@ -98,7 +95,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [User], Error]]:
|
||||
) -> Response[Union[Any, UserResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -118,7 +115,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [User], Error]]:
|
||||
) -> Optional[Union[Any, UserResultsPage, Error]]:
|
||||
""" This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. """
|
||||
|
||||
return (
|
||||
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.extended_user import ExtendedUser
|
||||
from ...models.extended_user_results_page import ExtendedUserResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...types import Response
|
||||
@ -28,12 +28,9 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [ExtendedUser], Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, ExtendedUserResultsPage, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = [
|
||||
ExtendedUser.from_dict(item)
|
||||
for item in response.json()
|
||||
]
|
||||
response_200 = ExtendedUserResultsPage.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
@ -44,7 +41,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [Extende
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [ExtendedUser], Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, ExtendedUserResultsPage, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -59,7 +56,7 @@ def sync_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ExtendedUser], Error]]:
|
||||
) -> Response[Union[Any, ExtendedUserResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -81,7 +78,7 @@ def sync(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ExtendedUser], Error]]:
|
||||
) -> Optional[Union[Any, ExtendedUserResultsPage, Error]]:
|
||||
""" This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. """
|
||||
|
||||
return sync_detailed(
|
||||
@ -98,7 +95,7 @@ async def asyncio_detailed(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, [ExtendedUser], Error]]:
|
||||
) -> Response[Union[Any, ExtendedUserResultsPage, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
limit=limit,
|
||||
page_token=page_token,
|
||||
@ -118,7 +115,7 @@ async def asyncio(
|
||||
sort_by: CreatedAtSortMode,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, [ExtendedUser], Error]]:
|
||||
) -> Optional[Union[Any, ExtendedUserResultsPage, Error]]:
|
||||
""" This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. """
|
||||
|
||||
return (
|
||||
|
@ -3,12 +3,16 @@
|
||||
from .api_call_query_group import ApiCallQueryGroup
|
||||
from .api_call_query_group_by import ApiCallQueryGroupBy
|
||||
from .api_call_with_price import ApiCallWithPrice
|
||||
from .api_call_with_price_results_page import ApiCallWithPriceResultsPage
|
||||
from .api_token import ApiToken
|
||||
from .api_token_results_page import ApiTokenResultsPage
|
||||
from .created_at_sort_mode import CreatedAtSortMode
|
||||
from .error import Error
|
||||
from .extended_user import ExtendedUser
|
||||
from .extended_user_results_page import ExtendedUserResultsPage
|
||||
from .file_conversion import FileConversion
|
||||
from .file_conversion_output_format import FileConversionOutputFormat
|
||||
from .file_conversion_results_page import FileConversionResultsPage
|
||||
from .file_conversion_source_format import FileConversionSourceFormat
|
||||
from .file_conversion_status import FileConversionStatus
|
||||
from .file_conversion_with_output import FileConversionWithOutput
|
||||
@ -16,4 +20,5 @@ from .method import Method
|
||||
from .pong import Pong
|
||||
from .status_code import StatusCode
|
||||
from .user import User
|
||||
from .user_results_page import UserResultsPage
|
||||
from .uuid import Uuid
|
||||
|
61
kittycad/models/api_call_with_price_results_page.py
Normal file
61
kittycad/models/api_call_with_price_results_page.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiCallWithPriceResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiCallWithPriceResultsPage:
|
||||
""" """
|
||||
items: Union[Unset, array] = []
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
items = self.items
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if items is not UNSET:
|
||||
field_dict['items'] = items
|
||||
if next_page is not UNSET:
|
||||
field_dict['next_page'] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
items = d.pop("items", UNSET)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
api_call_with_price_results_page = cls(
|
||||
items=items,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
api_call_with_price_results_page.additional_properties = d
|
||||
return api_call_with_price_results_page
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
61
kittycad/models/api_token_results_page.py
Normal file
61
kittycad/models/api_token_results_page.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ApiTokenResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ApiTokenResultsPage:
|
||||
""" """
|
||||
items: Union[Unset, array] = []
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
items = self.items
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if items is not UNSET:
|
||||
field_dict['items'] = items
|
||||
if next_page is not UNSET:
|
||||
field_dict['next_page'] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
items = d.pop("items", UNSET)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
api_token_results_page = cls(
|
||||
items=items,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
api_token_results_page.additional_properties = d
|
||||
return api_token_results_page
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
61
kittycad/models/extended_user_results_page.py
Normal file
61
kittycad/models/extended_user_results_page.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ExtendedUserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExtendedUserResultsPage:
|
||||
""" """
|
||||
items: Union[Unset, array] = []
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
items = self.items
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if items is not UNSET:
|
||||
field_dict['items'] = items
|
||||
if next_page is not UNSET:
|
||||
field_dict['next_page'] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
items = d.pop("items", UNSET)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
extended_user_results_page = cls(
|
||||
items=items,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
extended_user_results_page.additional_properties = d
|
||||
return extended_user_results_page
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
61
kittycad/models/file_conversion_results_page.py
Normal file
61
kittycad/models/file_conversion_results_page.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileConversionResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversionResultsPage:
|
||||
""" """
|
||||
items: Union[Unset, array] = []
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
items = self.items
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if items is not UNSET:
|
||||
field_dict['items'] = items
|
||||
if next_page is not UNSET:
|
||||
field_dict['next_page'] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
items = d.pop("items", UNSET)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
file_conversion_results_page = cls(
|
||||
items=items,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
file_conversion_results_page.additional_properties = d
|
||||
return file_conversion_results_page
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
61
kittycad/models/user_results_page.py
Normal file
61
kittycad/models/user_results_page.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="UserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class UserResultsPage:
|
||||
""" """
|
||||
items: Union[Unset, array] = []
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
items = self.items
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if items is not UNSET:
|
||||
field_dict['items'] = items
|
||||
if next_page is not UNSET:
|
||||
field_dict['next_page'] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
items = d.pop("items", UNSET)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
user_results_page = cls(
|
||||
items=items,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
user_results_page.additional_properties = d
|
||||
return user_results_page
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
Reference in New Issue
Block a user