Update api spec (#202)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
committed by
GitHub
parent
a3089ef956
commit
042bb964e5
2
.github/workflows/ruff.yml
vendored
2
.github/workflows/ruff.yml
vendored
@ -35,4 +35,4 @@ jobs:
|
|||||||
- name: Run ruff
|
- name: Run ruff
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
poetry run ruff check --format=github .
|
poetry run ruff check --output-format=github .
|
||||||
|
@ -1577,7 +1577,7 @@ def generateObjectTypeCode(
|
|||||||
|
|
||||||
description = ""
|
description = ""
|
||||||
if "description" in schema:
|
if "description" in schema:
|
||||||
description = schema["description"]
|
description = schema["description"].replace('"', '\\"')
|
||||||
|
|
||||||
imports = []
|
imports = []
|
||||||
refs = getRefs(schema)
|
refs = getRefs(schema)
|
||||||
@ -1801,6 +1801,11 @@ def getRequestBodyRefs(endpoint: dict) -> List[str]:
|
|||||||
if "$ref" in form:
|
if "$ref" in form:
|
||||||
ref = form["$ref"].replace("#/components/schemas/", "")
|
ref = form["$ref"].replace("#/components/schemas/", "")
|
||||||
refs.append(ref)
|
refs.append(ref)
|
||||||
|
elif content_type == "multipart/form-data":
|
||||||
|
form = content[content_type]["schema"]
|
||||||
|
if "$ref" in form:
|
||||||
|
ref = form["$ref"].replace("#/components/schemas/", "")
|
||||||
|
refs.append(ref)
|
||||||
else:
|
else:
|
||||||
# Throw an error for an unsupported content type.
|
# Throw an error for an unsupported content type.
|
||||||
logging.error("content: ", content)
|
logging.error("content: ", content)
|
||||||
@ -1839,6 +1844,15 @@ def getRequestBodyTypeSchema(
|
|||||||
elif form != {}:
|
elif form != {}:
|
||||||
logging.error("not a ref: ", form)
|
logging.error("not a ref: ", form)
|
||||||
raise Exception("not a ref")
|
raise Exception("not a ref")
|
||||||
|
elif content_type == "multipart/form-data":
|
||||||
|
form = content[content_type]["schema"]
|
||||||
|
if "$ref" in form:
|
||||||
|
ref = form["$ref"].replace("#/components/schemas/", "")
|
||||||
|
type_schema = data["components"]["schemas"][ref]
|
||||||
|
return ref, type_schema
|
||||||
|
elif form != {}:
|
||||||
|
type_schema = form
|
||||||
|
return None, type_schema
|
||||||
else:
|
else:
|
||||||
logging.error("unsupported content type: ", content_type)
|
logging.error("unsupported content type: ", content_type)
|
||||||
raise Exception("unsupported content type")
|
raise Exception("unsupported content type")
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -79,6 +79,7 @@ def sync(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
|
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
body=body,
|
body=body,
|
||||||
client=client,
|
client=client,
|
||||||
@ -106,6 +107,7 @@ async def asyncio(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
|
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
body=body,
|
body=body,
|
||||||
|
@ -20,6 +20,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if feedback is not None:
|
if feedback is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&feedback=" + str(feedback)
|
url = url + "&feedback=" + str(feedback)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -22,24 +22,28 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
if no_models is not None:
|
if no_models is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&no_models=" + str(no_models)
|
url = url + "&no_models=" + str(no_models)
|
||||||
else:
|
else:
|
||||||
|
@ -19,6 +19,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if group_by is not None:
|
if group_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&group_by=" + str(group_by)
|
url = url + "&group_by=" + str(group_by)
|
||||||
else:
|
else:
|
||||||
|
@ -35,9 +35,7 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
def _parse_response(*, response: httpx.Response) -> Optional[
|
||||||
*, response: httpx.Response
|
|
||||||
) -> Optional[
|
|
||||||
Union[
|
Union[
|
||||||
FileConversion,
|
FileConversion,
|
||||||
FileCenterOfMass,
|
FileCenterOfMass,
|
||||||
@ -123,9 +121,7 @@ def _parse_response(
|
|||||||
return Error(**response.json())
|
return Error(**response.json())
|
||||||
|
|
||||||
|
|
||||||
def _build_response(
|
def _build_response(*, response: httpx.Response) -> Response[
|
||||||
*, response: httpx.Response
|
|
||||||
) -> Response[
|
|
||||||
Optional[
|
Optional[
|
||||||
Union[
|
Union[
|
||||||
FileConversion,
|
FileConversion,
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -23,18 +23,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -23,24 +23,28 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
if status is not None:
|
if status is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&status=" + str(status)
|
url = url + "&status=" + str(status)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -18,6 +18,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if label is not None:
|
if label is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&label=" + str(label)
|
url = url + "&label=" + str(label)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -22,6 +22,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if output is not None:
|
if output is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output=" + str(output)
|
url = url + "&output=" + str(output)
|
||||||
else:
|
else:
|
||||||
@ -92,6 +93,7 @@ def sync(
|
|||||||
client: Client,
|
client: Client,
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
) -> Optional[Union[CodeOutput, Error]]:
|
) -> Optional[Union[CodeOutput, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
lang=lang,
|
lang=lang,
|
||||||
output=output,
|
output=output,
|
||||||
@ -127,6 +129,7 @@ async def asyncio(
|
|||||||
client: Client,
|
client: Client,
|
||||||
output: Optional[str] = None,
|
output: Optional[str] = None,
|
||||||
) -> Optional[Union[CodeOutput, Error]]:
|
) -> Optional[Union[CodeOutput, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
@ -22,12 +22,14 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
|
@ -25,24 +25,28 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if material_mass is not None:
|
if material_mass is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_mass=" + str(material_mass)
|
url = url + "&material_mass=" + str(material_mass)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_mass=" + str(material_mass)
|
url = url + "?material_mass=" + str(material_mass)
|
||||||
|
|
||||||
if material_mass_unit is not None:
|
if material_mass_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_mass_unit=" + str(material_mass_unit)
|
url = url + "&material_mass_unit=" + str(material_mass_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_mass_unit=" + str(material_mass_unit)
|
url = url + "?material_mass_unit=" + str(material_mass_unit)
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
|
@ -25,24 +25,28 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if material_density is not None:
|
if material_density is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_density=" + str(material_density)
|
url = url + "&material_density=" + str(material_density)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_density=" + str(material_density)
|
url = url + "?material_density=" + str(material_density)
|
||||||
|
|
||||||
if material_density_unit is not None:
|
if material_density_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&material_density_unit=" + str(material_density_unit)
|
url = url + "&material_density_unit=" + str(material_density_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?material_density_unit=" + str(material_density_unit)
|
url = url + "?material_density_unit=" + str(material_density_unit)
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
|
@ -22,12 +22,14 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
|
@ -22,12 +22,14 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if output_unit is not None:
|
if output_unit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&output_unit=" + str(output_unit)
|
url = url + "&output_unit=" + str(output_unit)
|
||||||
else:
|
else:
|
||||||
url = url + "?output_unit=" + str(output_unit)
|
url = url + "?output_unit=" + str(output_unit)
|
||||||
|
|
||||||
if src_format is not None:
|
if src_format is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&src_format=" + str(src_format)
|
url = url + "&src_format=" + str(src_format)
|
||||||
else:
|
else:
|
||||||
|
@ -79,6 +79,7 @@ def sync(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[VerificationTokenResponse, Error]]:
|
) -> Optional[Union[VerificationTokenResponse, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
body=body,
|
body=body,
|
||||||
client=client,
|
client=client,
|
||||||
@ -106,6 +107,7 @@ async def asyncio(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[VerificationTokenResponse, Error]]:
|
) -> Optional[Union[VerificationTokenResponse, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
body=body,
|
body=body,
|
||||||
|
@ -19,18 +19,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if callback_url is not None:
|
if callback_url is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&callback_url=" + str(callback_url)
|
url = url + "&callback_url=" + str(callback_url)
|
||||||
else:
|
else:
|
||||||
url = url + "?callback_url=" + str(callback_url)
|
url = url + "?callback_url=" + str(callback_url)
|
||||||
|
|
||||||
if email is not None:
|
if email is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&email=" + str(email)
|
url = url + "&email=" + str(email)
|
||||||
else:
|
else:
|
||||||
url = url + "?email=" + str(email)
|
url = url + "?email=" + str(email)
|
||||||
|
|
||||||
if token is not None:
|
if token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&token=" + str(token)
|
url = url + "&token=" + str(token)
|
||||||
else:
|
else:
|
||||||
@ -96,6 +99,7 @@ def sync(
|
|||||||
client: Client,
|
client: Client,
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
) -> Optional[Error]:
|
) -> Optional[Error]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
email=email,
|
email=email,
|
||||||
@ -131,6 +135,7 @@ async def asyncio(
|
|||||||
client: Client,
|
client: Client,
|
||||||
callback_url: Optional[str] = None,
|
callback_url: Optional[str] = None,
|
||||||
) -> Optional[Error]:
|
) -> Optional[Error]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
callback_url=callback_url,
|
callback_url=callback_url,
|
||||||
|
@ -20,6 +20,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if callback_url is not None:
|
if callback_url is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&callback_url=" + str(callback_url)
|
url = url + "&callback_url=" + str(callback_url)
|
||||||
else:
|
else:
|
||||||
|
@ -77,6 +77,7 @@ def sync(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
) -> Optional[Error]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
provider_id=provider_id,
|
provider_id=provider_id,
|
||||||
body=body,
|
body=body,
|
||||||
@ -108,6 +109,7 @@ async def asyncio(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Error]:
|
) -> Optional[Error]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
provider_id=provider_id,
|
provider_id=provider_id,
|
||||||
|
100
kittycad/api/meta/create_event.py
Normal file
100
kittycad/api/meta/create_event.py
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/events".format(
|
||||||
|
client.base_url,
|
||||||
|
) # noqa: E501
|
||||||
|
|
||||||
|
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(),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||||
|
return None
|
||||||
|
if response.status_code == 400:
|
||||||
|
response_4XX = Error(**response.json())
|
||||||
|
return response_4XX
|
||||||
|
if response.status_code == 500:
|
||||||
|
response_5XX = Error(**response.json())
|
||||||
|
return response_5XX
|
||||||
|
return Error(**response.json())
|
||||||
|
|
||||||
|
|
||||||
|
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.post(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Error]:
|
||||||
|
"""We collect anonymous telemetry data for improving our product.""" # noqa: E501
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Optional[Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
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(
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Error]:
|
||||||
|
"""We collect anonymous telemetry data for improving our product.""" # noqa: E501
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
@ -71,6 +71,7 @@ def sync(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[IpAddrInfo, Error]]:
|
) -> Optional[Union[IpAddrInfo, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
@ -94,6 +95,7 @@ async def asyncio(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[IpAddrInfo, Error]]:
|
) -> Optional[Union[IpAddrInfo, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
|
@ -70,6 +70,7 @@ def sync(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[dict, Error]]:
|
) -> Optional[Union[dict, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
@ -93,6 +94,7 @@ async def asyncio(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[dict, Error]]:
|
) -> Optional[Union[dict, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
|
@ -71,6 +71,7 @@ def sync(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Pong, Error]]:
|
) -> Optional[Union[Pong, Error]]:
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
@ -94,6 +95,7 @@ async def asyncio(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Pong, Error]]:
|
) -> Optional[Union[Pong, Error]]:
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
||||||
client=client,
|
client=client,
|
||||||
|
@ -22,30 +22,35 @@ def _get_kwargs(
|
|||||||
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
|
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
|
||||||
|
|
||||||
if fps is not None:
|
if fps is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&fps=" + str(fps)
|
url = url + "&fps=" + str(fps)
|
||||||
else:
|
else:
|
||||||
url = url + "?fps=" + str(fps)
|
url = url + "?fps=" + str(fps)
|
||||||
|
|
||||||
if unlocked_framerate is not None:
|
if unlocked_framerate is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&unlocked_framerate=" + str(unlocked_framerate).lower()
|
url = url + "&unlocked_framerate=" + str(unlocked_framerate).lower()
|
||||||
else:
|
else:
|
||||||
url = url + "?unlocked_framerate=" + str(unlocked_framerate).lower()
|
url = url + "?unlocked_framerate=" + str(unlocked_framerate).lower()
|
||||||
|
|
||||||
if video_res_height is not None:
|
if video_res_height is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&video_res_height=" + str(video_res_height)
|
url = url + "&video_res_height=" + str(video_res_height)
|
||||||
else:
|
else:
|
||||||
url = url + "?video_res_height=" + str(video_res_height)
|
url = url + "?video_res_height=" + str(video_res_height)
|
||||||
|
|
||||||
if video_res_width is not None:
|
if video_res_width is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&video_res_width=" + str(video_res_width)
|
url = url + "&video_res_width=" + str(video_res_width)
|
||||||
else:
|
else:
|
||||||
url = url + "?video_res_width=" + str(video_res_width)
|
url = url + "?video_res_width=" + str(video_res_width)
|
||||||
|
|
||||||
if webrtc is not None:
|
if webrtc is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&webrtc=" + str(webrtc).lower()
|
url = url + "&webrtc=" + str(webrtc).lower()
|
||||||
else:
|
else:
|
||||||
|
@ -23,24 +23,28 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
if role is not None:
|
if role is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&role=" + str(role)
|
url = url + "&role=" + str(role)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -18,6 +18,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if label is not None:
|
if label is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&label=" + str(label)
|
url = url + "&label=" + str(label)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -23,6 +23,7 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&value=" + str(value)
|
url = url + "&value=" + str(value)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -21,18 +21,21 @@ def _get_kwargs(
|
|||||||
) # noqa: E501
|
) # noqa: E501
|
||||||
|
|
||||||
if limit is not None:
|
if limit is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&limit=" + str(limit)
|
url = url + "&limit=" + str(limit)
|
||||||
else:
|
else:
|
||||||
url = url + "?limit=" + str(limit)
|
url = url + "?limit=" + str(limit)
|
||||||
|
|
||||||
if page_token is not None:
|
if page_token is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&page_token=" + str(page_token)
|
url = url + "&page_token=" + str(page_token)
|
||||||
else:
|
else:
|
||||||
url = url + "?page_token=" + str(page_token)
|
url = url + "?page_token=" + str(page_token)
|
||||||
|
|
||||||
if sort_by is not None:
|
if sort_by is not None:
|
||||||
|
|
||||||
if "?" in url:
|
if "?" in url:
|
||||||
url = url + "&sort_by=" + str(sort_by)
|
url = url + "&sort_by=" + str(sort_by)
|
||||||
else:
|
else:
|
||||||
|
@ -173,14 +173,14 @@ async def test_file_convert_stl_async():
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
# Get the fc.
|
# Get the fc.
|
||||||
result: Optional[
|
result: Optional[Union[FileConversion, Error]] = (
|
||||||
Union[FileConversion, Error]
|
await create_file_conversion.asyncio(
|
||||||
] = await create_file_conversion.asyncio(
|
|
||||||
client=client,
|
client=client,
|
||||||
body=content,
|
body=content,
|
||||||
src_format=FileImportFormat.STL,
|
src_format=FileImportFormat.STL,
|
||||||
output_format=FileExportFormat.OBJ,
|
output_format=FileExportFormat.OBJ,
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
assert isinstance(result, FileConversion)
|
assert isinstance(result, FileConversion)
|
||||||
|
|
||||||
@ -212,14 +212,14 @@ async def test_file_convert_obj_async():
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
# Get the fc.
|
# Get the fc.
|
||||||
result: Optional[
|
result: Optional[Union[FileConversion, Error]] = (
|
||||||
Union[FileConversion, Error]
|
await create_file_conversion.asyncio(
|
||||||
] = await create_file_conversion.asyncio(
|
|
||||||
client=client,
|
client=client,
|
||||||
body=content,
|
body=content,
|
||||||
src_format=FileImportFormat.OBJ,
|
src_format=FileImportFormat.OBJ,
|
||||||
output_format=FileExportFormat.STL,
|
output_format=FileExportFormat.STL,
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
assert isinstance(result, FileConversion)
|
assert isinstance(result, FileConversion)
|
||||||
|
|
||||||
@ -556,12 +556,12 @@ def test_text_to_cad():
|
|||||||
while (
|
while (
|
||||||
body.status == ApiCallStatus.IN_PROGRESS or body.status == ApiCallStatus.QUEUED
|
body.status == ApiCallStatus.IN_PROGRESS or body.status == ApiCallStatus.QUEUED
|
||||||
) and time.time() - start_time < 120:
|
) and time.time() - start_time < 120:
|
||||||
result_status: Optional[
|
result_status: Optional[Union[TextToCad, Error]] = (
|
||||||
Union[TextToCad, Error]
|
get_text_to_cad_model_for_user.sync(
|
||||||
] = get_text_to_cad_model_for_user.sync(
|
|
||||||
client=client,
|
client=client,
|
||||||
id=body.id,
|
id=body.id,
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
if isinstance(result_status, Error) or result_status is None:
|
if isinstance(result_status, Error) or result_status is None:
|
||||||
print(result_status)
|
print(result_status)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,10 @@ from .axis_direction_pair import AxisDirectionPair
|
|||||||
from .billing_info import BillingInfo
|
from .billing_info import BillingInfo
|
||||||
from .block_reason import BlockReason
|
from .block_reason import BlockReason
|
||||||
from .cache_metadata import CacheMetadata
|
from .cache_metadata import CacheMetadata
|
||||||
|
from .camera_drag_end import CameraDragEnd
|
||||||
from .camera_drag_interaction_type import CameraDragInteractionType
|
from .camera_drag_interaction_type import CameraDragInteractionType
|
||||||
|
from .camera_drag_move import CameraDragMove
|
||||||
|
from .camera_settings import CameraSettings
|
||||||
from .card_details import CardDetails
|
from .card_details import CardDetails
|
||||||
from .center_of_mass import CenterOfMass
|
from .center_of_mass import CenterOfMass
|
||||||
from .client_metrics import ClientMetrics
|
from .client_metrics import ClientMetrics
|
||||||
@ -53,6 +56,8 @@ from .curve_get_type import CurveGetType
|
|||||||
from .curve_type import CurveType
|
from .curve_type import CurveType
|
||||||
from .customer import Customer
|
from .customer import Customer
|
||||||
from .customer_balance import CustomerBalance
|
from .customer_balance import CustomerBalance
|
||||||
|
from .default_camera_get_settings import DefaultCameraGetSettings
|
||||||
|
from .default_camera_zoom import DefaultCameraZoom
|
||||||
from .density import Density
|
from .density import Density
|
||||||
from .der_encoded_key_pair import DerEncodedKeyPair
|
from .der_encoded_key_pair import DerEncodedKeyPair
|
||||||
from .device_access_token_request_form import DeviceAccessTokenRequestForm
|
from .device_access_token_request_form import DeviceAccessTokenRequestForm
|
||||||
|
12
kittycad/models/camera_drag_end.py
Normal file
12
kittycad/models/camera_drag_end.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.camera_settings import CameraSettings
|
||||||
|
|
||||||
|
|
||||||
|
class CameraDragEnd(BaseModel):
|
||||||
|
"""The response from the `CameraDragEnd` command."""
|
||||||
|
|
||||||
|
settings: CameraSettings
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
12
kittycad/models/camera_drag_move.py
Normal file
12
kittycad/models/camera_drag_move.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.camera_settings import CameraSettings
|
||||||
|
|
||||||
|
|
||||||
|
class CameraDragMove(BaseModel):
|
||||||
|
"""The response from the `CameraDragMove` command. Note this is an \"unreliable\" channel message, so this data may need more data like a \"sequence\" """
|
||||||
|
|
||||||
|
settings: CameraSettings
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
23
kittycad/models/camera_settings.py
Normal file
23
kittycad/models/camera_settings.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.point3d import Point3d
|
||||||
|
|
||||||
|
|
||||||
|
class CameraSettings(BaseModel):
|
||||||
|
"""Camera settings including position, center, fov etc"""
|
||||||
|
|
||||||
|
center: Point3d
|
||||||
|
|
||||||
|
fov_y: Optional[float] = None
|
||||||
|
|
||||||
|
ortho: bool
|
||||||
|
|
||||||
|
ortho_scale: Optional[float] = None
|
||||||
|
|
||||||
|
pos: Point3d
|
||||||
|
|
||||||
|
up: Point3d
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
@ -10,7 +10,7 @@ class CodeOutput(BaseModel):
|
|||||||
|
|
||||||
<details><summary>JSON schema</summary>
|
<details><summary>JSON schema</summary>
|
||||||
|
|
||||||
```json { "description": "Output of the code being executed.", "type": "object", "properties": { "output_files": { "description": "The contents of the files requested if they were passed.", "type": "array", "items": { "$ref": "#/components/schemas/OutputFile" } }, "stderr": { "description": "The stderr of the code.", "default": "", "type": "string" }, "stdout": { "description": "The stdout of the code.", "default": "", "type": "string" } } } ``` </details>
|
```json { \"description\": \"Output of the code being executed.\", \"type\": \"object\", \"properties\": { \"output_files\": { \"description\": \"The contents of the files requested if they were passed.\", \"type\": \"array\", \"items\": { \"$ref\": \"#/components/schemas/OutputFile\" } }, \"stderr\": { \"description\": \"The stderr of the code.\", \"default\": \"\", \"type\": \"string\" }, \"stdout\": { \"description\": \"The stdout of the code.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
output_files: Optional[List[OutputFile]] = None
|
output_files: Optional[List[OutputFile]] = None
|
||||||
|
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
|||||||
|
|
||||||
|
|
||||||
class Customer(BaseModel):
|
class Customer(BaseModel):
|
||||||
"""The resource representing a payment "Customer"."""
|
"""The resource representing a payment \"Customer\"."""
|
||||||
|
|
||||||
address: Optional[AddressDetails] = None
|
address: Optional[AddressDetails] = None
|
||||||
|
|
||||||
|
12
kittycad/models/default_camera_get_settings.py
Normal file
12
kittycad/models/default_camera_get_settings.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.camera_settings import CameraSettings
|
||||||
|
|
||||||
|
|
||||||
|
class DefaultCameraGetSettings(BaseModel):
|
||||||
|
"""The response from the `DefaultCameraGetSettings` command."""
|
||||||
|
|
||||||
|
settings: CameraSettings
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
12
kittycad/models/default_camera_zoom.py
Normal file
12
kittycad/models/default_camera_zoom.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.camera_settings import CameraSettings
|
||||||
|
|
||||||
|
|
||||||
|
class DefaultCameraZoom(BaseModel):
|
||||||
|
"""The response from the `DefaultCameraZoom` command."""
|
||||||
|
|
||||||
|
settings: CameraSettings
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
@ -39,7 +39,7 @@ class start_path(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class move_path_pen(BaseModel):
|
class move_path_pen(BaseModel):
|
||||||
"""Move the path's "pen"."""
|
"""Move the path's \"pen\"."""
|
||||||
|
|
||||||
path: ModelingCmdId
|
path: ModelingCmdId
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class move_path_pen(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class extend_path(BaseModel):
|
class extend_path(BaseModel):
|
||||||
"""Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin."""
|
"""Extend a path by adding a new segment which starts at the path's \"pen\". If no \"pen\" location has been set before (via `MovePen`), then the pen is at the origin."""
|
||||||
|
|
||||||
path: ModelingCmdId
|
path: ModelingCmdId
|
||||||
|
|
||||||
@ -124,6 +124,14 @@ class camera_drag_end(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class default_camera_get_settings(BaseModel):
|
||||||
|
"""Gets the default camera's camera settings"""
|
||||||
|
|
||||||
|
type: Literal["default_camera_get_settings"] = "default_camera_get_settings"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class default_camera_look_at(BaseModel):
|
class default_camera_look_at(BaseModel):
|
||||||
"""Change what the default camera is looking at."""
|
"""Change what the default camera is looking at."""
|
||||||
|
|
||||||
@ -149,9 +157,9 @@ class default_camera_perspective_settings(BaseModel):
|
|||||||
|
|
||||||
sequence: Optional[int] = None
|
sequence: Optional[int] = None
|
||||||
|
|
||||||
type: Literal[
|
type: Literal["default_camera_perspective_settings"] = (
|
||||||
"default_camera_perspective_settings"
|
"default_camera_perspective_settings"
|
||||||
] = "default_camera_perspective_settings"
|
)
|
||||||
|
|
||||||
up: Point3d
|
up: Point3d
|
||||||
|
|
||||||
@ -185,9 +193,9 @@ class default_camera_enable_sketch_mode(BaseModel):
|
|||||||
|
|
||||||
ortho: bool
|
ortho: bool
|
||||||
|
|
||||||
type: Literal[
|
type: Literal["default_camera_enable_sketch_mode"] = (
|
||||||
"default_camera_enable_sketch_mode"
|
"default_camera_enable_sketch_mode"
|
||||||
] = "default_camera_enable_sketch_mode"
|
)
|
||||||
|
|
||||||
x_axis: Point3d
|
x_axis: Point3d
|
||||||
|
|
||||||
@ -199,9 +207,9 @@ class default_camera_enable_sketch_mode(BaseModel):
|
|||||||
class default_camera_disable_sketch_mode(BaseModel):
|
class default_camera_disable_sketch_mode(BaseModel):
|
||||||
"""Disable sketch mode, from the default camera."""
|
"""Disable sketch mode, from the default camera."""
|
||||||
|
|
||||||
type: Literal[
|
type: Literal["default_camera_disable_sketch_mode"] = (
|
||||||
"default_camera_disable_sketch_mode"
|
"default_camera_disable_sketch_mode"
|
||||||
] = "default_camera_disable_sketch_mode"
|
)
|
||||||
|
|
||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
@ -323,7 +331,7 @@ class edit_mode_enter(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class select_with_point(BaseModel):
|
class select_with_point(BaseModel):
|
||||||
"""Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected."""
|
"""Modifies the selection by simulating a \"mouse click\" at the given x,y window coordinate Returns ID of whatever was selected."""
|
||||||
|
|
||||||
selected_at_window: Point2d
|
selected_at_window: Point2d
|
||||||
|
|
||||||
@ -551,6 +559,8 @@ class solid3d_fillet_edge(BaseModel):
|
|||||||
|
|
||||||
radius: LengthUnit
|
radius: LengthUnit
|
||||||
|
|
||||||
|
tolerance: LengthUnit
|
||||||
|
|
||||||
type: Literal["solid3d_fillet_edge"] = "solid3d_fillet_edge"
|
type: Literal["solid3d_fillet_edge"] = "solid3d_fillet_edge"
|
||||||
|
|
||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
@ -777,9 +787,9 @@ class path_get_curve_uuids_for_vertices(BaseModel):
|
|||||||
|
|
||||||
path_id: str
|
path_id: str
|
||||||
|
|
||||||
type: Literal[
|
type: Literal["path_get_curve_uuids_for_vertices"] = (
|
||||||
"path_get_curve_uuids_for_vertices"
|
"path_get_curve_uuids_for_vertices"
|
||||||
] = "path_get_curve_uuids_for_vertices"
|
)
|
||||||
|
|
||||||
vertex_ids: List[str]
|
vertex_ids: List[str]
|
||||||
|
|
||||||
@ -1069,6 +1079,7 @@ ModelingCmd = RootModel[
|
|||||||
camera_drag_start,
|
camera_drag_start,
|
||||||
camera_drag_move,
|
camera_drag_move,
|
||||||
camera_drag_end,
|
camera_drag_end,
|
||||||
|
default_camera_get_settings,
|
||||||
default_camera_look_at,
|
default_camera_look_at,
|
||||||
default_camera_perspective_settings,
|
default_camera_perspective_settings,
|
||||||
default_camera_zoom,
|
default_camera_zoom,
|
||||||
|
@ -3,10 +3,14 @@ from typing import Literal, Union
|
|||||||
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
from ..models.camera_drag_end import CameraDragEnd
|
||||||
|
from ..models.camera_drag_move import CameraDragMove
|
||||||
from ..models.center_of_mass import CenterOfMass
|
from ..models.center_of_mass import CenterOfMass
|
||||||
from ..models.curve_get_control_points import CurveGetControlPoints
|
from ..models.curve_get_control_points import CurveGetControlPoints
|
||||||
from ..models.curve_get_end_points import CurveGetEndPoints
|
from ..models.curve_get_end_points import CurveGetEndPoints
|
||||||
from ..models.curve_get_type import CurveGetType
|
from ..models.curve_get_type import CurveGetType
|
||||||
|
from ..models.default_camera_get_settings import DefaultCameraGetSettings
|
||||||
|
from ..models.default_camera_zoom import DefaultCameraZoom
|
||||||
from ..models.density import Density
|
from ..models.density import Density
|
||||||
from ..models.entity_circular_pattern import EntityCircularPattern
|
from ..models.entity_circular_pattern import EntityCircularPattern
|
||||||
from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids
|
from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids
|
||||||
@ -119,6 +123,46 @@ class entity_get_all_child_uuids(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class camera_drag_move(BaseModel):
|
||||||
|
"""The response to the 'CameraDragMove' endpoint"""
|
||||||
|
|
||||||
|
data: CameraDragMove
|
||||||
|
|
||||||
|
type: Literal["camera_drag_move"] = "camera_drag_move"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class camera_drag_end(BaseModel):
|
||||||
|
"""The response to the 'CameraDragEnd' endpoint"""
|
||||||
|
|
||||||
|
data: CameraDragEnd
|
||||||
|
|
||||||
|
type: Literal["camera_drag_end"] = "camera_drag_end"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class default_camera_get_settings(BaseModel):
|
||||||
|
"""The response to the 'DefaultCameraGetSettings' endpoint"""
|
||||||
|
|
||||||
|
data: DefaultCameraGetSettings
|
||||||
|
|
||||||
|
type: Literal["default_camera_get_settings"] = "default_camera_get_settings"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class default_camera_zoom(BaseModel):
|
||||||
|
"""The response to the 'DefaultCameraZoom' endpoint"""
|
||||||
|
|
||||||
|
data: DefaultCameraZoom
|
||||||
|
|
||||||
|
type: Literal["default_camera_zoom"] = "default_camera_zoom"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class select_get(BaseModel):
|
class select_get(BaseModel):
|
||||||
"""The response to the 'SelectGet' endpoint"""
|
"""The response to the 'SelectGet' endpoint"""
|
||||||
|
|
||||||
@ -254,9 +298,9 @@ class path_get_curve_uuids_for_vertices(BaseModel):
|
|||||||
|
|
||||||
data: PathGetCurveUuidsForVertices
|
data: PathGetCurveUuidsForVertices
|
||||||
|
|
||||||
type: Literal[
|
type: Literal["path_get_curve_uuids_for_vertices"] = (
|
||||||
"path_get_curve_uuids_for_vertices"
|
"path_get_curve_uuids_for_vertices"
|
||||||
] = "path_get_curve_uuids_for_vertices"
|
)
|
||||||
|
|
||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
@ -422,6 +466,10 @@ OkModelingCmdResponse = RootModel[
|
|||||||
entity_get_num_children,
|
entity_get_num_children,
|
||||||
entity_get_parent_id,
|
entity_get_parent_id,
|
||||||
entity_get_all_child_uuids,
|
entity_get_all_child_uuids,
|
||||||
|
camera_drag_move,
|
||||||
|
camera_drag_end,
|
||||||
|
default_camera_get_settings,
|
||||||
|
default_camera_zoom,
|
||||||
select_get,
|
select_get,
|
||||||
solid3d_get_all_edge_faces,
|
solid3d_get_all_edge_faces,
|
||||||
solid3d_get_all_opposite_edges,
|
solid3d_get_all_opposite_edges,
|
||||||
|
@ -116,6 +116,22 @@ class metrics_request(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class PongData(BaseModel):
|
||||||
|
""""""
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class pong(BaseModel):
|
||||||
|
"""Pong response to a Ping message."""
|
||||||
|
|
||||||
|
data: PongData
|
||||||
|
|
||||||
|
type: Literal["pong"] = "pong"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
OkWebSocketResponseData = RootModel[
|
OkWebSocketResponseData = RootModel[
|
||||||
Annotated[
|
Annotated[
|
||||||
Union[
|
Union[
|
||||||
@ -125,6 +141,7 @@ OkWebSocketResponseData = RootModel[
|
|||||||
modeling,
|
modeling,
|
||||||
export,
|
export,
|
||||||
metrics_request,
|
metrics_request,
|
||||||
|
pong,
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
Field(discriminator="type"),
|
||||||
]
|
]
|
||||||
|
@ -9,7 +9,7 @@ class OutputFile(BaseModel):
|
|||||||
|
|
||||||
<details><summary>JSON schema</summary>
|
<details><summary>JSON schema</summary>
|
||||||
|
|
||||||
```json { "description": "Output file contents.", "type": "object", "properties": { "contents": { "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", "type": "string" }, "name": { "description": "The name of the file.", "default": "", "type": "string" } } } ``` </details>
|
```json { \"description\": \"Output file contents.\", \"type\": \"object\", \"properties\": { \"contents\": { \"description\": \"The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.\", \"type\": \"string\" }, \"name\": { \"description\": \"The name of the file.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
contents: Optional[str] = None
|
contents: Optional[str] = None
|
||||||
|
@ -10,7 +10,7 @@ from ..models.point3d import Point3d
|
|||||||
|
|
||||||
|
|
||||||
class line(BaseModel):
|
class line(BaseModel):
|
||||||
"""A straight line segment. Goes from the current path "pen" to the given endpoint."""
|
"""A straight line segment. Goes from the current path \"pen\" to the given endpoint."""
|
||||||
|
|
||||||
end: Point3d
|
end: Point3d
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
""" Contains some shared types for properties """
|
""" Contains some shared types for properties """
|
||||||
|
|
||||||
from typing import (
|
from typing import (
|
||||||
BinaryIO,
|
BinaryIO,
|
||||||
Generic,
|
Generic,
|
||||||
|
2724
poetry.lock
generated
2724
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@ pydantic-extra-types = "^2.1.0"
|
|||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
autoclasstoc = "^1.6.0"
|
autoclasstoc = "^1.6.0"
|
||||||
black = "^23.12.1"
|
black = "^24.2.0"
|
||||||
isort = "^5.12.0"
|
isort = "^5.12.0"
|
||||||
jinja2 = "^3.1.3"
|
jinja2 = "^3.1.3"
|
||||||
jsonpatch = "^1.33"
|
jsonpatch = "^1.33"
|
||||||
@ -32,10 +32,10 @@ openapi-parser = "^0.2.6"
|
|||||||
openapi-spec-validator = "^0.6.0"
|
openapi-spec-validator = "^0.6.0"
|
||||||
prance = "^23.6.21"
|
prance = "^23.6.21"
|
||||||
pyenchant = "^3.2.2"
|
pyenchant = "^3.2.2"
|
||||||
pytest = "^8.1.0"
|
pytest = "^8.0.2"
|
||||||
pytest-asyncio = "^0.21.1"
|
pytest-asyncio = "^0.21.1"
|
||||||
pytest-cov = "^4.1.0"
|
pytest-cov = "^4.1.0"
|
||||||
ruff = "^0.2.2"
|
ruff = "^0.3.0"
|
||||||
Sphinx = "^7.1.2"
|
Sphinx = "^7.1.2"
|
||||||
sphinx-autoapi = "^2.0.1"
|
sphinx-autoapi = "^2.0.1"
|
||||||
sphinx-autodoc-typehints = "^1.24.0"
|
sphinx-autodoc-typehints = "^1.24.0"
|
||||||
|
359
spec.json
359
spec.json
@ -1746,6 +1746,126 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/events": {
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"meta",
|
||||||
|
"hidden"
|
||||||
|
],
|
||||||
|
"summary": "Creates an internal telemetry event.",
|
||||||
|
"description": "We collect anonymous telemetry data for improving our product.",
|
||||||
|
"operationId": "create_event",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"multipart/form-data": {
|
||||||
|
"schema": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "binary"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"description": "resource updated",
|
||||||
|
"headers": {
|
||||||
|
"Access-Control-Allow-Credentials": {
|
||||||
|
"description": "Access-Control-Allow-Credentials header.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Headers": {
|
||||||
|
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Methods": {
|
||||||
|
"description": "Access-Control-Allow-Methods header.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Origin": {
|
||||||
|
"description": "Access-Control-Allow-Origin header.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"4XX": {
|
||||||
|
"$ref": "#/components/responses/Error"
|
||||||
|
},
|
||||||
|
"5XX": {
|
||||||
|
"$ref": "#/components/responses/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"tags": [
|
||||||
|
"hidden"
|
||||||
|
],
|
||||||
|
"summary": "OPTIONS endpoint.",
|
||||||
|
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
|
||||||
|
"operationId": "options_create_event",
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"description": "successful operation, no content",
|
||||||
|
"headers": {
|
||||||
|
"Access-Control-Allow-Credentials": {
|
||||||
|
"description": "Access-Control-Allow-Credentials header.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Headers": {
|
||||||
|
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Methods": {
|
||||||
|
"description": "Access-Control-Allow-Methods header.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Access-Control-Allow-Origin": {
|
||||||
|
"description": "Access-Control-Allow-Origin header.",
|
||||||
|
"style": "simple",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"4XX": {
|
||||||
|
"$ref": "#/components/responses/Error"
|
||||||
|
},
|
||||||
|
"5XX": {
|
||||||
|
"$ref": "#/components/responses/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/file/center-of-mass": {
|
"/file/center-of-mass": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -14117,6 +14237,23 @@
|
|||||||
"ok"
|
"ok"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"CameraDragEnd": {
|
||||||
|
"description": "The response from the `CameraDragEnd` command.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"settings": {
|
||||||
|
"description": "Camera settings",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CameraSettings"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"settings"
|
||||||
|
]
|
||||||
|
},
|
||||||
"CameraDragInteractionType": {
|
"CameraDragInteractionType": {
|
||||||
"description": "The type of camera drag interaction.",
|
"description": "The type of camera drag interaction.",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
@ -14143,6 +14280,75 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"CameraDragMove": {
|
||||||
|
"description": "The response from the `CameraDragMove` command. Note this is an \"unreliable\" channel message, so this data may need more data like a \"sequence\"",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"settings": {
|
||||||
|
"description": "Camera settings",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CameraSettings"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"settings"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CameraSettings": {
|
||||||
|
"description": "Camera settings including position, center, fov etc",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"center": {
|
||||||
|
"description": "Camera's look-at center (center-pos gives viewing vector)",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Point3d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fov_y": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Camera's field-of-view angle (if ortho is false)",
|
||||||
|
"type": "number",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"ortho": {
|
||||||
|
"description": "Whether or not the camera is in ortho mode",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"ortho_scale": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "The camera's ortho scale (derived from viewing distance if ortho is true)",
|
||||||
|
"type": "number",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"pos": {
|
||||||
|
"description": "Camera position (vantage)",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Point3d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"up": {
|
||||||
|
"description": "Camera's world-space up vector",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Point3d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"center",
|
||||||
|
"ortho",
|
||||||
|
"pos",
|
||||||
|
"up"
|
||||||
|
]
|
||||||
|
},
|
||||||
"CardDetails": {
|
"CardDetails": {
|
||||||
"description": "The card details of a payment method.",
|
"description": "The card details of a payment method.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -15033,6 +15239,40 @@
|
|||||||
"updated_at"
|
"updated_at"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"DefaultCameraGetSettings": {
|
||||||
|
"description": "The response from the `DefaultCameraGetSettings` command.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"settings": {
|
||||||
|
"description": "Camera settings",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CameraSettings"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"settings"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"DefaultCameraZoom": {
|
||||||
|
"description": "The response from the `DefaultCameraZoom` command.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"settings": {
|
||||||
|
"description": "Camera settings",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CameraSettings"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"settings"
|
||||||
|
]
|
||||||
|
},
|
||||||
"Density": {
|
"Density": {
|
||||||
"description": "The density response.",
|
"description": "The density response.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -18204,6 +18444,21 @@
|
|||||||
"window"
|
"window"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Gets the default camera's camera settings",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_get_settings"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Change what the default camera is looking at.",
|
"description": "Change what the default camera is looking at.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -19262,6 +19517,14 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"tolerance": {
|
||||||
|
"description": "The maximum acceptable surface gap computed between the filleted surfaces. Must be positive (i.e. greater than zero).",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/LengthUnit"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
@ -19273,6 +19536,7 @@
|
|||||||
"edge_id",
|
"edge_id",
|
||||||
"object_id",
|
"object_id",
|
||||||
"radius",
|
"radius",
|
||||||
|
"tolerance",
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -20746,6 +21010,82 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "The response to the 'CameraDragMove' endpoint",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/CameraDragMove"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"camera_drag_move"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The response to the 'CameraDragEnd' endpoint",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/CameraDragEnd"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"camera_drag_end"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The response to the 'DefaultCameraGetSettings' endpoint",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/DefaultCameraGetSettings"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_get_settings"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The response to the 'DefaultCameraZoom' endpoint",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/DefaultCameraZoom"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_zoom"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "The response to the 'SelectGet' endpoint",
|
"description": "The response to the 'SelectGet' endpoint",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -21478,6 +21818,25 @@
|
|||||||
"data",
|
"data",
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Pong response to a Ping message.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"pong"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user