Update api spec (#79)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -4,7 +4,6 @@ import httpx
|
|||||||
|
|
||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.file_conversion import FileConversion
|
from ...models.file_conversion import FileConversion
|
||||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
|
||||||
from ...models.file_center_of_mass import FileCenterOfMass
|
from ...models.file_center_of_mass import FileCenterOfMass
|
||||||
from ...models.file_mass import FileMass
|
from ...models.file_mass import FileMass
|
||||||
from ...models.file_volume import FileVolume
|
from ...models.file_volume import FileVolume
|
||||||
@ -31,7 +30,7 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
data = response.json()
|
data = response.json()
|
||||||
try:
|
try:
|
||||||
@ -41,13 +40,6 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
|||||||
return option
|
return option
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
|
||||||
if not isinstance(data, dict):
|
|
||||||
raise TypeError()
|
|
||||||
option = File2DVectorConversion.from_dict(data)
|
|
||||||
return option
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
if not isinstance(data, dict):
|
if not isinstance(data, dict):
|
||||||
raise TypeError()
|
raise TypeError()
|
||||||
@ -92,7 +84,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -105,7 +97,7 @@ def sync_detailed(
|
|||||||
id: str,
|
id: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
id=id,
|
id=id,
|
||||||
client=client,
|
client=client,
|
||||||
@ -123,7 +115,7 @@ def sync(
|
|||||||
id: str,
|
id: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||||
""" Get the status and output of an async operation.
|
""" Get the status and output of an async operation.
|
||||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
||||||
If the user is not authenticated to view the specified async operation, then it is not returned.
|
If the user is not authenticated to view the specified async operation, then it is not returned.
|
||||||
@ -139,7 +131,7 @@ async def asyncio_detailed(
|
|||||||
id: str,
|
id: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
id=id,
|
id=id,
|
||||||
client=client,
|
client=client,
|
||||||
@ -155,7 +147,7 @@ async def asyncio(
|
|||||||
id: str,
|
id: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||||
""" Get the status and output of an async operation.
|
""" Get the status and output of an async operation.
|
||||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
||||||
If the user is not authenticated to view the specified async operation, then it is not returned.
|
If the user is not authenticated to view the specified async operation, then it is not returned.
|
||||||
|
1
kittycad/api/drawing/__init__.py
Normal file
1
kittycad/api/drawing/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
""" Contains methods for accessing the drawing API paths: Drawing API for updating your 3D files using the KittyCAD engine. """
|
111
kittycad/api/drawing/cmd.py
Normal file
111
kittycad/api/drawing/cmd.py
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.dict import dict
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.drawing_cmd_req import DrawingCmdReq
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
body: DrawingCmdReq,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/drawing/cmd".format(client.base_url)
|
||||||
|
|
||||||
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
|
|
||||||
|
return {
|
||||||
|
"url": url,
|
||||||
|
"headers": headers,
|
||||||
|
"cookies": cookies,
|
||||||
|
"timeout": client.get_timeout(),
|
||||||
|
"content": body,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, dict, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = response.json()
|
||||||
|
return response_200
|
||||||
|
if response.status_code == 400:
|
||||||
|
response_4XX = Error.from_dict(response.json())
|
||||||
|
return response_4XX
|
||||||
|
if response.status_code == 500:
|
||||||
|
response_5XX = Error.from_dict(response.json())
|
||||||
|
return response_5XX
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _build_response(*, response: httpx.Response) -> Response[Union[Any, dict, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
body: DrawingCmdReq,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, dict, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.post(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
body: DrawingCmdReq,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, dict, Error]]:
|
||||||
|
""" Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
body: DrawingCmdReq,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, dict, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||||
|
response = await _client.post(**kwargs)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio(
|
||||||
|
body: DrawingCmdReq,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, dict, Error]]:
|
||||||
|
""" Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
109
kittycad/api/drawing/cmd_batch.py
Normal file
109
kittycad/api/drawing/cmd_batch.py
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.drawing_outcomes import DrawingOutcomes
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.drawing_cmd_req_batch import DrawingCmdReqBatch
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
body: DrawingCmdReqBatch,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/drawing/cmd_batch".format(client.base_url)
|
||||||
|
|
||||||
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
|
|
||||||
|
return {
|
||||||
|
"url": url,
|
||||||
|
"headers": headers,
|
||||||
|
"cookies": cookies,
|
||||||
|
"timeout": client.get_timeout(),
|
||||||
|
"content": body,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, DrawingOutcomes, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = DrawingOutcomes.from_dict(response.json())
|
||||||
|
return response_200
|
||||||
|
if response.status_code == 400:
|
||||||
|
response_4XX = Error.from_dict(response.json())
|
||||||
|
return response_4XX
|
||||||
|
if response.status_code == 500:
|
||||||
|
response_5XX = Error.from_dict(response.json())
|
||||||
|
return response_5XX
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _build_response(*, response: httpx.Response) -> Response[Union[Any, DrawingOutcomes, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
body: DrawingCmdReqBatch,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, DrawingOutcomes, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.post(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
body: DrawingCmdReqBatch,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, DrawingOutcomes, Error]]:
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
body: DrawingCmdReqBatch,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, DrawingOutcomes, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||||
|
response = await _client.post(**kwargs)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio(
|
||||||
|
body: DrawingCmdReqBatch,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, DrawingOutcomes, Error]]:
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
@ -1,134 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union, cast
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
|
||||||
from ...models.error import Error
|
|
||||||
from ...models.file2_d_vector_export_format import File2DVectorExportFormat
|
|
||||||
from ...models.file2_d_vector_import_format import File2DVectorImportFormat
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
output_format: File2DVectorExportFormat,
|
|
||||||
src_format: File2DVectorImportFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/file/2d/vector/conversion/{src_format}/{output_format}".format(client.base_url, output_format=output_format, src_format=src_format)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
"content": body,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, File2DVectorConversion, Error]]:
|
|
||||||
if response.status_code == 201:
|
|
||||||
response_201 = File2DVectorConversion.from_dict(response.json())
|
|
||||||
return response_201
|
|
||||||
if response.status_code == 400:
|
|
||||||
response_4XX = Error.from_dict(response.json())
|
|
||||||
return response_4XX
|
|
||||||
if response.status_code == 500:
|
|
||||||
response_5XX = Error.from_dict(response.json())
|
|
||||||
return response_5XX
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, File2DVectorConversion, Error]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
output_format: File2DVectorExportFormat,
|
|
||||||
src_format: File2DVectorImportFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, File2DVectorConversion, Error]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.post(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
output_format: File2DVectorExportFormat,
|
|
||||||
src_format: File2DVectorImportFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, File2DVectorConversion, Error]]:
|
|
||||||
""" Convert a 2D Vector file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
|
|
||||||
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
|
||||||
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
output_format: File2DVectorExportFormat,
|
|
||||||
src_format: File2DVectorImportFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, File2DVectorConversion, Error]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.post(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
output_format: File2DVectorExportFormat,
|
|
||||||
src_format: File2DVectorImportFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, File2DVectorConversion, Error]]:
|
|
||||||
""" Convert a 2D Vector file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
|
|
||||||
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
|
||||||
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -5,11 +5,11 @@ import httpx
|
|||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.file_center_of_mass import FileCenterOfMass
|
from ...models.file_center_of_mass import FileCenterOfMass
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.file3_d_import_format import File3DImportFormat
|
from ...models.file_import_format import FileImportFormat
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileCent
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -71,7 +71,7 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
@ -5,12 +5,12 @@ import httpx
|
|||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.file_density import FileDensity
|
from ...models.file_density import FileDensity
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.file3_d_import_format import File3DImportFormat
|
from ...models.file_import_format import FileImportFormat
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileDens
|
|||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -75,7 +75,7 @@ def sync_detailed(
|
|||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
|||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
material_mass: float,
|
material_mass: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
@ -5,12 +5,12 @@ import httpx
|
|||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.file_mass import FileMass
|
from ...models.file_mass import FileMass
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.file3_d_import_format import File3DImportFormat
|
from ...models.file_import_format import FileImportFormat
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
material_density: float,
|
material_density: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileMass
|
|||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
material_density: float,
|
material_density: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -75,7 +75,7 @@ def sync_detailed(
|
|||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
material_density: float,
|
material_density: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
|||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
material_density: float,
|
material_density: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
material_density: float,
|
material_density: float,
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
@ -5,11 +5,11 @@ import httpx
|
|||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.file_surface_area import FileSurfaceArea
|
from ...models.file_surface_area import FileSurfaceArea
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.file3_d_import_format import File3DImportFormat
|
from ...models.file_import_format import FileImportFormat
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileSurf
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -71,7 +71,7 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
@ -5,11 +5,11 @@ import httpx
|
|||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.file_volume import FileVolume
|
from ...models.file_volume import FileVolume
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.file3_d_import_format import File3DImportFormat
|
from ...models.file_import_format import FileImportFormat
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
|
|
||||||
def _get_kwargs(
|
def _get_kwargs(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileVolu
|
|||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
def sync_detailed(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -71,7 +71,7 @@ def sync_detailed(
|
|||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
async def asyncio_detailed(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
|||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
src_format: File3DImportFormat,
|
src_format: FileImportFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
@ -35,6 +35,11 @@ from .device_access_token_request_form import DeviceAccessTokenRequestForm
|
|||||||
from .device_auth_request_form import DeviceAuthRequestForm
|
from .device_auth_request_form import DeviceAuthRequestForm
|
||||||
from .device_auth_verify_params import DeviceAuthVerifyParams
|
from .device_auth_verify_params import DeviceAuthVerifyParams
|
||||||
from .docker_system_info import DockerSystemInfo
|
from .docker_system_info import DockerSystemInfo
|
||||||
|
from .drawing_cmd_id import DrawingCmdId
|
||||||
|
from .drawing_cmd_req import DrawingCmdReq
|
||||||
|
from .drawing_cmd_req_batch import DrawingCmdReqBatch
|
||||||
|
from .drawing_error import DrawingError
|
||||||
|
from .drawing_outcomes import DrawingOutcomes
|
||||||
from .email_authentication_form import EmailAuthenticationForm
|
from .email_authentication_form import EmailAuthenticationForm
|
||||||
from .engine_metadata import EngineMetadata
|
from .engine_metadata import EngineMetadata
|
||||||
from .environment import Environment
|
from .environment import Environment
|
||||||
@ -42,10 +47,6 @@ from .error import Error
|
|||||||
from .executor_metadata import ExecutorMetadata
|
from .executor_metadata import ExecutorMetadata
|
||||||
from .extended_user import ExtendedUser
|
from .extended_user import ExtendedUser
|
||||||
from .extended_user_results_page import ExtendedUserResultsPage
|
from .extended_user_results_page import ExtendedUserResultsPage
|
||||||
from .file2_d_vector_conversion import File2DVectorConversion
|
|
||||||
from .file2_d_vector_export_format import File2DVectorExportFormat
|
|
||||||
from .file2_d_vector_import_format import File2DVectorImportFormat
|
|
||||||
from .file3_d_import_format import File3DImportFormat
|
|
||||||
from .file_center_of_mass import FileCenterOfMass
|
from .file_center_of_mass import FileCenterOfMass
|
||||||
from .file_conversion import FileConversion
|
from .file_conversion import FileConversion
|
||||||
from .file_density import FileDensity
|
from .file_density import FileDensity
|
||||||
|
@ -3,7 +3,6 @@ from enum import Enum
|
|||||||
|
|
||||||
class AsyncApiCallType(str, Enum):
|
class AsyncApiCallType(str, Enum):
|
||||||
FILE_CONVERSION = 'FileConversion'
|
FILE_CONVERSION = 'FileConversion'
|
||||||
FILE2_D_VECTOR_CONVERSION = 'File2DVectorConversion'
|
|
||||||
FILE_VOLUME = 'FileVolume'
|
FILE_VOLUME = 'FileVolume'
|
||||||
FILE_CENTER_OF_MASS = 'FileCenterOfMass'
|
FILE_CENTER_OF_MASS = 'FileCenterOfMass'
|
||||||
FILE_MASS = 'FileMass'
|
FILE_MASS = 'FileMass'
|
||||||
|
4
kittycad/models/drawing_cmd_id.py
Normal file
4
kittycad/models/drawing_cmd_id.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
class DrawingCmdId(str):
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self
|
84
kittycad/models/drawing_cmd_req.py
Normal file
84
kittycad/models/drawing_cmd_req.py
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
|
||||||
|
from ..models.drawing_cmd import DrawingCmd
|
||||||
|
from ..models.drawing_cmd_id import DrawingCmdId
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="DrawingCmdReq")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class DrawingCmdReq:
|
||||||
|
""" """
|
||||||
|
cmd: Union[Unset, DrawingCmd] = UNSET
|
||||||
|
cmd_id: Union[Unset, DrawingCmdId] = UNSET
|
||||||
|
file_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
cmd: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.cmd, Unset):
|
||||||
|
cmd = self.cmd.value
|
||||||
|
cmd_id: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.cmd_id, Unset):
|
||||||
|
cmd_id = self.cmd_id.value
|
||||||
|
file_id = self.file_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if cmd is not UNSET:
|
||||||
|
field_dict['cmd'] = cmd
|
||||||
|
if cmd_id is not UNSET:
|
||||||
|
field_dict['cmd_id'] = cmd_id
|
||||||
|
if file_id is not UNSET:
|
||||||
|
field_dict['file_id'] = file_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_cmd = d.pop("cmd", UNSET)
|
||||||
|
cmd: Union[Unset, DrawingCmd]
|
||||||
|
if isinstance(_cmd, Unset):
|
||||||
|
cmd = UNSET
|
||||||
|
else:
|
||||||
|
cmd = DrawingCmd(_cmd)
|
||||||
|
|
||||||
|
_cmd_id = d.pop("cmd_id", UNSET)
|
||||||
|
cmd_id: Union[Unset, DrawingCmdId]
|
||||||
|
if isinstance(_cmd_id, Unset):
|
||||||
|
cmd_id = UNSET
|
||||||
|
else:
|
||||||
|
cmd_id = DrawingCmdId(_cmd_id)
|
||||||
|
|
||||||
|
file_id = d.pop("file_id", UNSET)
|
||||||
|
|
||||||
|
drawing_cmd_req = cls(
|
||||||
|
cmd=cmd,
|
||||||
|
cmd_id=cmd_id,
|
||||||
|
file_id=file_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
drawing_cmd_req.additional_properties = d
|
||||||
|
return drawing_cmd_req
|
||||||
|
|
||||||
|
@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/drawing_cmd_req_batch.py
Normal file
61
kittycad/models/drawing_cmd_req_batch.py
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
|
||||||
|
from ..models.drawing_cmd_req import DrawingCmdReq
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="DrawingCmdReqBatch")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class DrawingCmdReqBatch:
|
||||||
|
""" """
|
||||||
|
cmds: Union[Unset, Any] = UNSET
|
||||||
|
file_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
cmds = self.cmds
|
||||||
|
file_id = self.file_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if cmds is not UNSET:
|
||||||
|
field_dict['cmds'] = cmds
|
||||||
|
if file_id is not UNSET:
|
||||||
|
field_dict['file_id'] = file_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
cmds = d.pop("cmds", UNSET)
|
||||||
|
file_id = d.pop("file_id", UNSET)
|
||||||
|
|
||||||
|
drawing_cmd_req_batch = cls(
|
||||||
|
cmds=cmds,
|
||||||
|
file_id=file_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
drawing_cmd_req_batch.additional_properties = d
|
||||||
|
return drawing_cmd_req_batch
|
||||||
|
|
||||||
|
@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
|
75
kittycad/models/drawing_error.py
Normal file
75
kittycad/models/drawing_error.py
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="DrawingError")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class DrawingError:
|
||||||
|
""" """
|
||||||
|
error_code: Union[Unset, str] = UNSET
|
||||||
|
external_message: Union[Unset, str] = UNSET
|
||||||
|
internal_message: Union[Unset, str] = UNSET
|
||||||
|
status_code: Union[Unset, int] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
error_code = self.error_code
|
||||||
|
external_message = self.external_message
|
||||||
|
internal_message = self.internal_message
|
||||||
|
status_code = self.status_code
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if error_code is not UNSET:
|
||||||
|
field_dict['error_code'] = error_code
|
||||||
|
if external_message is not UNSET:
|
||||||
|
field_dict['external_message'] = external_message
|
||||||
|
if internal_message is not UNSET:
|
||||||
|
field_dict['internal_message'] = internal_message
|
||||||
|
if status_code is not UNSET:
|
||||||
|
field_dict['status_code'] = status_code
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
error_code = d.pop("error_code", UNSET)
|
||||||
|
|
||||||
|
external_message = d.pop("external_message", UNSET)
|
||||||
|
|
||||||
|
internal_message = d.pop("internal_message", UNSET)
|
||||||
|
|
||||||
|
status_code = d.pop("status_code", UNSET)
|
||||||
|
|
||||||
|
drawing_error = cls(
|
||||||
|
error_code=error_code,
|
||||||
|
external_message=external_message,
|
||||||
|
internal_message=internal_message,
|
||||||
|
status_code=status_code,
|
||||||
|
)
|
||||||
|
|
||||||
|
drawing_error.additional_properties = d
|
||||||
|
return drawing_error
|
||||||
|
|
||||||
|
@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
|
55
kittycad/models/drawing_outcomes.py
Normal file
55
kittycad/models/drawing_outcomes.py
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
|
||||||
|
from ..models.drawing_outcome import DrawingOutcome
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="DrawingOutcomes")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class DrawingOutcomes:
|
||||||
|
""" """
|
||||||
|
outcomes: Union[Unset, Any] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
outcomes = self.outcomes
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if outcomes is not UNSET:
|
||||||
|
field_dict['outcomes'] = outcomes
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
outcomes = d.pop("outcomes", UNSET)
|
||||||
|
|
||||||
|
drawing_outcomes = cls(
|
||||||
|
outcomes=outcomes,
|
||||||
|
)
|
||||||
|
|
||||||
|
drawing_outcomes.additional_properties = d
|
||||||
|
return drawing_outcomes
|
||||||
|
|
||||||
|
@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
|
@ -1,179 +0,0 @@
|
|||||||
import datetime
|
|
||||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
|
||||||
|
|
||||||
import attr
|
|
||||||
from dateutil.parser import isoparse
|
|
||||||
|
|
||||||
from ..models.uuid import Uuid
|
|
||||||
from ..models.file2_d_vector_export_format import File2DVectorExportFormat
|
|
||||||
from ..models.file2_d_vector_import_format import File2DVectorImportFormat
|
|
||||||
from ..models.api_call_status import ApiCallStatus
|
|
||||||
from ..types import UNSET, Unset
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="File2DVectorConversion")
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
|
||||||
class File2DVectorConversion:
|
|
||||||
""" """
|
|
||||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
|
||||||
error: Union[Unset, str] = UNSET
|
|
||||||
id: Union[Unset, str] = UNSET
|
|
||||||
output: Union[Unset, str] = UNSET
|
|
||||||
output_format: Union[Unset, File2DVectorExportFormat] = UNSET
|
|
||||||
src_format: Union[Unset, File2DVectorImportFormat] = UNSET
|
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
|
||||||
status: Union[Unset, ApiCallStatus] = UNSET
|
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
|
||||||
user_id: Union[Unset, str] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
completed_at: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.completed_at, Unset):
|
|
||||||
completed_at = self.completed_at.isoformat()
|
|
||||||
created_at: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.created_at, Unset):
|
|
||||||
created_at = self.created_at.isoformat()
|
|
||||||
error = self.error
|
|
||||||
id = self.id
|
|
||||||
output = self.output
|
|
||||||
output_format: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.output_format, Unset):
|
|
||||||
output_format = self.output_format.value
|
|
||||||
src_format: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.src_format, Unset):
|
|
||||||
src_format = self.src_format.value
|
|
||||||
started_at: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.started_at, Unset):
|
|
||||||
started_at = self.started_at.isoformat()
|
|
||||||
status: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.status, Unset):
|
|
||||||
status = self.status.value
|
|
||||||
updated_at: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.updated_at, Unset):
|
|
||||||
updated_at = self.updated_at.isoformat()
|
|
||||||
user_id = self.user_id
|
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if completed_at is not UNSET:
|
|
||||||
field_dict['completed_at'] = completed_at
|
|
||||||
if created_at is not UNSET:
|
|
||||||
field_dict['created_at'] = created_at
|
|
||||||
if error is not UNSET:
|
|
||||||
field_dict['error'] = error
|
|
||||||
if id is not UNSET:
|
|
||||||
field_dict['id'] = id
|
|
||||||
if output is not UNSET:
|
|
||||||
field_dict['output'] = output
|
|
||||||
if output_format is not UNSET:
|
|
||||||
field_dict['output_format'] = output_format
|
|
||||||
if src_format is not UNSET:
|
|
||||||
field_dict['src_format'] = src_format
|
|
||||||
if started_at is not UNSET:
|
|
||||||
field_dict['started_at'] = started_at
|
|
||||||
if status is not UNSET:
|
|
||||||
field_dict['status'] = status
|
|
||||||
if updated_at is not UNSET:
|
|
||||||
field_dict['updated_at'] = updated_at
|
|
||||||
if user_id is not UNSET:
|
|
||||||
field_dict['user_id'] = user_id
|
|
||||||
|
|
||||||
return field_dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
||||||
d = src_dict.copy()
|
|
||||||
_completed_at = d.pop("completed_at", UNSET)
|
|
||||||
completed_at: Union[Unset, datetime.datetime]
|
|
||||||
if isinstance(_completed_at, Unset):
|
|
||||||
completed_at = UNSET
|
|
||||||
else:
|
|
||||||
completed_at = isoparse(_completed_at)
|
|
||||||
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
|
||||||
created_at: Union[Unset, datetime.datetime]
|
|
||||||
if isinstance(_created_at, Unset):
|
|
||||||
created_at = UNSET
|
|
||||||
else:
|
|
||||||
created_at = isoparse(_created_at)
|
|
||||||
|
|
||||||
error = d.pop("error", UNSET)
|
|
||||||
|
|
||||||
id = d.pop("id", UNSET)
|
|
||||||
|
|
||||||
output = d.pop("output", UNSET)
|
|
||||||
|
|
||||||
_output_format = d.pop("output_format", UNSET)
|
|
||||||
output_format: Union[Unset, File2DVectorExportFormat]
|
|
||||||
if isinstance(_output_format, Unset):
|
|
||||||
output_format = UNSET
|
|
||||||
else:
|
|
||||||
output_format = File2DVectorExportFormat(_output_format)
|
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
|
||||||
src_format: Union[Unset, File2DVectorImportFormat]
|
|
||||||
if isinstance(_src_format, Unset):
|
|
||||||
src_format = UNSET
|
|
||||||
else:
|
|
||||||
src_format = File2DVectorImportFormat(_src_format)
|
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
|
||||||
started_at: Union[Unset, datetime.datetime]
|
|
||||||
if isinstance(_started_at, Unset):
|
|
||||||
started_at = UNSET
|
|
||||||
else:
|
|
||||||
started_at = isoparse(_started_at)
|
|
||||||
|
|
||||||
_status = d.pop("status", UNSET)
|
|
||||||
status: Union[Unset, ApiCallStatus]
|
|
||||||
if isinstance(_status, Unset):
|
|
||||||
status = UNSET
|
|
||||||
else:
|
|
||||||
status = ApiCallStatus(_status)
|
|
||||||
|
|
||||||
_updated_at = d.pop("updated_at", UNSET)
|
|
||||||
updated_at: Union[Unset, datetime.datetime]
|
|
||||||
if isinstance(_updated_at, Unset):
|
|
||||||
updated_at = UNSET
|
|
||||||
else:
|
|
||||||
updated_at = isoparse(_updated_at)
|
|
||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
|
||||||
|
|
||||||
file2_d_vector_conversion = cls(
|
|
||||||
completed_at=completed_at,
|
|
||||||
created_at=created_at,
|
|
||||||
error=error,
|
|
||||||
id=id,
|
|
||||||
output=output,
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
started_at=started_at,
|
|
||||||
status=status,
|
|
||||||
updated_at=updated_at,
|
|
||||||
user_id=user_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
file2_d_vector_conversion.additional_properties = d
|
|
||||||
return file2_d_vector_conversion
|
|
||||||
|
|
||||||
@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
|
|
@ -1,11 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class File2DVectorExportFormat(str, Enum):
|
|
||||||
DXF = 'dxf'
|
|
||||||
PNG = 'png'
|
|
||||||
PS = 'ps'
|
|
||||||
SVG = 'svg'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -1,9 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class File2DVectorImportFormat(str, Enum):
|
|
||||||
DXF = 'dxf'
|
|
||||||
SVG = 'svg'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -1,15 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class File3DImportFormat(str, Enum):
|
|
||||||
DAE = 'dae'
|
|
||||||
DXF = 'dxf'
|
|
||||||
FBX = 'fbx'
|
|
||||||
OBJ_ZIP = 'obj_zip'
|
|
||||||
OBJ = 'obj'
|
|
||||||
PLY = 'ply'
|
|
||||||
STEP = 'step'
|
|
||||||
STL = 'stl'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -5,7 +5,7 @@ import attr
|
|||||||
from dateutil.parser import isoparse
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
from ..models.file3_d_import_format import File3DImportFormat
|
from ..models.file_import_format import FileImportFormat
|
||||||
from ..models.api_call_status import ApiCallStatus
|
from ..models.api_call_status import ApiCallStatus
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ class FileCenterOfMass:
|
|||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
error: Union[Unset, str] = UNSET
|
error: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, ApiCallStatus] = UNSET
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
@ -104,11 +104,11 @@ class FileCenterOfMass:
|
|||||||
id = d.pop("id", UNSET)
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, File3DImportFormat]
|
src_format: Union[Unset, FileImportFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = File3DImportFormat(_src_format)
|
src_format = FileImportFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
@ -5,7 +5,7 @@ import attr
|
|||||||
from dateutil.parser import isoparse
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
from ..models.file3_d_import_format import File3DImportFormat
|
from ..models.file_import_format import FileImportFormat
|
||||||
from ..models.api_call_status import ApiCallStatus
|
from ..models.api_call_status import ApiCallStatus
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class FileDensity:
|
|||||||
error: Union[Unset, str] = UNSET
|
error: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
material_mass: Union[Unset, float] = UNSET
|
material_mass: Union[Unset, float] = UNSET
|
||||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, ApiCallStatus] = UNSET
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
@ -108,11 +108,11 @@ class FileDensity:
|
|||||||
material_mass = d.pop("material_mass", UNSET)
|
material_mass = d.pop("material_mass", UNSET)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, File3DImportFormat]
|
src_format: Union[Unset, FileImportFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = File3DImportFormat(_src_format)
|
src_format = FileImportFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
@ -10,7 +10,6 @@ class FileExportFormat(str, Enum):
|
|||||||
PLY = 'ply'
|
PLY = 'ply'
|
||||||
STEP = 'step'
|
STEP = 'step'
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
SVG = 'svg'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -10,7 +10,6 @@ class FileImportFormat(str, Enum):
|
|||||||
PLY = 'ply'
|
PLY = 'ply'
|
||||||
STEP = 'step'
|
STEP = 'step'
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
SVG = 'svg'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -5,7 +5,7 @@ import attr
|
|||||||
from dateutil.parser import isoparse
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
from ..models.file3_d_import_format import File3DImportFormat
|
from ..models.file_import_format import FileImportFormat
|
||||||
from ..models.api_call_status import ApiCallStatus
|
from ..models.api_call_status import ApiCallStatus
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ class FileMass:
|
|||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
mass: Union[Unset, float] = UNSET
|
mass: Union[Unset, float] = UNSET
|
||||||
material_density: Union[Unset, float] = UNSET
|
material_density: Union[Unset, float] = UNSET
|
||||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, ApiCallStatus] = UNSET
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
@ -108,11 +108,11 @@ class FileMass:
|
|||||||
material_density = d.pop("material_density", UNSET)
|
material_density = d.pop("material_density", UNSET)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, File3DImportFormat]
|
src_format: Union[Unset, FileImportFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = File3DImportFormat(_src_format)
|
src_format = FileImportFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
@ -5,7 +5,7 @@ import attr
|
|||||||
from dateutil.parser import isoparse
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
from ..models.file3_d_import_format import File3DImportFormat
|
from ..models.file_import_format import FileImportFormat
|
||||||
from ..models.api_call_status import ApiCallStatus
|
from ..models.api_call_status import ApiCallStatus
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ class FileSurfaceArea:
|
|||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
error: Union[Unset, str] = UNSET
|
error: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, ApiCallStatus] = UNSET
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
surface_area: Union[Unset, float] = UNSET
|
surface_area: Union[Unset, float] = UNSET
|
||||||
@ -100,11 +100,11 @@ class FileSurfaceArea:
|
|||||||
id = d.pop("id", UNSET)
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, File3DImportFormat]
|
src_format: Union[Unset, FileImportFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = File3DImportFormat(_src_format)
|
src_format = FileImportFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
@ -5,7 +5,7 @@ import attr
|
|||||||
from dateutil.parser import isoparse
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
from ..models.file3_d_import_format import File3DImportFormat
|
from ..models.file_import_format import FileImportFormat
|
||||||
from ..models.api_call_status import ApiCallStatus
|
from ..models.api_call_status import ApiCallStatus
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ class FileVolume:
|
|||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
error: Union[Unset, str] = UNSET
|
error: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, ApiCallStatus] = UNSET
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
@ -100,11 +100,11 @@ class FileVolume:
|
|||||||
id = d.pop("id", UNSET)
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, File3DImportFormat]
|
src_format: Union[Unset, FileImportFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = File3DImportFormat(_src_format)
|
src_format = FileImportFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
595
spec.json
595
spec.json
@ -621,101 +621,6 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "A 2DVectorfile conversion.",
|
|
||||||
"properties": {
|
|
||||||
"completed_at": {
|
|
||||||
"description": "The time and date the API call was completed.",
|
|
||||||
"format": "date-time",
|
|
||||||
"nullable": true,
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"created_at": {
|
|
||||||
"description": "The time and date the API call was created.",
|
|
||||||
"format": "date-time",
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"description": "The error the function returned, if any.",
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/Uuid"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
|
|
||||||
},
|
|
||||||
"output": {
|
|
||||||
"description": "The converted file, if completed, base64 encoded.",
|
|
||||||
"format": "byte",
|
|
||||||
"nullable": true,
|
|
||||||
"title": "String",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"output_format": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/File2DVectorExportFormat"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The output format of the file conversion."
|
|
||||||
},
|
|
||||||
"src_format": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/File2DVectorImportFormat"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The source format of the file conversion."
|
|
||||||
},
|
|
||||||
"started_at": {
|
|
||||||
"description": "The time and date the API call was started.",
|
|
||||||
"format": "date-time",
|
|
||||||
"nullable": true,
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ApiCallStatus"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The status of the API call."
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"enum": [
|
|
||||||
"File2DVectorConversion"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"updated_at": {
|
|
||||||
"description": "The time and date the API call was last updated.",
|
|
||||||
"format": "date-time",
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"description": "The user ID of the user who created the API call.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"created_at",
|
|
||||||
"id",
|
|
||||||
"output_format",
|
|
||||||
"src_format",
|
|
||||||
"status",
|
|
||||||
"type",
|
|
||||||
"updated_at"
|
|
||||||
],
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "File center of mass.",
|
"description": "File center of mass.",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -757,7 +662,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -848,7 +753,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -927,7 +832,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -1024,7 +929,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -1103,7 +1008,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -1183,7 +1088,6 @@
|
|||||||
"description": "The type of async API call.",
|
"description": "The type of async API call.",
|
||||||
"enum": [
|
"enum": [
|
||||||
"FileConversion",
|
"FileConversion",
|
||||||
"File2DVectorConversion",
|
|
||||||
"FileVolume",
|
"FileVolume",
|
||||||
"FileCenterOfMass",
|
"FileCenterOfMass",
|
||||||
"FileMass",
|
"FileMass",
|
||||||
@ -2651,6 +2555,224 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"DrawingCmd": {
|
||||||
|
"description": "Commands that the KittyCAD engine can execute.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "Draw a circle.",
|
||||||
|
"properties": {
|
||||||
|
"DrawCircle": {
|
||||||
|
"properties": {
|
||||||
|
"center": {
|
||||||
|
"description": "The center of the circle.",
|
||||||
|
"items": {
|
||||||
|
"format": "float",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"maxItems": 3,
|
||||||
|
"minItems": 3,
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"radius": {
|
||||||
|
"description": "The radius of the circle.",
|
||||||
|
"format": "float",
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"center",
|
||||||
|
"radius"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"DrawCircle"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "Extrude a sketch.",
|
||||||
|
"properties": {
|
||||||
|
"Extrude": {
|
||||||
|
"properties": {
|
||||||
|
"distance": {
|
||||||
|
"description": "How far to extrude.",
|
||||||
|
"format": "float",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"sketch": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/DrawingCmdId"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Which sketch to extrude."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"distance",
|
||||||
|
"sketch"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"Extrude"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"DrawingCmdId": {
|
||||||
|
"description": "All commands have unique IDs. These should be randomly generated.",
|
||||||
|
"format": "uuid",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"DrawingCmdReq": {
|
||||||
|
"description": "A graphics command submitted to the KittyCAD engine via the Drawing API.",
|
||||||
|
"properties": {
|
||||||
|
"cmd": {
|
||||||
|
"$ref": "#/components/schemas/DrawingCmd"
|
||||||
|
},
|
||||||
|
"cmd_id": {
|
||||||
|
"$ref": "#/components/schemas/DrawingCmdId"
|
||||||
|
},
|
||||||
|
"file_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"cmd",
|
||||||
|
"cmd_id",
|
||||||
|
"file_id"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"DrawingCmdReqBatch": {
|
||||||
|
"description": "A batch set of graphics commands submitted to the KittyCAD engine via the Drawing API.",
|
||||||
|
"properties": {
|
||||||
|
"cmds": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"$ref": "#/components/schemas/DrawingCmdReq"
|
||||||
|
},
|
||||||
|
"description": "A set of commands to submit to the KittyCAD engine in a batch.",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"file_id": {
|
||||||
|
"description": "Which file is being drawn in.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"cmds",
|
||||||
|
"file_id"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"DrawingError": {
|
||||||
|
"description": "Why a command submitted to the Drawing API failed.",
|
||||||
|
"properties": {
|
||||||
|
"error_code": {
|
||||||
|
"description": "A string error code which refers to a family of errors. E.g. \"InvalidInput\".",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"external_message": {
|
||||||
|
"description": "Describe the specific error which occurred. Will be shown to users, not logged.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"internal_message": {
|
||||||
|
"description": "Describe the specific error which occurred. Will be logged, not shown to users.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status_code": {
|
||||||
|
"description": "A HTTP status code.",
|
||||||
|
"format": "uint16",
|
||||||
|
"minimum": 0,
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"error_code",
|
||||||
|
"external_message",
|
||||||
|
"internal_message",
|
||||||
|
"status_code"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"DrawingOutcome": {
|
||||||
|
"description": "The result from one drawing command in a batch.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "Each successful command has some result. Unfortunately this isn't strongly typed, because the result depends on the command. This means the OpenAPI schema for this won't be very useful.",
|
||||||
|
"properties": {
|
||||||
|
"Success": {}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"Success"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "It failed. Why? See 'struct Error' above.",
|
||||||
|
"properties": {
|
||||||
|
"Error": {
|
||||||
|
"$ref": "#/components/schemas/DrawingError"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"Error"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "Cancelled because it required the output of a previous command, which failed.",
|
||||||
|
"properties": {
|
||||||
|
"Cancelled": {
|
||||||
|
"properties": {
|
||||||
|
"what_failed": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/DrawingCmdId"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The ID of the command that failed, cancelling this command."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"what_failed"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"Cancelled"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"DrawingOutcomes": {
|
||||||
|
"description": "The result from a batch of drawing commands.",
|
||||||
|
"properties": {
|
||||||
|
"outcomes": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"$ref": "#/components/schemas/DrawingOutcome"
|
||||||
|
},
|
||||||
|
"description": "The results from each command in the batch.",
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"outcomes"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"EmailAuthenticationForm": {
|
"EmailAuthenticationForm": {
|
||||||
"description": "The body of the form for email authentication.",
|
"description": "The body of the form for email authentication.",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -2896,126 +3018,6 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"File2DVectorConversion": {
|
|
||||||
"description": "A 2D Vector file conversion.",
|
|
||||||
"properties": {
|
|
||||||
"completed_at": {
|
|
||||||
"description": "The time and date the API call was completed.",
|
|
||||||
"format": "date-time",
|
|
||||||
"nullable": true,
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"created_at": {
|
|
||||||
"description": "The time and date the API call was created.",
|
|
||||||
"format": "date-time",
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"description": "The error the function returned, if any.",
|
|
||||||
"nullable": true,
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/Uuid"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
|
|
||||||
},
|
|
||||||
"output": {
|
|
||||||
"description": "The converted file, if completed, base64 encoded.",
|
|
||||||
"format": "byte",
|
|
||||||
"nullable": true,
|
|
||||||
"title": "String",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"output_format": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/File2DVectorExportFormat"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The output format of the file conversion."
|
|
||||||
},
|
|
||||||
"src_format": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/File2DVectorImportFormat"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The source format of the file conversion."
|
|
||||||
},
|
|
||||||
"started_at": {
|
|
||||||
"description": "The time and date the API call was started.",
|
|
||||||
"format": "date-time",
|
|
||||||
"nullable": true,
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/ApiCallStatus"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The status of the API call."
|
|
||||||
},
|
|
||||||
"updated_at": {
|
|
||||||
"description": "The time and date the API call was last updated.",
|
|
||||||
"format": "date-time",
|
|
||||||
"title": "DateTime",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"user_id": {
|
|
||||||
"description": "The user ID of the user who created the API call.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"created_at",
|
|
||||||
"id",
|
|
||||||
"output_format",
|
|
||||||
"src_format",
|
|
||||||
"status",
|
|
||||||
"updated_at"
|
|
||||||
],
|
|
||||||
"type": "object"
|
|
||||||
},
|
|
||||||
"File2DVectorExportFormat": {
|
|
||||||
"description": "The valid types of Vector output file formats.",
|
|
||||||
"enum": [
|
|
||||||
"dxf",
|
|
||||||
"png",
|
|
||||||
"ps",
|
|
||||||
"svg"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"File2DVectorImportFormat": {
|
|
||||||
"description": "The valid types of Vector source file formats.",
|
|
||||||
"enum": [
|
|
||||||
"dxf",
|
|
||||||
"svg"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"File3DImportFormat": {
|
|
||||||
"description": "The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file.",
|
|
||||||
"enum": [
|
|
||||||
"dae",
|
|
||||||
"dxf",
|
|
||||||
"fbx",
|
|
||||||
"obj_zip",
|
|
||||||
"obj",
|
|
||||||
"ply",
|
|
||||||
"step",
|
|
||||||
"stl"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"FileCenterOfMass": {
|
"FileCenterOfMass": {
|
||||||
"description": "A file center of mass result.",
|
"description": "A file center of mass result.",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -3057,7 +3059,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -3229,7 +3231,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -3279,8 +3281,7 @@
|
|||||||
"obj",
|
"obj",
|
||||||
"ply",
|
"ply",
|
||||||
"step",
|
"step",
|
||||||
"stl",
|
"stl"
|
||||||
"svg"
|
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3294,8 +3295,7 @@
|
|||||||
"obj",
|
"obj",
|
||||||
"ply",
|
"ply",
|
||||||
"step",
|
"step",
|
||||||
"stl",
|
"stl"
|
||||||
"svg"
|
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -3343,7 +3343,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -3415,7 +3415,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -3506,7 +3506,7 @@
|
|||||||
"src_format": {
|
"src_format": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "The source format of the file."
|
"description": "The source format of the file."
|
||||||
@ -9168,53 +9168,28 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/file/2d/vector/conversion/{src_format}/{output_format}": {
|
"/drawing/cmd": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "Convert a 2D Vector file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.",
|
"description": "Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.",
|
||||||
"operationId": "create_file_2d_vector_conversion",
|
"operationId": "cmd",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"description": "The format the file should be converted to.",
|
|
||||||
"in": "path",
|
|
||||||
"name": "output_format",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/File2DVectorExportFormat"
|
|
||||||
},
|
|
||||||
"style": "simple"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "The format of the file to convert.",
|
|
||||||
"in": "path",
|
|
||||||
"name": "src_format",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/File2DVectorImportFormat"
|
|
||||||
},
|
|
||||||
"style": "simple"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
"application/octet-stream": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"format": "binary",
|
"$ref": "#/components/schemas/DrawingCmdReq"
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"200": {
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {}
|
||||||
"$ref": "#/components/schemas/File2DVectorConversion"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": "successful creation",
|
"description": "successful operation",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Access-Control-Allow-Credentials": {
|
"Access-Control-Allow-Credentials": {
|
||||||
"description": "Access-Control-Allow-Credentials header.",
|
"description": "Access-Control-Allow-Credentials header.",
|
||||||
@ -9257,9 +9232,82 @@
|
|||||||
"$ref": "#/components/responses/Error"
|
"$ref": "#/components/responses/Error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"summary": "Convert 2D Vector file.",
|
"summary": "Submit one drawing operation.",
|
||||||
"tags": [
|
"tags": [
|
||||||
"file"
|
"drawing",
|
||||||
|
"hidden"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/drawing/cmd_batch": {
|
||||||
|
"post": {
|
||||||
|
"operationId": "cmd_batch",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DrawingCmdReqBatch"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/DrawingOutcomes"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": "successful operation",
|
||||||
|
"headers": {
|
||||||
|
"Access-Control-Allow-Credentials": {
|
||||||
|
"description": "Access-Control-Allow-Credentials header.",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Headers": {
|
||||||
|
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Methods": {
|
||||||
|
"description": "Access-Control-Allow-Methods header.",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Origin": {
|
||||||
|
"description": "Access-Control-Allow-Origin header.",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"style": "simple"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"4XX": {
|
||||||
|
"$ref": "#/components/responses/Error"
|
||||||
|
},
|
||||||
|
"5XX": {
|
||||||
|
"$ref": "#/components/responses/Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Submit many drawing operations.",
|
||||||
|
"tags": [
|
||||||
|
"drawing",
|
||||||
|
"hidden"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -9274,7 +9322,7 @@
|
|||||||
"name": "src_format",
|
"name": "src_format",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
},
|
},
|
||||||
"style": "form"
|
"style": "form"
|
||||||
}
|
}
|
||||||
@ -9466,7 +9514,7 @@
|
|||||||
"name": "src_format",
|
"name": "src_format",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
},
|
},
|
||||||
"style": "form"
|
"style": "form"
|
||||||
}
|
}
|
||||||
@ -9658,7 +9706,7 @@
|
|||||||
"name": "src_format",
|
"name": "src_format",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
},
|
},
|
||||||
"style": "form"
|
"style": "form"
|
||||||
}
|
}
|
||||||
@ -9744,7 +9792,7 @@
|
|||||||
"name": "src_format",
|
"name": "src_format",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
},
|
},
|
||||||
"style": "form"
|
"style": "form"
|
||||||
}
|
}
|
||||||
@ -9830,7 +9878,7 @@
|
|||||||
"name": "src_format",
|
"name": "src_format",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/File3DImportFormat"
|
"$ref": "#/components/schemas/FileImportFormat"
|
||||||
},
|
},
|
||||||
"style": "form"
|
"style": "form"
|
||||||
}
|
}
|
||||||
@ -15579,6 +15627,13 @@
|
|||||||
},
|
},
|
||||||
"name": "constant"
|
"name": "constant"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Drawing API for updating your 3D files using the KittyCAD engine.",
|
||||||
|
"externalDocs": {
|
||||||
|
"url": "https://docs.kittycad.io/api/drawing"
|
||||||
|
},
|
||||||
|
"name": "drawing"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.",
|
"description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.",
|
||||||
"externalDocs": {
|
"externalDocs": {
|
||||||
|
Reference in New Issue
Block a user