diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..acf35b48d Binary files /dev/null and b/.DS_Store differ diff --git a/docs/.DS_Store b/docs/.DS_Store new file mode 100644 index 000000000..b24af7fab Binary files /dev/null and b/docs/.DS_Store differ diff --git a/generate/generate.py b/generate/generate.py index 900d45f17..acee3be1a 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -472,9 +472,19 @@ from kittycad.types import Response + "\n" ) example_imports = ( - example_imports + "from typing import Union, Any, Optional, List\n" + example_imports + "from typing import Union, Any, Optional, List, Tuple\n" ) - example_variable = "result: " + response_type + " = " + + if fn_name.endswith("_with_base64_helper"): + example_variable = ( + "result: " + + response_type.replace( + "FileConversion", "Tuple[FileConversion, bytes]" + ) + + " = " + ) + else: + example_variable = "result: " + response_type + " = " example_imports = example_imports + "from kittycad.types import Response\n" example_imports = example_imports + "from kittycad.models import Error\n" @@ -505,6 +515,12 @@ from kittycad.types import Response and success_type != "None" and success_type != "" ): + example_success_type = success_type + if fn_name.endswith("_with_base64_helper"): + example_success_type = example_success_type.replace( + "FileConversion", "Tuple[FileConversion, bytes]" + ) + short_sync_example = short_sync_example + ( """ if isinstance(result, Error) or result == None: @@ -512,7 +528,7 @@ from kittycad.types import Response raise Exception("Error in response") body: """ - + success_type + + example_success_type + """ = result print(body) @@ -749,7 +765,7 @@ async def test_""" "\t\t\t" + option_name + " = " - + ref + + snake_to_title(ref) + ".from_dict(data)\n" ) parse_response.write( @@ -1112,8 +1128,14 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict): if "$ref" in one_of: ref = one_of["$ref"] ref_name = ref[ref.rfind("/") + 1 :] - f.write("from ." + camel_to_snake(ref_name) + " import " + ref_name + "\n") - all_options.append(ref_name) + f.write( + "from ." + + camel_to_snake(ref_name) + + " import " + + snake_to_title(ref_name) + + "\n" + ) + all_options.append(snake_to_title(ref_name)) if isNestedObjectOneOf(schema): # We want to write each of the nested objects. @@ -1173,13 +1195,19 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict): all_options.append(object_name) # Write the sum type. - f.write(name + " = Union[") - for num, option in enumerate(all_options, start=0): - if num == 0: - f.write(option) - else: - f.write(", " + option + "") - f.write("]\n") + if name == "SnakeCaseResult": + f.write("from typing import Any\n") + f.write(name + " = Any") + else: + f.write("from typing import Union\n") + f.write(name + " = Union[") + + for num, option in enumerate(all_options, start=0): + if num == 0: + f.write(option) + else: + f.write(", " + option + "") + f.write("]\n") # Close the file. f.close() @@ -1426,6 +1454,8 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict): elif "type" in property_schema["items"]: if property_schema["items"]["type"] == "string": property_type = "str" + elif property_schema["items"]["type"] == "integer": + property_type = "int" elif property_schema["items"]["type"] == "number": property_type = "float" elif property_schema["items"]["type"] == "array": @@ -1441,7 +1471,7 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict): logging.error("property: ", property_schema) raise Exception("Unknown property type") else: - logging.error("property: ", property_schema) + print("property: ", property_schema) raise Exception("Unknown property type") else: logging.error("array: ", [property_schema]) @@ -1570,6 +1600,8 @@ def renderTypeInit(f, property_name: str, property_schema: dict, data: dict): property_type = "str" elif property_schema["items"]["type"] == "number": property_type = "float" + elif property_schema["items"]["type"] == "integer": + property_type = "int" elif property_schema["items"]["type"] == "array": if "items" in property_schema["items"]: if property_schema["items"]["items"]["type"] == "string": @@ -1583,7 +1615,7 @@ def renderTypeInit(f, property_name: str, property_schema: dict, data: dict): logging.error("property: ", property_schema) raise Exception("Unknown property type") else: - logging.error("property: ", property_schema) + print("property: ", property_schema) raise Exception("Unknown property type") else: logging.error("array: ", [property_schema]) @@ -1600,7 +1632,7 @@ def renderTypeInit(f, property_name: str, property_schema: dict, data: dict): else: raise Exception("Unknown array type") else: - logging.error("property type: ", property_type) + logging.error("property type: ", property_schema) raise Exception("unknown type: ", property_type) elif "$ref" in property_schema: ref = property_schema["$ref"].replace("#/components/schemas/", "") @@ -1715,6 +1747,8 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict) property_type = "str" elif property_schema["items"]["type"] == "number": property_type = "float" + elif property_schema["items"]["type"] == "integer": + property_type = "int" elif property_schema["items"]["type"] == "array": if "items" in property_schema["items"]: if property_schema["items"]["items"]["type"] == "string": @@ -1878,13 +1912,13 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]: ref = json["$ref"].replace("#/components/schemas/", "") schema = data["components"]["schemas"][ref] if isNestedObjectOneOf(schema) or isEnumWithDocsOneOf(schema): - if ref not in refs: - refs.append(ref) + if snake_to_title(ref) not in refs: + refs.append(snake_to_title(ref)) elif isTypedObjectOneOf(schema): for t in schema["oneOf"]: ref = getOneOfRefType(t) - if ref not in refs: - refs.append(ref) + if snake_to_title(ref) not in refs: + refs.append(snake_to_title(ref)) else: if ref not in refs: refs.append(ref) @@ -1925,8 +1959,8 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]: json = content[content_type]["schema"] if "$ref" in json: ref = json["$ref"].replace("#/components/schemas/", "") - if ref not in refs: - refs.append(ref) + if snake_to_title(ref) not in refs: + refs.append(snake_to_title(ref)) return refs @@ -2038,6 +2072,11 @@ def camel_to_screaming_snake(name: str): ) +# Change `file_conversion` to `FileConversion` +def snake_to_title(name: str): + return name.title().replace("_", "") + + def get_function_parameters( endpoint: dict, request_body_type: Optional[str] ) -> List[str]: @@ -2082,8 +2121,12 @@ def isNestedObjectOneOf(schema: dict) -> bool: is_nested_object = False for one_of in schema["oneOf"]: - # Check if each are an object with properties. - if one_of["type"] == "object" and "properties" in one_of: + # Check if each are an object w 1 property in it. + if ( + one_of["type"] == "object" + and "properties" in one_of + and len(one_of["properties"]) == 1 + ): for prop_name in one_of["properties"]: nested_object = one_of["properties"][prop_name] if "type" in nested_object and nested_object["type"] == "object": diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 6fa696ecc..02f49bb3c 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -1 +1 @@ -[{"op": "add", "path": "/paths/~1_meta~1info/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"}}, {"op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1logout/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"}}, {"op": "add", "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"}}, {"op": "add", "path": "/paths/~1user~1payment/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1ws~1executor~1term/get/x-python", "value": {"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1density/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"}}, {"op": "add", "path": "/paths/~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"}}, {"op": "add", "path": "/paths/~1users-extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"}}, {"op": "add", "path": "/paths/~1auth~1email~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"}}, {"op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"}}, {"op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"}}, {"op": "add", "path": "/paths/~1user~1onboarding/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1intent/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"}}, {"op": "add", "path": "/paths/~1async~1operations/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"}}, {"op": "add", "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": {"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"}}, {"op": "add", "path": "/paths/~1/get/x-python", "value": {"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"}}, {"op": "add", "path": "/paths/~1user~1front-hash/get/x-python", "value": {"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"}}, {"op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"}}, {"op": "add", "path": "/paths/~1user~1session~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"}}, {"op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import (\n create_file_conversion,\n create_file_conversion_with_base64_helper,\n)\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion_with_base64_helper():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileConversion, Error]\n ] = create_file_conversion_with_base64_helper.sync(\n client=client,\n output_format=FileExportFormat.GLTF,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion_with_base64_helper.html"}}, {"op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1consent/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n cmd.sync(\n client=client,\n body=ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n ),\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1tax/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"}}, {"op": "add", "path": "/paths/~1openai~1openapi.json/get/x-python", "value": {"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"}}, {"op": "add", "path": "/paths/~1auth~1email/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1balance/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"}}, {"op": "add", "path": "/paths/~1api-call-metrics/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"}}, {"op": "add", "path": "/paths/~1ping/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users-extended~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"}}, {"op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"}}, {"op": "add", "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.GLTF,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"}}, {"op": "add", "path": "/paths/~1user/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"}}, {"op": "add", "path": "/paths/~1user/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"}}, {"op": "add", "path": "/paths/~1user/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd_batch/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.modeling import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ModelingOutcomes\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=ModelingCmdReqBatch(\n cmds={\n \"\": ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n )\n },\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ModelingOutcomes = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd_batch.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"}}, {"op": "add", "path": "/components/schemas/Axis/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Axis/enum", "value": ["y", "z"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/enum", "value": ["none", "user_http", "service_http", "oauth"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/UnitTemperature/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperature/enum", "value": ["celsius", "fahrenheit", "kelvin", "rankine"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/enum", "value": ["email", "method", "endpoint", "user_id", "origin", "ip_address"]}, {"op": "add", "path": "/components/schemas/Environment/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Environment/enum", "value": ["DEVELOPMENT", "PREVIEW", "PRODUCTION"]}, {"op": "add", "path": "/components/schemas/UnitVolume/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolume/enum", "value": ["cm3", "ft3", "in3", "m3", "yd3", "usfloz", "usgal", "l", "ml"]}, {"op": "add", "path": "/components/schemas/UnitLength/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLength/enum", "value": ["cm", "ft", "in", "m", "mm", "yd"]}, {"op": "add", "path": "/components/schemas/UnitEnergy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergy/enum", "value": ["btu", "electronvolts", "joules", "kilocalories", "kilowatt_hours", "watt_hours"]}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/enum", "value": ["pan", "rotate", "zoom"]}, {"op": "add", "path": "/components/schemas/UnitPressure/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressure/enum", "value": ["atmospheres", "bars", "hectopascals", "kilopascals", "millibars", "pascals", "psi"]}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/enum", "value": ["created-at-ascending", "created-at-descending"]}, {"op": "add", "path": "/components/schemas/UnitTorque/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTorque/enum", "value": ["newton_metres", "pound_foot"]}, {"op": "add", "path": "/components/schemas/Method/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Method/enum", "value": ["OPTIONS", "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "CONNECT", "PATCH", "EXTENSION"]}, {"op": "add", "path": "/components/schemas/ApiCallStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallStatus/enum", "value": ["Queued", "Uploaded", "In Progress", "Completed", "Failed"]}, {"op": "add", "path": "/components/schemas/AnnotationType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AnnotationType/enum", "value": ["t2d", "t3d"]}, {"op": "add", "path": "/components/schemas/Storage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Storage/enum", "value": ["binary", "standard", "embedded"]}, {"op": "add", "path": "/components/schemas/SceneSelectionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/SceneSelectionType/enum", "value": ["replace", "add", "remove"]}, {"op": "add", "path": "/components/schemas/UnitAngle/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngle/enum", "value": ["degrees", "radians"]}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/enum", "value": ["urn:ietf:params:oauth:grant-type:device_code"]}, {"op": "add", "path": "/components/schemas/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/UnitPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPower/enum", "value": ["btu_per_minute", "horsepower", "kilowatts", "metric_horsepower", "microwatts", "milliwatts", "watts"]}, {"op": "add", "path": "/components/schemas/UnitFrequency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitFrequency/enum", "value": ["gigahertz", "hertz", "kilohertz", "megahertz", "microhertz", "millihertz", "nanohertz", "terahertz"]}, {"op": "add", "path": "/components/schemas/Direction/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Direction/enum", "value": ["positive", "negative"]}, {"op": "add", "path": "/components/schemas/CodeLanguage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CodeLanguage/enum", "value": ["go", "python", "node"]}, {"op": "add", "path": "/components/schemas/UnitDensity/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDensity/enum", "value": ["lb:ft3", "kg:m3"]}, {"op": "add", "path": "/components/schemas/Currency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Currency/enum", "value": ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bif", "bmd", "bnd", "bob", "brl", "bsd", "bwp", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cve", "czk", "djf", "dkk", "dop", "dzd", "eek", "egp", "etb", "eur", "fjd", "fkp", "gbp", "gel", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "isk", "jmd", "jpy", "kes", "kgs", "khr", "kmf", "krw", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "mad", "mdl", "mga", "mkd", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sek", "sgd", "shp", "sll", "sos", "srd", "std", "svc", "szl", "thb", "tjs", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "vef", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw"]}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/CountryCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CountryCode/enum", "value": ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]}, {"op": "add", "path": "/components/schemas/UnitForce/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForce/enum", "value": ["dynes", "kiloponds", "micronewtons", "millinewtons", "newtons", "poundals", "pounds"]}, {"op": "add", "path": "/components/schemas/UnitArea/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitArea/enum", "value": ["cm2", "dm2", "ft2", "in2", "km2", "m2", "mm2", "yd2"]}, {"op": "add", "path": "/components/schemas/UnitCurrent/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitCurrent/enum", "value": ["amperes", "microamperes", "milliamperes", "nanoamperes"]}, {"op": "add", "path": "/components/schemas/UnitMass/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMass/enum", "value": ["g", "kg", "lb"]}, {"op": "add", "path": "/components/schemas/InvoiceStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/InvoiceStatus/enum", "value": ["deleted", "draft", "open", "paid", "uncollectible", "void"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/enum", "value": ["FileConversion", "FileVolume", "FileCenterOfMass", "FileMass", "FileDensity", "FileSurfaceArea"]}, {"op": "add", "path": "/info/x-python", "value": {"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", "install": "pip install kittycad"}}] \ No newline at end of file +[{"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/enum", "value": ["email", "method", "endpoint", "user_id", "origin", "ip_address"]}, {"op": "add", "path": "/components/schemas/UnitLength/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLength/enum", "value": ["cm", "ft", "in", "m", "mm", "yd"]}, {"op": "add", "path": "/components/schemas/InvoiceStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/InvoiceStatus/enum", "value": ["deleted", "draft", "open", "paid", "uncollectible", "void"]}, {"op": "add", "path": "/components/schemas/RtcIceProtocol/type", "value": "string"}, {"op": "add", "path": "/components/schemas/RtcIceProtocol/enum", "value": ["unspecified", "udp", "tcp"]}, {"op": "add", "path": "/components/schemas/Currency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Currency/enum", "value": ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bif", "bmd", "bnd", "bob", "brl", "bsd", "bwp", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cve", "czk", "djf", "dkk", "dop", "dzd", "eek", "egp", "etb", "eur", "fjd", "fkp", "gbp", "gel", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "isk", "jmd", "jpy", "kes", "kgs", "khr", "kmf", "krw", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "mad", "mdl", "mga", "mkd", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sek", "sgd", "shp", "sll", "sos", "srd", "std", "svc", "szl", "thb", "tjs", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "vef", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw"]}, {"op": "add", "path": "/components/schemas/SceneSelectionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/SceneSelectionType/enum", "value": ["replace", "add", "remove"]}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/enum", "value": ["pan", "rotate", "zoom"]}, {"op": "add", "path": "/components/schemas/Environment/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Environment/enum", "value": ["DEVELOPMENT", "PREVIEW", "PRODUCTION"]}, {"op": "add", "path": "/components/schemas/UnitDensity/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDensity/enum", "value": ["lb:ft3", "kg:m3"]}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/Method/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Method/enum", "value": ["OPTIONS", "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "CONNECT", "PATCH", "EXTENSION"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/RtcSdpType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/RtcSdpType/enum", "value": ["unspecified", "offer", "pranswer", "answer", "rollback"]}, {"op": "add", "path": "/components/schemas/UnitPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPower/enum", "value": ["btu_per_minute", "horsepower", "kilowatts", "metric_horsepower", "microwatts", "milliwatts", "watts"]}, {"op": "add", "path": "/components/schemas/UnitPressure/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressure/enum", "value": ["atmospheres", "bars", "hectopascals", "kilopascals", "millibars", "pascals", "psi"]}, {"op": "add", "path": "/components/schemas/UnitEnergy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergy/enum", "value": ["btu", "electronvolts", "joules", "kilocalories", "kilowatt_hours", "watt_hours"]}, {"op": "add", "path": "/components/schemas/UnitCurrent/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitCurrent/enum", "value": ["amperes", "microamperes", "milliamperes", "nanoamperes"]}, {"op": "add", "path": "/components/schemas/Storage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Storage/enum", "value": ["binary", "standard", "embedded"]}, {"op": "add", "path": "/components/schemas/ErrorCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ErrorCode/enum", "value": ["bad_request", "internal_engine"]}, {"op": "add", "path": "/components/schemas/UnitForce/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForce/enum", "value": ["dynes", "kiloponds", "micronewtons", "millinewtons", "newtons", "poundals", "pounds"]}, {"op": "add", "path": "/components/schemas/UnitMass/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMass/enum", "value": ["g", "kg", "lb"]}, {"op": "add", "path": "/components/schemas/Axis/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Axis/enum", "value": ["y", "z"]}, {"op": "add", "path": "/components/schemas/UnitFrequency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitFrequency/enum", "value": ["gigahertz", "hertz", "kilohertz", "megahertz", "microhertz", "millihertz", "nanohertz", "terahertz"]}, {"op": "add", "path": "/components/schemas/CountryCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CountryCode/enum", "value": ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/enum", "value": ["urn:ietf:params:oauth:grant-type:device_code"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/enum", "value": ["none", "user_http", "service_http", "oauth"]}, {"op": "add", "path": "/components/schemas/RtcIceCandidateType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/RtcIceCandidateType/enum", "value": ["unspecified", "host", "srflx", "prflx", "relay"]}, {"op": "add", "path": "/components/schemas/CodeLanguage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CodeLanguage/enum", "value": ["go", "python", "node"]}, {"op": "add", "path": "/components/schemas/AnnotationType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AnnotationType/enum", "value": ["t2d", "t3d"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/enum", "value": ["file_conversion", "file_volume", "file_center_of_mass", "file_mass", "file_density", "file_surface_area"]}, {"op": "add", "path": "/components/schemas/UnitVolume/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolume/enum", "value": ["cm3", "ft3", "in3", "m3", "yd3", "usfloz", "usgal", "l", "ml"]}, {"op": "add", "path": "/components/schemas/ApiCallStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallStatus/enum", "value": ["queued", "uploaded", "in_progress", "completed", "failed"]}, {"op": "add", "path": "/components/schemas/Direction/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Direction/enum", "value": ["positive", "negative"]}, {"op": "add", "path": "/components/schemas/UnitAngle/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngle/enum", "value": ["degrees", "radians"]}, {"op": "add", "path": "/components/schemas/UnitTemperature/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperature/enum", "value": ["celsius", "fahrenheit", "kelvin", "rankine"]}, {"op": "add", "path": "/components/schemas/UnitArea/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitArea/enum", "value": ["cm2", "dm2", "ft2", "in2", "km2", "m2", "mm2", "yd2"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/enum", "value": ["created_at_ascending", "created_at_descending"]}, {"op": "add", "path": "/components/schemas/UnitTorque/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTorque/enum", "value": ["newton_metres", "pound_foot"]}, {"op": "add", "path": "/info/x-python", "value": {"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", "install": "pip install kittycad"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"}}, {"op": "add", "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": {"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"}}, {"op": "add", "path": "/paths/~1users/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"}}, {"op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import (\n create_file_conversion,\n create_file_conversion_with_base64_helper,\n)\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion_with_base64_helper():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Tuple[FileConversion, bytes], Error]\n ] = create_file_conversion_with_base64_helper.sync(\n client=client,\n output_format=FileExportFormat.GLTF,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Tuple[FileConversion, bytes] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion_with_base64_helper.html"}}, {"op": "add", "path": "/paths/~1auth~1email~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/put/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1tax/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"}}, {"op": "add", "path": "/paths/~1user~1front-hash/get/x-python", "value": {"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"}}, {"op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"}}, {"op": "add", "path": "/paths/~1user~1extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"}}, {"op": "add", "path": "/paths/~1users-extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1logout/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"}}, {"op": "add", "path": "/paths/~1ping/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"}}, {"op": "add", "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1api-call-metrics/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"}}, {"op": "add", "path": "/paths/~1user/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"}}, {"op": "add", "path": "/paths/~1user/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"}}, {"op": "add", "path": "/paths/~1user/put/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"}}, {"op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1session~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"}}, {"op": "add", "path": "/paths/~1auth~1email/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1onboarding/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1balance/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"}}, {"op": "add", "path": "/paths/~1users-extended~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n cmd.sync(\n client=client,\n body=ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n ),\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1intent/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"}}, {"op": "add", "path": "/paths/~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"}}, {"op": "add", "path": "/paths/~1openai~1openapi.json/get/x-python", "value": {"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"}}, {"op": "add", "path": "/paths/~1/get/x-python", "value": {"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"}}, {"op": "add", "path": "/paths/~1_meta~1info/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1consent/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd-batch/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ModelingOutcomes\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=ModelingCmdReqBatch(\n cmds={\n \"\": ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n )\n },\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ModelingOutcomes = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd_batch.html"}}, {"op": "add", "path": "/paths/~1users~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"}}, {"op": "add", "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.GLTF,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"}}, {"op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"}}, {"op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"}}, {"op": "add", "path": "/paths/~1async~1operations/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"}}, {"op": "add", "path": "/paths/~1file~1density/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"}}, {"op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1ws~1executor~1term/get/x-python", "value": {"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"}}, {"op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"}}] \ No newline at end of file diff --git a/kittycad/api/file/create_file_conversion_with_base64_helper.py b/kittycad/api/file/create_file_conversion_with_base64_helper.py index 0a5ead532..8449d0616 100644 --- a/kittycad/api/file/create_file_conversion_with_base64_helper.py +++ b/kittycad/api/file/create_file_conversion_with_base64_helper.py @@ -1,5 +1,5 @@ import base64 -from typing import Any, Optional, Union +from typing import Any, Optional, Tuple, Union from ...api.file.create_file_conversion import asyncio as fc_asyncio, sync as fc_sync from ...client import Client @@ -12,7 +12,7 @@ def sync( body: bytes, *, client: Client, -) -> Optional[Union[Any, FileConversion, Error]]: +) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]: """Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output.""" encoded = base64.b64encode(body) @@ -26,9 +26,8 @@ def sync( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) - # decode the bytes to a string - fc.output = b.decode("utf-8") + b = base64.b64decode(fc.output + "===") + return (fc, b) return fc @@ -39,7 +38,7 @@ async def asyncio( body: bytes, *, client: Client, -) -> Optional[Union[Any, FileConversion, Error]]: +) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]: """Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output.""" encoded = base64.b64encode(body) @@ -53,8 +52,7 @@ async def asyncio( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) - # decode the bytes to a string - fc.output = b.decode("utf-8") + b = base64.b64decode(fc.output + "===") + return (fc, b) return fc diff --git a/kittycad/api/file/get_file_conversion_with_base64_helper.py b/kittycad/api/file/get_file_conversion_with_base64_helper.py index af691e51e..3312cfcfe 100644 --- a/kittycad/api/file/get_file_conversion_with_base64_helper.py +++ b/kittycad/api/file/get_file_conversion_with_base64_helper.py @@ -1,5 +1,5 @@ import base64 -from typing import Any, Optional, Union +from typing import Any, Optional, Tuple, Union from ...api.api_calls.get_async_operation import asyncio as fc_asyncio, sync as fc_sync from ...client import Client @@ -11,7 +11,7 @@ def sync( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, Error]]: +) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]: """Get the status of a file conversion. This function automatically base64 decodes the output response if there is one.""" fc = fc_sync( @@ -21,9 +21,8 @@ def sync( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) - # decode the bytes to a string - fc.output = b.decode("utf-8") + b = base64.b64decode(fc.output + "===") + return (fc, b) return fc @@ -32,7 +31,7 @@ async def asyncio( id: str, *, client: Client, -) -> Optional[Union[Any, FileConversion, Error]]: +) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]: """Get the status of a file conversion. This function automatically base64 decodes the output response if there is one.""" fc = await fc_asyncio( @@ -42,8 +41,7 @@ async def asyncio( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) - # decode the bytes to a string - fc.output = b.decode("utf-8") + b = base64.b64decode(fc.output + "===") + return (fc, b) return fc diff --git a/kittycad/api/modeling/cmd_batch.py b/kittycad/api/modeling/cmd_batch.py index 5411d5e4a..23d9c277c 100644 --- a/kittycad/api/modeling/cmd_batch.py +++ b/kittycad/api/modeling/cmd_batch.py @@ -14,7 +14,7 @@ def _get_kwargs( *, client: Client, ) -> Dict[str, Any]: - url = "{}/modeling/cmd_batch".format( + url = "{}/modeling/cmd-batch".format( client.base_url, ) # noqa: E501 diff --git a/kittycad/client_test.py b/kittycad/client_test.py index 5b2e31d9e..627ae502a 100644 --- a/kittycad/client_test.py +++ b/kittycad/client_test.py @@ -1,5 +1,5 @@ import os -from typing import Union +from typing import Tuple, Union import pytest @@ -107,7 +107,7 @@ def test_file_convert_stl(): # Get the fc. result: Union[ - FileConversion, Error, None + Tuple[FileConversion, bytes], Error, None ] = create_file_conversion_with_base64_helper.sync( client=client, body=content, @@ -115,18 +115,21 @@ def test_file_convert_stl(): output_format=FileExportFormat.OBJ, ) - assert isinstance(result, FileConversion) + r: Tuple[FileConversion, bytes] = result # type: ignore - fc: FileConversion = result + b: bytes = r[1] + fc: FileConversion = r[0] print(f"FileConversion: {fc}") assert fc.id is not None - assert fc.status == ApiCallStatus.COMPLETED print(f"FileConversion: {fc}") + # Make sure the bytes are not empty. + assert len(b) > 0 + @pytest.mark.asyncio async def test_file_convert_stl_async(): @@ -140,7 +143,7 @@ async def test_file_convert_stl_async(): # Get the fc. result: Union[ - FileConversion, Error, None + Tuple[FileConversion, bytes], Error, None ] = await create_file_conversion_with_base64_helper.asyncio( client=client, body=content, @@ -148,16 +151,21 @@ async def test_file_convert_stl_async(): output_format=FileExportFormat.OBJ, ) - assert isinstance(result, FileConversion) + r: Tuple[FileConversion, bytes] = result # type: ignore - fc: FileConversion = result + b: bytes = r[1] + fc: FileConversion = r[0] print(f"FileConversion: {fc}") assert fc.id is not None + assert fc.status == ApiCallStatus.COMPLETED print(f"FileConversion: {fc}") + # Make sure the bytes are not empty. + assert len(b) > 0 + def test_file_mass(): # Create our client. diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index a7964b3ce..f673209f9 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -1,4 +1,4 @@ -from typing import List, Optional, Union +from typing import List, Optional, Tuple, Union import pytest @@ -987,7 +987,7 @@ def test_create_file_conversion_with_base64_helper(): client = ClientFromEnv() result: Optional[ - Union[FileConversion, Error] + Union[Tuple[FileConversion, bytes], Error] ] = create_file_conversion_with_base64_helper.sync( client=client, output_format=FileExportFormat.GLTF, @@ -999,7 +999,7 @@ def test_create_file_conversion_with_base64_helper(): print(result) raise Exception("Error in response") - body: FileConversion = result + body: Tuple[FileConversion, bytes] = result print(body) # OR if you need more info (e.g. status_code) @@ -1021,7 +1021,7 @@ async def test_create_file_conversion_with_base64_helper_async(): client = ClientFromEnv() result: Optional[ - Union[FileConversion, Error] + Union[Tuple[FileConversion, bytes], Error] ] = await create_file_conversion_with_base64_helper.asyncio( client=client, output_format=FileExportFormat.GLTF, diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 0f204e5bc..035e24e00 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -55,6 +55,8 @@ from .engine_metadata import EngineMetadata from .entity_type import EntityType from .environment import Environment from .error import Error +from .error_code import ErrorCode +from .error_response import ErrorResponse from .executor_metadata import ExecutorMetadata from .export_file import ExportFile from .extended_user import ExtendedUser @@ -69,6 +71,7 @@ from .file_surface_area import FileSurfaceArea from .file_system_metadata import FileSystemMetadata from .file_volume import FileVolume from .gateway import Gateway +from .ice_server import IceServer from .image_type import ImageType from .index_info import IndexInfo from .input_format import InputFormat @@ -108,10 +111,18 @@ from .point2d import Point2d from .point3d import Point3d from .point_e_metadata import PointEMetadata from .pong import Pong +from .raw_file import RawFile from .registry_service_config import RegistryServiceConfig +from .rtc_ice_candidate import RtcIceCandidate +from .rtc_ice_candidate_init import RtcIceCandidateInit +from .rtc_ice_candidate_type import RtcIceCandidateType +from .rtc_ice_protocol import RtcIceProtocol +from .rtc_sdp_type import RtcSdpType +from .rtc_session_description import RtcSessionDescription from .runtime import Runtime from .scene_selection_type import SceneSelectionType from .session import Session +from .snake_case_result import SnakeCaseResult from .storage import Storage from .system import System from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum @@ -150,3 +161,5 @@ from .user import User from .user_results_page import UserResultsPage from .uuid import Uuid from .verification_token import VerificationToken +from .web_socket_messages import WebSocketMessages +from .web_socket_responses import WebSocketResponses diff --git a/kittycad/models/api_call_status.py b/kittycad/models/api_call_status.py index 87d10bd1f..6c0361196 100644 --- a/kittycad/models/api_call_status.py +++ b/kittycad/models/api_call_status.py @@ -5,15 +5,15 @@ class ApiCallStatus(str, Enum): """The status of an async API call.""" # noqa: E501 """# The async API call is queued. """ # noqa: E501 - QUEUED = "Queued" + QUEUED = "queued" """# The async API call was uploaded to be converted. """ # noqa: E501 - UPLOADED = "Uploaded" + UPLOADED = "uploaded" """# The async API call is in progress. """ # noqa: E501 - IN_PROGRESS = "In Progress" + IN_PROGRESS = "in_progress" """# The async API call has completed. """ # noqa: E501 - COMPLETED = "Completed" + COMPLETED = "completed" """# The async API call has failed. """ # noqa: E501 - FAILED = "Failed" + FAILED = "failed" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index 576530750..b4130fb7f 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -18,11 +18,11 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -MN = TypeVar("MN", bound="FileConversion") +MN = TypeVar("MN", bound="file_conversion") @attr.s(auto_attribs=True) -class FileConversion: +class file_conversion: """A file conversion.""" # noqa: E501 completed_at: Union[Unset, datetime.datetime] = UNSET @@ -37,7 +37,7 @@ class FileConversion: src_format_options: Union[Unset, InputFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: str = "FileConversion" + type: str = "file_conversion" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -228,11 +228,11 @@ class FileConversion: return key in self.additional_properties -JV = TypeVar("JV", bound="FileCenterOfMass") +JV = TypeVar("JV", bound="file_center_of_mass") @attr.s(auto_attribs=True) -class FileCenterOfMass: +class file_center_of_mass: """File center of mass.""" # noqa: E501 center_of_mass: Union[Unset, Point3d] = UNSET @@ -244,7 +244,7 @@ class FileCenterOfMass: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: str = "FileCenterOfMass" + type: str = "file_center_of_mass" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -412,11 +412,11 @@ class FileCenterOfMass: return key in self.additional_properties -IO = TypeVar("IO", bound="FileMass") +IO = TypeVar("IO", bound="file_mass") @attr.s(auto_attribs=True) -class FileMass: +class file_mass: """A file mass.""" # noqa: E501 completed_at: Union[Unset, datetime.datetime] = UNSET @@ -430,7 +430,7 @@ class FileMass: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: str = "FileMass" + type: str = "file_mass" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -610,11 +610,11 @@ class FileMass: return key in self.additional_properties -FV = TypeVar("FV", bound="FileVolume") +FV = TypeVar("FV", bound="file_volume") @attr.s(auto_attribs=True) -class FileVolume: +class file_volume: """A file volume.""" # noqa: E501 completed_at: Union[Unset, datetime.datetime] = UNSET @@ -625,7 +625,7 @@ class FileVolume: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: str = "FileVolume" + type: str = "file_volume" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET volume: Union[Unset, float] = UNSET @@ -788,11 +788,11 @@ class FileVolume: return key in self.additional_properties -LE = TypeVar("LE", bound="FileDensity") +LE = TypeVar("LE", bound="file_density") @attr.s(auto_attribs=True) -class FileDensity: +class file_density: """A file density.""" # noqa: E501 completed_at: Union[Unset, datetime.datetime] = UNSET @@ -806,7 +806,7 @@ class FileDensity: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: str = "FileDensity" + type: str = "file_density" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -986,11 +986,11 @@ class FileDensity: return key in self.additional_properties -OY = TypeVar("OY", bound="FileSurfaceArea") +OY = TypeVar("OY", bound="file_surface_area") @attr.s(auto_attribs=True) -class FileSurfaceArea: +class file_surface_area: """A file surface area.""" # noqa: E501 completed_at: Union[Unset, datetime.datetime] = UNSET @@ -1002,7 +1002,7 @@ class FileSurfaceArea: started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET surface_area: Union[Unset, float] = UNSET - type: str = "FileSurfaceArea" + type: str = "file_surface_area" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -1165,5 +1165,10 @@ class FileSurfaceArea: AsyncApiCallOutput = Union[ - FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea + file_conversion, + file_center_of_mass, + file_mass, + file_volume, + file_density, + file_surface_area, ] diff --git a/kittycad/models/async_api_call_type.py b/kittycad/models/async_api_call_type.py index 04635e508..12870e17c 100644 --- a/kittycad/models/async_api_call_type.py +++ b/kittycad/models/async_api_call_type.py @@ -5,17 +5,17 @@ class AsyncApiCallType(str, Enum): """The type of async API call.""" # noqa: E501 """# File conversion. """ # noqa: E501 - FILE_CONVERSION = "FileConversion" + FILE_CONVERSION = "file_conversion" """# File volume. """ # noqa: E501 - FILE_VOLUME = "FileVolume" + FILE_VOLUME = "file_volume" """# File center of mass. """ # noqa: E501 - FILE_CENTER_OF_MASS = "FileCenterOfMass" + FILE_CENTER_OF_MASS = "file_center_of_mass" """# File mass. """ # noqa: E501 - FILE_MASS = "FileMass" + FILE_MASS = "file_mass" """# File density. """ # noqa: E501 - FILE_DENSITY = "FileDensity" + FILE_DENSITY = "file_density" """# File surface area. """ # noqa: E501 - FILE_SURFACE_AREA = "FileSurfaceArea" + FILE_SURFACE_AREA = "file_surface_area" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/created_at_sort_mode.py b/kittycad/models/created_at_sort_mode.py index 4dadb768c..c76588552 100644 --- a/kittycad/models/created_at_sort_mode.py +++ b/kittycad/models/created_at_sort_mode.py @@ -6,10 +6,10 @@ class CreatedAtSortMode(str, Enum): Currently, we only support scanning in ascending order.""" # noqa: E501 - """# sort in increasing order of "created_at" """ # noqa: E501 - CREATED_AT_ASCENDING = "created-at-ascending" - """# sort in decreasing order of "created_at" """ # noqa: E501 - CREATED_AT_DESCENDING = "created-at-descending" + """# Sort in increasing order of "created_at". """ # noqa: E501 + CREATED_AT_ASCENDING = "created_at_ascending" + """# Sort in decreasing order of "created_at". """ # noqa: E501 + CREATED_AT_DESCENDING = "created_at_descending" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 58c352792..45d24b6f1 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -2,6 +2,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr +from ..models.error_code import ErrorCode from ..types import UNSET, Unset MS = TypeVar("MS", bound="Error") @@ -9,44 +10,43 @@ MS = TypeVar("MS", bound="Error") @attr.s(auto_attribs=True) class Error: - """Error information from a response.""" # noqa: E501 + """An error.""" # noqa: E501 - error_code: Union[Unset, str] = UNSET + code: Union[Unset, ErrorCode] = UNSET message: Union[Unset, str] = UNSET - request_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - error_code = self.error_code + if not isinstance(self.code, Unset): + code = self.code message = self.message - request_id = self.request_id 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 code is not UNSET: + field_dict["code"] = code if message is not UNSET: field_dict["message"] = message - if request_id is not UNSET: - field_dict["request_id"] = request_id return field_dict @classmethod def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: d = src_dict.copy() - error_code = d.pop("error_code", UNSET) + _code = d.pop("code", UNSET) + code: Union[Unset, ErrorCode] + if isinstance(_code, Unset): + code = UNSET + else: + code = _code # type: ignore[arg-type] message = d.pop("message", UNSET) - request_id = d.pop("request_id", UNSET) - error = cls( - error_code=error_code, + code=code, message=message, - request_id=request_id, ) error.additional_properties = d diff --git a/kittycad/models/error_code.py b/kittycad/models/error_code.py new file mode 100644 index 000000000..df2057b40 --- /dev/null +++ b/kittycad/models/error_code.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class ErrorCode(str, Enum): + """The type of errorcode.""" # noqa: E501 + + """# User requested something impossible or invalid """ # noqa: E501 + BAD_REQUEST = "bad_request" + """# Engine failed to complete request, consider retrying """ # noqa: E501 + INTERNAL_ENGINE = "internal_engine" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/error_response.py b/kittycad/models/error_response.py new file mode 100644 index 000000000..b2c360a00 --- /dev/null +++ b/kittycad/models/error_response.py @@ -0,0 +1,63 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +LT = TypeVar("LT", bound="ErrorResponse") + + +@attr.s(auto_attribs=True) +class ErrorResponse: + """The error response.""" # noqa: E501 + + from ..models.error import Error + + errors: Union[Unset, List[Error]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.error import Error + + errors: Union[Unset, List[Error]] = UNSET + if not isinstance(self.errors, Unset): + errors = self.errors + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict["errors"] = errors + + return field_dict + + @classmethod + def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: + d = src_dict.copy() + from ..models.error import Error + + errors = cast(List[Error], d.pop("errors", UNSET)) + + error_response = cls( + errors=errors, + ) + + error_response.additional_properties = d + return error_response + + @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 diff --git a/kittycad/models/executor_metadata.py b/kittycad/models/executor_metadata.py index 2dc9815fb..63de715c3 100644 --- a/kittycad/models/executor_metadata.py +++ b/kittycad/models/executor_metadata.py @@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo from ..models.environment import Environment from ..types import UNSET, Unset -LT = TypeVar("LT", bound="ExecutorMetadata") +ED = TypeVar("ED", bound="ExecutorMetadata") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class ExecutorMetadata: return field_dict @classmethod - def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: + def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: d = src_dict.copy() _docker_info = d.pop("docker_info", UNSET) docker_info: Union[Unset, DockerSystemInfo] diff --git a/kittycad/models/export_file.py b/kittycad/models/export_file.py index d8bc0a23f..4e353e75a 100644 --- a/kittycad/models/export_file.py +++ b/kittycad/models/export_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -ED = TypeVar("ED", bound="ExportFile") +YY = TypeVar("YY", bound="ExportFile") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class ExportFile: return field_dict @classmethod - def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: + def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: d = src_dict.copy() contents = d.pop("contents", UNSET) diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index 2c8bc5a0d..e30b8350d 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -YY = TypeVar("YY", bound="ExtendedUser") +DO = TypeVar("DO", bound="ExtendedUser") @attr.s(auto_attribs=True) @@ -98,7 +98,7 @@ class ExtendedUser: return field_dict @classmethod - def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: + def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/extended_user_results_page.py b/kittycad/models/extended_user_results_page.py index 4fcfb0b8a..4f7dad92b 100644 --- a/kittycad/models/extended_user_results_page.py +++ b/kittycad/models/extended_user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -DO = TypeVar("DO", bound="ExtendedUserResultsPage") +FZ = TypeVar("FZ", bound="ExtendedUserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ExtendedUserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: + def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: d = src_dict.copy() from ..models.extended_user import ExtendedUser diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index 522d995b7..8d1efe07e 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -FZ = TypeVar("FZ", bound="FileCenterOfMass") +GL = TypeVar("GL", bound="FileCenterOfMass") @attr.s(auto_attribs=True) @@ -86,7 +86,7 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: + def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: d = src_dict.copy() _center_of_mass = d.pop("center_of_mass", UNSET) center_of_mass: Union[Unset, Point3d] diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index cd7d0b4fb..03afc5880 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -12,7 +12,7 @@ from ..models.output_format import OutputFormat from ..models.uuid import Uuid from ..types import UNSET, Unset -GL = TypeVar("GL", bound="FileConversion") +NN = TypeVar("NN", bound="FileConversion") @attr.s(auto_attribs=True) @@ -100,7 +100,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: + def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index f00664253..a3c7afb33 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -NN = TypeVar("NN", bound="FileDensity") +OH = TypeVar("OH", bound="FileDensity") @attr.s(auto_attribs=True) @@ -94,7 +94,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: + def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index bb8def543..ff571d99b 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -OH = TypeVar("OH", bound="FileMass") +VI = TypeVar("VI", bound="FileMass") @attr.s(auto_attribs=True) @@ -94,7 +94,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: + def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index 3e4ac363e..1d2e902c2 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -VI = TypeVar("VI", bound="FileSurfaceArea") +ET = TypeVar("ET", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -84,7 +84,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: + def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index 540b9def4..137982451 100644 --- a/kittycad/models/file_system_metadata.py +++ b/kittycad/models/file_system_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -ET = TypeVar("ET", bound="FileSystemMetadata") +QF = TypeVar("QF", bound="FileSystemMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class FileSystemMetadata: return field_dict @classmethod - def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: + def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 01b0819c7..b3164b94f 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -QF = TypeVar("QF", bound="FileVolume") +DI = TypeVar("DI", bound="FileVolume") @attr.s(auto_attribs=True) @@ -84,7 +84,7 @@ class FileVolume: return field_dict @classmethod - def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: + def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index bdcaff1c0..c6659bbe5 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -DI = TypeVar("DI", bound="Gateway") +OJ = TypeVar("OJ", bound="Gateway") @attr.s(auto_attribs=True) @@ -43,7 +43,7 @@ class Gateway: return field_dict @classmethod - def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: + def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/ice_server.py b/kittycad/models/ice_server.py new file mode 100644 index 000000000..4b47d257c --- /dev/null +++ b/kittycad/models/ice_server.py @@ -0,0 +1,71 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +UF = TypeVar("UF", bound="IceServer") + + +@attr.s(auto_attribs=True) +class IceServer: + """Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on """ # noqa: E501 + + credential: Union[Unset, str] = UNSET + urls: Union[Unset, List[str]] = UNSET + username: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + credential = self.credential + urls: Union[Unset, List[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls + username = self.username + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if credential is not UNSET: + field_dict["credential"] = credential + if urls is not UNSET: + field_dict["urls"] = urls + if username is not UNSET: + field_dict["username"] = username + + return field_dict + + @classmethod + def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + d = src_dict.copy() + credential = d.pop("credential", UNSET) + + urls = cast(List[str], d.pop("urls", UNSET)) + + username = d.pop("username", UNSET) + + ice_server = cls( + credential=credential, + urls=urls, + username=username, + ) + + ice_server.additional_properties = d + return ice_server + + @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 diff --git a/kittycad/models/index_info.py b/kittycad/models/index_info.py index 286a69510..ab7edec71 100644 --- a/kittycad/models/index_info.py +++ b/kittycad/models/index_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OJ = TypeVar("OJ", bound="IndexInfo") +YF = TypeVar("YF", bound="IndexInfo") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class IndexInfo: return field_dict @classmethod - def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: + def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: d = src_dict.copy() mirrors = cast(List[str], d.pop("mirrors", UNSET)) diff --git a/kittycad/models/input_format.py b/kittycad/models/input_format.py index c758f521d..bdbadf9f1 100644 --- a/kittycad/models/input_format.py +++ b/kittycad/models/input_format.py @@ -6,7 +6,7 @@ from ..models.system import System from ..models.unit_length import UnitLength from ..types import UNSET, Unset -UF = TypeVar("UF", bound="gltf") +PY = TypeVar("PY", bound="gltf") @attr.s(auto_attribs=True) @@ -28,7 +28,7 @@ class gltf: return field_dict @classmethod - def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: d = src_dict.copy() type = d.pop("type", UNSET) @@ -56,7 +56,7 @@ class gltf: return key in self.additional_properties -YF = TypeVar("YF", bound="step") +LK = TypeVar("LK", bound="step") @attr.s(auto_attribs=True) @@ -78,7 +78,7 @@ class step: return field_dict @classmethod - def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: + def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: d = src_dict.copy() type = d.pop("type", UNSET) @@ -106,7 +106,7 @@ class step: return key in self.additional_properties -PY = TypeVar("PY", bound="obj") +AR = TypeVar("AR", bound="obj") @attr.s(auto_attribs=True) @@ -138,7 +138,7 @@ class obj: return field_dict @classmethod - def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: + def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -182,7 +182,7 @@ class obj: return key in self.additional_properties -LK = TypeVar("LK", bound="ply") +WB = TypeVar("WB", bound="ply") @attr.s(auto_attribs=True) @@ -214,7 +214,7 @@ class ply: return field_dict @classmethod - def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: + def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -258,7 +258,7 @@ class ply: return key in self.additional_properties -AR = TypeVar("AR", bound="stl") +KK = TypeVar("KK", bound="stl") @attr.s(auto_attribs=True) @@ -290,7 +290,7 @@ class stl: return field_dict @classmethod - def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: + def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index 018aa5f35..905f0c126 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.invoice_status import InvoiceStatus from ..types import UNSET, Unset -WB = TypeVar("WB", bound="Invoice") +HC = TypeVar("HC", bound="Invoice") @attr.s(auto_attribs=True) @@ -143,7 +143,7 @@ class Invoice: return field_dict @classmethod - def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: + def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: d = src_dict.copy() amount_due = d.pop("amount_due", UNSET) diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index 459aa3198..dbdd4ba99 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -5,7 +5,7 @@ import attr from ..models.currency import Currency from ..types import UNSET, Unset -KK = TypeVar("KK", bound="InvoiceLineItem") +FM = TypeVar("FM", bound="InvoiceLineItem") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class InvoiceLineItem: return field_dict @classmethod - def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: + def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: d = src_dict.copy() amount = d.pop("amount", UNSET) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index 719472a23..46b392bce 100644 --- a/kittycad/models/jetstream.py +++ b/kittycad/models/jetstream.py @@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats from ..models.meta_cluster_info import MetaClusterInfo from ..types import UNSET, Unset -HC = TypeVar("HC", bound="Jetstream") +PV = TypeVar("PV", bound="Jetstream") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class Jetstream: return field_dict @classmethod - def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: + def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: d = src_dict.copy() _config = d.pop("config", UNSET) config: Union[Unset, JetstreamConfig] diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index 2177e7cfa..6e9019cbe 100644 --- a/kittycad/models/jetstream_api_stats.py +++ b/kittycad/models/jetstream_api_stats.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FM = TypeVar("FM", bound="JetstreamApiStats") +QI = TypeVar("QI", bound="JetstreamApiStats") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class JetstreamApiStats: return field_dict @classmethod - def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: + def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: d = src_dict.copy() errors = d.pop("errors", UNSET) diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index ece7c4e6e..815086688 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -PV = TypeVar("PV", bound="JetstreamConfig") +TP = TypeVar("TP", bound="JetstreamConfig") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class JetstreamConfig: return field_dict @classmethod - def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: + def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: d = src_dict.copy() domain = d.pop("domain", UNSET) diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index d0dfd02e1..fa0089223 100644 --- a/kittycad/models/jetstream_stats.py +++ b/kittycad/models/jetstream_stats.py @@ -5,7 +5,7 @@ import attr from ..models.jetstream_api_stats import JetstreamApiStats from ..types import UNSET, Unset -QI = TypeVar("QI", bound="JetstreamStats") +CF = TypeVar("CF", bound="JetstreamStats") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class JetstreamStats: return field_dict @classmethod - def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: + def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: d = src_dict.copy() accounts = d.pop("accounts", UNSET) diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index 4f239c3b8..40449ec7b 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TP = TypeVar("TP", bound="LeafNode") +OM = TypeVar("OM", bound="LeafNode") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class LeafNode: return field_dict @classmethod - def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: + def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/mesh.py b/kittycad/models/mesh.py index 46420d4e4..9fba72cc4 100644 --- a/kittycad/models/mesh.py +++ b/kittycad/models/mesh.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -CF = TypeVar("CF", bound="Mesh") +EN = TypeVar("EN", bound="Mesh") @attr.s(auto_attribs=True) @@ -25,7 +25,7 @@ class Mesh: return field_dict @classmethod - def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: + def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: d = src_dict.copy() mesh = d.pop("mesh", UNSET) diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py index 96ba122b5..f6a44114f 100644 --- a/kittycad/models/meta_cluster_info.py +++ b/kittycad/models/meta_cluster_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OM = TypeVar("OM", bound="MetaClusterInfo") +RS = TypeVar("RS", bound="MetaClusterInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class MetaClusterInfo: return field_dict @classmethod - def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: + def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: d = src_dict.copy() cluster_size = d.pop("cluster_size", UNSET) diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 326cedd25..d71b4aa6e 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -11,7 +11,7 @@ from ..models.file_system_metadata import FileSystemMetadata from ..models.point_e_metadata import PointEMetadata from ..types import UNSET, Unset -EN = TypeVar("EN", bound="Metadata") +LR = TypeVar("LR", bound="Metadata") @attr.s(auto_attribs=True) @@ -71,7 +71,7 @@ class Metadata: return field_dict @classmethod - def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: + def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: d = src_dict.copy() _cache = d.pop("cache", UNSET) cache: Union[Unset, CacheMetadata] diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index 8bbfc035d..1895aacf5 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -13,7 +13,7 @@ from ..models.point3d import Point3d from ..models.scene_selection_type import SceneSelectionType from ..types import UNSET, Unset -RS = TypeVar("RS", bound="start_path") +MP = TypeVar("MP", bound="start_path") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class start_path: return field_dict @classmethod - def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: + def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: d = src_dict.copy() type = d.pop("type", UNSET) @@ -63,7 +63,7 @@ class start_path: return key in self.additional_properties -LR = TypeVar("LR", bound="move_path_pen") +WF = TypeVar("WF", bound="move_path_pen") @attr.s(auto_attribs=True) @@ -95,7 +95,7 @@ class move_path_pen: return field_dict @classmethod - def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: + def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] @@ -139,7 +139,7 @@ class move_path_pen: return key in self.additional_properties -MP = TypeVar("MP", bound="extend_path") +RO = TypeVar("RO", bound="extend_path") @attr.s(auto_attribs=True) @@ -171,7 +171,7 @@ class extend_path: return field_dict @classmethod - def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: + def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] @@ -215,7 +215,7 @@ class extend_path: return key in self.additional_properties -WF = TypeVar("WF", bound="extrude") +DN = TypeVar("DN", bound="extrude") @attr.s(auto_attribs=True) @@ -250,7 +250,7 @@ class extrude: return field_dict @classmethod - def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: d = src_dict.copy() cap = d.pop("cap", UNSET) @@ -292,7 +292,7 @@ class extrude: return key in self.additional_properties -RO = TypeVar("RO", bound="close_path") +BA = TypeVar("BA", bound="close_path") @attr.s(auto_attribs=True) @@ -318,7 +318,7 @@ class close_path: return field_dict @classmethod - def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: + def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: d = src_dict.copy() path_id = d.pop("path_id", UNSET) @@ -349,7 +349,7 @@ class close_path: return key in self.additional_properties -DN = TypeVar("DN", bound="camera_drag_start") +OR = TypeVar("OR", bound="camera_drag_start") @attr.s(auto_attribs=True) @@ -381,7 +381,7 @@ class camera_drag_start: return field_dict @classmethod - def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: + def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -425,7 +425,7 @@ class camera_drag_start: return key in self.additional_properties -BA = TypeVar("BA", bound="camera_drag_move") +CB = TypeVar("CB", bound="camera_drag_move") @attr.s(auto_attribs=True) @@ -461,7 +461,7 @@ class camera_drag_move: return field_dict @classmethod - def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: + def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -508,7 +508,7 @@ class camera_drag_move: return key in self.additional_properties -OR = TypeVar("OR", bound="camera_drag_end") +LC = TypeVar("LC", bound="camera_drag_end") @attr.s(auto_attribs=True) @@ -540,7 +540,7 @@ class camera_drag_end: return field_dict @classmethod - def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: + def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -584,7 +584,7 @@ class camera_drag_end: return key in self.additional_properties -CB = TypeVar("CB", bound="default_camera_look_at") +TO = TypeVar("TO", bound="default_camera_look_at") @attr.s(auto_attribs=True) @@ -621,7 +621,7 @@ class default_camera_look_at: return field_dict @classmethod - def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: + def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: d = src_dict.copy() _center = d.pop("center", UNSET) center: Union[Unset, Point3d] @@ -673,7 +673,7 @@ class default_camera_look_at: return key in self.additional_properties -LC = TypeVar("LC", bound="default_camera_enable_sketch_mode") +ZP = TypeVar("ZP", bound="default_camera_enable_sketch_mode") @attr.s(auto_attribs=True) @@ -722,7 +722,7 @@ class default_camera_enable_sketch_mode: return field_dict @classmethod - def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: + def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: d = src_dict.copy() animated = d.pop("animated", UNSET) @@ -783,7 +783,7 @@ class default_camera_enable_sketch_mode: return key in self.additional_properties -TO = TypeVar("TO", bound="default_camera_disable_sketch_mode") +EO = TypeVar("EO", bound="default_camera_disable_sketch_mode") @attr.s(auto_attribs=True) @@ -805,7 +805,7 @@ class default_camera_disable_sketch_mode: return field_dict @classmethod - def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: + def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: d = src_dict.copy() type = d.pop("type", UNSET) @@ -833,7 +833,7 @@ class default_camera_disable_sketch_mode: return key in self.additional_properties -ZP = TypeVar("ZP", bound="export") +NY = TypeVar("NY", bound="export") @attr.s(auto_attribs=True) @@ -866,7 +866,7 @@ class export: return field_dict @classmethod - def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: + def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: d = src_dict.copy() entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) @@ -905,7 +905,7 @@ class export: return key in self.additional_properties -EO = TypeVar("EO", bound="entity_get_parent_id") +QO = TypeVar("QO", bound="entity_get_parent_id") @attr.s(auto_attribs=True) @@ -931,7 +931,7 @@ class entity_get_parent_id: return field_dict @classmethod - def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: + def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -962,7 +962,7 @@ class entity_get_parent_id: return key in self.additional_properties -NY = TypeVar("NY", bound="entity_get_num_children") +KX = TypeVar("KX", bound="entity_get_num_children") @attr.s(auto_attribs=True) @@ -988,7 +988,7 @@ class entity_get_num_children: return field_dict @classmethod - def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -1019,7 +1019,7 @@ class entity_get_num_children: return key in self.additional_properties -QO = TypeVar("QO", bound="entity_get_child_uuid") +IZ = TypeVar("IZ", bound="entity_get_child_uuid") @attr.s(auto_attribs=True) @@ -1049,7 +1049,7 @@ class entity_get_child_uuid: return field_dict @classmethod - def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: + def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: d = src_dict.copy() child_index = d.pop("child_index", UNSET) @@ -1083,7 +1083,7 @@ class entity_get_child_uuid: return key in self.additional_properties -KX = TypeVar("KX", bound="entity_get_all_child_uuids") +WO = TypeVar("WO", bound="entity_get_all_child_uuids") @attr.s(auto_attribs=True) @@ -1109,7 +1109,7 @@ class entity_get_all_child_uuids: return field_dict @classmethod - def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: + def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -1140,7 +1140,7 @@ class entity_get_all_child_uuids: return key in self.additional_properties -IZ = TypeVar("IZ", bound="edit_mode_enter") +NK = TypeVar("NK", bound="edit_mode_enter") @attr.s(auto_attribs=True) @@ -1166,7 +1166,7 @@ class edit_mode_enter: return field_dict @classmethod - def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: d = src_dict.copy() target = d.pop("target", UNSET) @@ -1197,7 +1197,7 @@ class edit_mode_enter: return key in self.additional_properties -WO = TypeVar("WO", bound="edit_mode_exit") +UQ = TypeVar("UQ", bound="edit_mode_exit") @attr.s(auto_attribs=True) @@ -1219,7 +1219,7 @@ class edit_mode_exit: return field_dict @classmethod - def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: + def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: d = src_dict.copy() type = d.pop("type", UNSET) @@ -1247,7 +1247,7 @@ class edit_mode_exit: return key in self.additional_properties -NK = TypeVar("NK", bound="select_with_point") +QE = TypeVar("QE", bound="select_with_point") @attr.s(auto_attribs=True) @@ -1279,7 +1279,7 @@ class select_with_point: return field_dict @classmethod - def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: + def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: d = src_dict.copy() _selected_at_window = d.pop("selected_at_window", UNSET) selected_at_window: Union[Unset, Point2d] @@ -1323,7 +1323,7 @@ class select_with_point: return key in self.additional_properties -UQ = TypeVar("UQ", bound="select_clear") +XH = TypeVar("XH", bound="select_clear") @attr.s(auto_attribs=True) @@ -1345,7 +1345,7 @@ class select_clear: return field_dict @classmethod - def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: + def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: d = src_dict.copy() type = d.pop("type", UNSET) @@ -1373,7 +1373,7 @@ class select_clear: return key in self.additional_properties -QE = TypeVar("QE", bound="select_add") +KT = TypeVar("KT", bound="select_add") @attr.s(auto_attribs=True) @@ -1401,7 +1401,7 @@ class select_add: return field_dict @classmethod - def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: + def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1432,7 +1432,7 @@ class select_add: return key in self.additional_properties -XH = TypeVar("XH", bound="select_remove") +BV = TypeVar("BV", bound="select_remove") @attr.s(auto_attribs=True) @@ -1460,7 +1460,7 @@ class select_remove: return field_dict @classmethod - def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: + def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1491,7 +1491,7 @@ class select_remove: return key in self.additional_properties -KT = TypeVar("KT", bound="select_replace") +GU = TypeVar("GU", bound="select_replace") @attr.s(auto_attribs=True) @@ -1519,7 +1519,7 @@ class select_replace: return field_dict @classmethod - def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: + def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1550,7 +1550,7 @@ class select_replace: return key in self.additional_properties -BV = TypeVar("BV", bound="select_get") +SS = TypeVar("SS", bound="select_get") @attr.s(auto_attribs=True) @@ -1572,7 +1572,7 @@ class select_get: return field_dict @classmethod - def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: + def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: d = src_dict.copy() type = d.pop("type", UNSET) @@ -1600,7 +1600,7 @@ class select_get: return key in self.additional_properties -GU = TypeVar("GU", bound="highlight_set_entity") +UP = TypeVar("UP", bound="highlight_set_entity") @attr.s(auto_attribs=True) @@ -1631,7 +1631,7 @@ class highlight_set_entity: return field_dict @classmethod - def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: + def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: d = src_dict.copy() _selected_at_window = d.pop("selected_at_window", UNSET) selected_at_window: Union[Unset, Point2d] @@ -1670,7 +1670,7 @@ class highlight_set_entity: return key in self.additional_properties -SS = TypeVar("SS", bound="highlight_set_entities") +AZ = TypeVar("AZ", bound="highlight_set_entities") @attr.s(auto_attribs=True) @@ -1698,7 +1698,7 @@ class highlight_set_entities: return field_dict @classmethod - def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: + def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1729,7 +1729,7 @@ class highlight_set_entities: return key in self.additional_properties -UP = TypeVar("UP", bound="new_annotation") +DJ = TypeVar("DJ", bound="new_annotation") @attr.s(auto_attribs=True) @@ -1765,7 +1765,7 @@ class new_annotation: return field_dict @classmethod - def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: + def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: d = src_dict.copy() _annotation_type = d.pop("annotation_type", UNSET) annotation_type: Union[Unset, AnnotationType] @@ -1812,7 +1812,7 @@ class new_annotation: return key in self.additional_properties -AZ = TypeVar("AZ", bound="update_annotation") +WJ = TypeVar("WJ", bound="update_annotation") @attr.s(auto_attribs=True) @@ -1843,7 +1843,7 @@ class update_annotation: return field_dict @classmethod - def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: + def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: d = src_dict.copy() annotation_id = d.pop("annotation_id", UNSET) @@ -1882,7 +1882,7 @@ class update_annotation: return key in self.additional_properties -DJ = TypeVar("DJ", bound="object_visible") +TR = TypeVar("TR", bound="object_visible") @attr.s(auto_attribs=True) @@ -1912,7 +1912,7 @@ class object_visible: return field_dict @classmethod - def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: + def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: d = src_dict.copy() hidden = d.pop("hidden", UNSET) @@ -1946,7 +1946,7 @@ class object_visible: return key in self.additional_properties -WJ = TypeVar("WJ", bound="get_entity_type") +YD = TypeVar("YD", bound="get_entity_type") @attr.s(auto_attribs=True) @@ -1972,7 +1972,7 @@ class get_entity_type: return field_dict @classmethod - def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: + def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -2003,7 +2003,7 @@ class get_entity_type: return key in self.additional_properties -TR = TypeVar("TR", bound="solid3d_get_all_edge_faces") +JF = TypeVar("JF", bound="solid3d_get_all_edge_faces") @attr.s(auto_attribs=True) @@ -2033,7 +2033,7 @@ class solid3d_get_all_edge_faces: return field_dict @classmethod - def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: + def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) @@ -2067,7 +2067,7 @@ class solid3d_get_all_edge_faces: return key in self.additional_properties -YD = TypeVar("YD", bound="solid3d_get_all_opposite_edges") +VP = TypeVar("VP", bound="solid3d_get_all_opposite_edges") @attr.s(auto_attribs=True) @@ -2102,7 +2102,7 @@ class solid3d_get_all_opposite_edges: return field_dict @classmethod - def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: + def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: d = src_dict.copy() _along_vector = d.pop("along_vector", UNSET) along_vector: Union[Unset, Point3d] @@ -2144,7 +2144,7 @@ class solid3d_get_all_opposite_edges: return key in self.additional_properties -JF = TypeVar("JF", bound="solid3d_get_opposite_edge") +EL = TypeVar("EL", bound="solid3d_get_opposite_edge") @attr.s(auto_attribs=True) @@ -2152,7 +2152,7 @@ class solid3d_get_opposite_edge: """Gets the edge opposite the given edge, along the given face.""" # noqa: E501 edge_id: Union[Unset, str] = UNSET - face_uuid: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET object_id: Union[Unset, str] = UNSET type: str = "solid3d_get_opposite_edge" @@ -2160,7 +2160,7 @@ class solid3d_get_opposite_edge: def to_dict(self) -> Dict[str, Any]: edge_id = self.edge_id - face_uuid = self.face_uuid + face_id = self.face_id object_id = self.object_id type = self.type @@ -2169,8 +2169,8 @@ class solid3d_get_opposite_edge: field_dict.update({}) if edge_id is not UNSET: field_dict["edge_id"] = edge_id - if face_uuid is not UNSET: - field_dict["face_uuid"] = face_uuid + if face_id is not UNSET: + field_dict["face_id"] = face_id if object_id is not UNSET: field_dict["object_id"] = object_id field_dict["type"] = type @@ -2178,11 +2178,11 @@ class solid3d_get_opposite_edge: return field_dict @classmethod - def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: + def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) - face_uuid = d.pop("face_uuid", UNSET) + face_id = d.pop("face_id", UNSET) object_id = d.pop("object_id", UNSET) @@ -2190,7 +2190,7 @@ class solid3d_get_opposite_edge: solid3d_get_opposite_edge = cls( edge_id=edge_id, - face_uuid=face_uuid, + face_id=face_id, object_id=object_id, type=type, ) @@ -2215,7 +2215,7 @@ class solid3d_get_opposite_edge: return key in self.additional_properties -VP = TypeVar("VP", bound="solid3d_get_next_adjacent_edge") +ZG = TypeVar("ZG", bound="solid3d_get_next_adjacent_edge") @attr.s(auto_attribs=True) @@ -2223,7 +2223,7 @@ class solid3d_get_next_adjacent_edge: """Gets the next adjacent edge for the given edge, along the given face.""" # noqa: E501 edge_id: Union[Unset, str] = UNSET - face_uuid: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET object_id: Union[Unset, str] = UNSET type: str = "solid3d_get_next_adjacent_edge" @@ -2231,7 +2231,7 @@ class solid3d_get_next_adjacent_edge: def to_dict(self) -> Dict[str, Any]: edge_id = self.edge_id - face_uuid = self.face_uuid + face_id = self.face_id object_id = self.object_id type = self.type @@ -2240,8 +2240,8 @@ class solid3d_get_next_adjacent_edge: field_dict.update({}) if edge_id is not UNSET: field_dict["edge_id"] = edge_id - if face_uuid is not UNSET: - field_dict["face_uuid"] = face_uuid + if face_id is not UNSET: + field_dict["face_id"] = face_id if object_id is not UNSET: field_dict["object_id"] = object_id field_dict["type"] = type @@ -2249,11 +2249,11 @@ class solid3d_get_next_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: + def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) - face_uuid = d.pop("face_uuid", UNSET) + face_id = d.pop("face_id", UNSET) object_id = d.pop("object_id", UNSET) @@ -2261,7 +2261,7 @@ class solid3d_get_next_adjacent_edge: solid3d_get_next_adjacent_edge = cls( edge_id=edge_id, - face_uuid=face_uuid, + face_id=face_id, object_id=object_id, type=type, ) @@ -2286,7 +2286,7 @@ class solid3d_get_next_adjacent_edge: return key in self.additional_properties -EL = TypeVar("EL", bound="solid3d_get_prev_adjacent_edge") +LF = TypeVar("LF", bound="solid3d_get_prev_adjacent_edge") @attr.s(auto_attribs=True) @@ -2294,7 +2294,7 @@ class solid3d_get_prev_adjacent_edge: """Gets the previous adjacent edge for the given edge, along the given face.""" # noqa: E501 edge_id: Union[Unset, str] = UNSET - face_uuid: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET object_id: Union[Unset, str] = UNSET type: str = "solid3d_get_prev_adjacent_edge" @@ -2302,7 +2302,7 @@ class solid3d_get_prev_adjacent_edge: def to_dict(self) -> Dict[str, Any]: edge_id = self.edge_id - face_uuid = self.face_uuid + face_id = self.face_id object_id = self.object_id type = self.type @@ -2311,8 +2311,8 @@ class solid3d_get_prev_adjacent_edge: field_dict.update({}) if edge_id is not UNSET: field_dict["edge_id"] = edge_id - if face_uuid is not UNSET: - field_dict["face_uuid"] = face_uuid + if face_id is not UNSET: + field_dict["face_id"] = face_id if object_id is not UNSET: field_dict["object_id"] = object_id field_dict["type"] = type @@ -2320,11 +2320,11 @@ class solid3d_get_prev_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: + def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) - face_uuid = d.pop("face_uuid", UNSET) + face_id = d.pop("face_id", UNSET) object_id = d.pop("object_id", UNSET) @@ -2332,7 +2332,7 @@ class solid3d_get_prev_adjacent_edge: solid3d_get_prev_adjacent_edge = cls( edge_id=edge_id, - face_uuid=face_uuid, + face_id=face_id, object_id=object_id, type=type, ) diff --git a/kittycad/models/modeling_cmd_req.py b/kittycad/models/modeling_cmd_req.py index 475928f5f..1ab31cec0 100644 --- a/kittycad/models/modeling_cmd_req.py +++ b/kittycad/models/modeling_cmd_req.py @@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -ZG = TypeVar("ZG", bound="ModelingCmdReq") +CS = TypeVar("CS", bound="ModelingCmdReq") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class ModelingCmdReq: return field_dict @classmethod - def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: + def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: d = src_dict.copy() _cmd = d.pop("cmd", UNSET) cmd: Union[Unset, ModelingCmd] diff --git a/kittycad/models/modeling_cmd_req_batch.py b/kittycad/models/modeling_cmd_req_batch.py index 7a4678043..6098d7ba4 100644 --- a/kittycad/models/modeling_cmd_req_batch.py +++ b/kittycad/models/modeling_cmd_req_batch.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LF = TypeVar("LF", bound="ModelingCmdReqBatch") +GN = TypeVar("GN", bound="ModelingCmdReqBatch") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class ModelingCmdReqBatch: return field_dict @classmethod - def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: + def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: d = src_dict.copy() cmds = d.pop("cmds", UNSET) diff --git a/kittycad/models/modeling_error.py b/kittycad/models/modeling_error.py index 57ed12635..3bca1e79e 100644 --- a/kittycad/models/modeling_error.py +++ b/kittycad/models/modeling_error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -CS = TypeVar("CS", bound="ModelingError") +GD = TypeVar("GD", bound="ModelingError") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class ModelingError: return field_dict @classmethod - def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: + def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: d = src_dict.copy() error_code = d.pop("error_code", UNSET) diff --git a/kittycad/models/modeling_outcome.py b/kittycad/models/modeling_outcome.py index 76a25075f..b72d0fcfa 100644 --- a/kittycad/models/modeling_outcome.py +++ b/kittycad/models/modeling_outcome.py @@ -13,7 +13,7 @@ success = OkModelingCmdResponse error = ModelingError -GN = TypeVar("GN", bound="cancelled") +VJ = TypeVar("VJ", bound="cancelled") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class cancelled: return field_dict @classmethod - def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: + def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: d = src_dict.copy() _what_failed = d.pop("what_failed", UNSET) what_failed: Union[Unset, ModelingCmdId] diff --git a/kittycad/models/modeling_outcomes.py b/kittycad/models/modeling_outcomes.py index 1c280e963..5fafde59e 100644 --- a/kittycad/models/modeling_outcomes.py +++ b/kittycad/models/modeling_outcomes.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -GD = TypeVar("GD", bound="ModelingOutcomes") +OX = TypeVar("OX", bound="ModelingOutcomes") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class ModelingOutcomes: return field_dict @classmethod - def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: + def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: d = src_dict.copy() outcomes = d.pop("outcomes", UNSET) diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index c6352ccb4..ed905b4b3 100644 --- a/kittycad/models/new_address.py +++ b/kittycad/models/new_address.py @@ -5,7 +5,7 @@ import attr from ..models.country_code import CountryCode from ..types import UNSET, Unset -VJ = TypeVar("VJ", bound="NewAddress") +YW = TypeVar("YW", bound="NewAddress") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class NewAddress: return field_dict @classmethod - def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: + def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: d = src_dict.copy() city = d.pop("city", UNSET) diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py index f03fe17e1..39334a445 100644 --- a/kittycad/models/o_auth2_client_info.py +++ b/kittycad/models/o_auth2_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OX = TypeVar("OX", bound="OAuth2ClientInfo") +QX = TypeVar("QX", bound="OAuth2ClientInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class OAuth2ClientInfo: return field_dict @classmethod - def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: + def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: d = src_dict.copy() csrf_token = d.pop("csrf_token", UNSET) diff --git a/kittycad/models/ok_modeling_cmd_response.py b/kittycad/models/ok_modeling_cmd_response.py index 8281ab3f5..23ba5c391 100644 --- a/kittycad/models/ok_modeling_cmd_response.py +++ b/kittycad/models/ok_modeling_cmd_response.py @@ -5,7 +5,7 @@ import attr from ..models.entity_type import EntityType from ..types import UNSET, Unset -YW = TypeVar("YW", bound="empty") +NO = TypeVar("NO", bound="empty") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class empty: return field_dict @classmethod - def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: + def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: d = src_dict.copy() type = d.pop("type", UNSET) @@ -55,7 +55,7 @@ class empty: return key in self.additional_properties -QX = TypeVar("QX", bound="export") +VX = TypeVar("VX", bound="export") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class export: return field_dict @classmethod - def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: + def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: d = src_dict.copy() from ..models.export_file import ExportFile @@ -120,7 +120,7 @@ class export: return key in self.additional_properties -NO = TypeVar("NO", bound="select_with_point") +RG = TypeVar("RG", bound="select_with_point") @attr.s(auto_attribs=True) @@ -146,7 +146,7 @@ class select_with_point: return field_dict @classmethod - def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: + def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -177,7 +177,7 @@ class select_with_point: return key in self.additional_properties -VX = TypeVar("VX", bound="highlight_set_entity") +IT = TypeVar("IT", bound="highlight_set_entity") @attr.s(auto_attribs=True) @@ -207,7 +207,7 @@ class highlight_set_entity: return field_dict @classmethod - def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: + def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -241,7 +241,7 @@ class highlight_set_entity: return key in self.additional_properties -RG = TypeVar("RG", bound="entity_get_child_uuid") +LD = TypeVar("LD", bound="entity_get_child_uuid") @attr.s(auto_attribs=True) @@ -267,7 +267,7 @@ class entity_get_child_uuid: return field_dict @classmethod - def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: + def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -298,7 +298,7 @@ class entity_get_child_uuid: return key in self.additional_properties -IT = TypeVar("IT", bound="entity_get_num_children") +UA = TypeVar("UA", bound="entity_get_num_children") @attr.s(auto_attribs=True) @@ -324,7 +324,7 @@ class entity_get_num_children: return field_dict @classmethod - def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: + def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: d = src_dict.copy() num = d.pop("num", UNSET) @@ -355,7 +355,7 @@ class entity_get_num_children: return key in self.additional_properties -LD = TypeVar("LD", bound="entity_get_parent_id") +TN = TypeVar("TN", bound="entity_get_parent_id") @attr.s(auto_attribs=True) @@ -381,7 +381,7 @@ class entity_get_parent_id: return field_dict @classmethod - def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: + def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -412,7 +412,7 @@ class entity_get_parent_id: return key in self.additional_properties -UA = TypeVar("UA", bound="entity_get_all_child_uuids") +MZ = TypeVar("MZ", bound="entity_get_all_child_uuids") @attr.s(auto_attribs=True) @@ -440,7 +440,7 @@ class entity_get_all_child_uuids: return field_dict @classmethod - def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: + def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: d = src_dict.copy() entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) @@ -471,7 +471,7 @@ class entity_get_all_child_uuids: return key in self.additional_properties -TN = TypeVar("TN", bound="select_get") +UG = TypeVar("UG", bound="select_get") @attr.s(auto_attribs=True) @@ -499,7 +499,7 @@ class select_get: return field_dict @classmethod - def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: + def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: d = src_dict.copy() entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) @@ -530,7 +530,7 @@ class select_get: return key in self.additional_properties -MZ = TypeVar("MZ", bound="get_entity_type") +CY = TypeVar("CY", bound="get_entity_type") @attr.s(auto_attribs=True) @@ -557,7 +557,7 @@ class get_entity_type: return field_dict @classmethod - def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: + def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: d = src_dict.copy() _entity_type = d.pop("entity_type", UNSET) entity_type: Union[Unset, EntityType] @@ -593,7 +593,7 @@ class get_entity_type: return key in self.additional_properties -UG = TypeVar("UG", bound="solid3d_get_all_edge_faces") +NZ = TypeVar("NZ", bound="solid3d_get_all_edge_faces") @attr.s(auto_attribs=True) @@ -621,7 +621,7 @@ class solid3d_get_all_edge_faces: return field_dict @classmethod - def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: + def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: d = src_dict.copy() faces = cast(List[str], d.pop("faces", UNSET)) @@ -652,7 +652,7 @@ class solid3d_get_all_edge_faces: return key in self.additional_properties -CY = TypeVar("CY", bound="solid3d_get_all_opposite_edges") +LI = TypeVar("LI", bound="solid3d_get_all_opposite_edges") @attr.s(auto_attribs=True) @@ -680,7 +680,7 @@ class solid3d_get_all_opposite_edges: return field_dict @classmethod - def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: + def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: d = src_dict.copy() edges = cast(List[str], d.pop("edges", UNSET)) @@ -711,7 +711,7 @@ class solid3d_get_all_opposite_edges: return key in self.additional_properties -NZ = TypeVar("NZ", bound="solid3d_get_opposite_edge") +LO = TypeVar("LO", bound="solid3d_get_opposite_edge") @attr.s(auto_attribs=True) @@ -737,7 +737,7 @@ class solid3d_get_opposite_edge: return field_dict @classmethod - def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: + def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: d = src_dict.copy() edge = d.pop("edge", UNSET) @@ -768,7 +768,7 @@ class solid3d_get_opposite_edge: return key in self.additional_properties -LI = TypeVar("LI", bound="solid3d_get_prev_adjacent_edge") +XJ = TypeVar("XJ", bound="solid3d_get_prev_adjacent_edge") @attr.s(auto_attribs=True) @@ -794,7 +794,7 @@ class solid3d_get_prev_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: + def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: d = src_dict.copy() edge = d.pop("edge", UNSET) @@ -825,7 +825,7 @@ class solid3d_get_prev_adjacent_edge: return key in self.additional_properties -LO = TypeVar("LO", bound="solid3d_get_next_adjacent_edge") +OW = TypeVar("OW", bound="solid3d_get_next_adjacent_edge") @attr.s(auto_attribs=True) @@ -851,7 +851,7 @@ class solid3d_get_next_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: + def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: d = src_dict.copy() edge = d.pop("edge", UNSET) diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index 22de9bcd8..ca560fd80 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -XJ = TypeVar("XJ", bound="Onboarding") +JQ = TypeVar("JQ", bound="Onboarding") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class Onboarding: return field_dict @classmethod - def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: + def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: d = src_dict.copy() first_call_from__their_machine_date = d.pop( "first_call_from_their_machine_date", UNSET diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 6df1106c9..e633e1687 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OW = TypeVar("OW", bound="OutputFile") +PQ = TypeVar("PQ", bound="OutputFile") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class OutputFile: return field_dict @classmethod - def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: + def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: d = src_dict.copy() contents = d.pop("contents", UNSET) diff --git a/kittycad/models/output_format.py b/kittycad/models/output_format.py index 7398e212a..b60c67052 100644 --- a/kittycad/models/output_format.py +++ b/kittycad/models/output_format.py @@ -6,7 +6,7 @@ from ..models.storage import Storage from ..models.system import System from ..types import UNSET, Unset -JQ = TypeVar("JQ", bound="gltf") +IM = TypeVar("IM", bound="gltf") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class gltf: return field_dict @classmethod - def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: + def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: d = src_dict.copy() _storage = d.pop("storage", UNSET) storage: Union[Unset, Storage] @@ -69,7 +69,7 @@ class gltf: return key in self.additional_properties -PQ = TypeVar("PQ", bound="obj") +OU = TypeVar("OU", bound="obj") @attr.s(auto_attribs=True) @@ -96,7 +96,7 @@ class obj: return field_dict @classmethod - def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: + def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -132,7 +132,7 @@ class obj: return key in self.additional_properties -IM = TypeVar("IM", bound="ply") +KL = TypeVar("KL", bound="ply") @attr.s(auto_attribs=True) @@ -164,7 +164,7 @@ class ply: return field_dict @classmethod - def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: + def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -208,7 +208,7 @@ class ply: return key in self.additional_properties -OU = TypeVar("OU", bound="step") +XI = TypeVar("XI", bound="step") @attr.s(auto_attribs=True) @@ -235,7 +235,7 @@ class step: return field_dict @classmethod - def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: + def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -271,7 +271,7 @@ class step: return key in self.additional_properties -KL = TypeVar("KL", bound="stl") +PO = TypeVar("PO", bound="stl") @attr.s(auto_attribs=True) @@ -303,7 +303,7 @@ class stl: return field_dict @classmethod - def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: + def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] diff --git a/kittycad/models/path_segment.py b/kittycad/models/path_segment.py index 3f941a7c1..75dc385dd 100644 --- a/kittycad/models/path_segment.py +++ b/kittycad/models/path_segment.py @@ -6,7 +6,7 @@ from ..models.point2d import Point2d from ..models.point3d import Point3d from ..types import UNSET, Unset -XI = TypeVar("XI", bound="line") +PS = TypeVar("PS", bound="line") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class line: return field_dict @classmethod - def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: + def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: d = src_dict.copy() _end = d.pop("end", UNSET) end: Union[Unset, Point3d] @@ -69,7 +69,7 @@ class line: return key in self.additional_properties -PO = TypeVar("PO", bound="arc") +WR = TypeVar("WR", bound="arc") @attr.s(auto_attribs=True) @@ -108,7 +108,7 @@ class arc: return field_dict @classmethod - def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: + def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: d = src_dict.copy() angle_end = d.pop("angle_end", UNSET) @@ -153,7 +153,7 @@ class arc: return key in self.additional_properties -PS = TypeVar("PS", bound="bezier") +XL = TypeVar("XL", bound="bezier") @attr.s(auto_attribs=True) @@ -190,7 +190,7 @@ class bezier: return field_dict @classmethod - def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: + def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: d = src_dict.copy() _control1 = d.pop("control1", UNSET) control1: Union[Unset, Point3d] diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index 9da79637c..1309c014a 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -WR = TypeVar("WR", bound="PaymentIntent") +ZX = TypeVar("ZX", bound="PaymentIntent") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class PaymentIntent: return field_dict @classmethod - def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: + def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: d = src_dict.copy() client_secret = d.pop("client_secret", UNSET) diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index d73afe391..8a2c3ad47 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -9,7 +9,7 @@ from ..models.card_details import CardDetails from ..models.payment_method_type import PaymentMethodType from ..types import UNSET, Unset -XL = TypeVar("XL", bound="PaymentMethod") +FT = TypeVar("FT", bound="PaymentMethod") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class PaymentMethod: return field_dict @classmethod - def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: + def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: d = src_dict.copy() _billing_info = d.pop("billing_info", UNSET) billing_info: Union[Unset, BillingInfo] diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index 778d19d21..754e9e1f8 100644 --- a/kittycad/models/payment_method_card_checks.py +++ b/kittycad/models/payment_method_card_checks.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -ZX = TypeVar("ZX", bound="PaymentMethodCardChecks") +NX = TypeVar("NX", bound="PaymentMethodCardChecks") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class PaymentMethodCardChecks: return field_dict @classmethod - def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: + def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: d = src_dict.copy() address_line1_check = d.pop("address_line1_check", UNSET) diff --git a/kittycad/models/plugins_info.py b/kittycad/models/plugins_info.py index a720c0058..5fe71a1ad 100644 --- a/kittycad/models/plugins_info.py +++ b/kittycad/models/plugins_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FT = TypeVar("FT", bound="PluginsInfo") +SC = TypeVar("SC", bound="PluginsInfo") @attr.s(auto_attribs=True) @@ -50,7 +50,7 @@ class PluginsInfo: return field_dict @classmethod - def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: + def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: d = src_dict.copy() authorization = cast(List[str], d.pop("authorization", UNSET)) diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py index 31da1b1b4..16c4e758f 100644 --- a/kittycad/models/point2d.py +++ b/kittycad/models/point2d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -NX = TypeVar("NX", bound="Point2d") +TX = TypeVar("TX", bound="Point2d") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class Point2d: return field_dict @classmethod - def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: + def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py index 828f12a68..56be1c224 100644 --- a/kittycad/models/point3d.py +++ b/kittycad/models/point3d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -SC = TypeVar("SC", bound="Point3d") +JA = TypeVar("JA", bound="Point3d") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Point3d: return field_dict @classmethod - def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: + def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point_e_metadata.py b/kittycad/models/point_e_metadata.py index 57a2b1116..6e8ca3891 100644 --- a/kittycad/models/point_e_metadata.py +++ b/kittycad/models/point_e_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TX = TypeVar("TX", bound="PointEMetadata") +SK = TypeVar("SK", bound="PointEMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class PointEMetadata: return field_dict @classmethod - def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: + def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index 33f8c3300..89c12eb1a 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -JA = TypeVar("JA", bound="Pong") +UK = TypeVar("UK", bound="Pong") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Pong: return field_dict @classmethod - def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: + def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: d = src_dict.copy() message = d.pop("message", UNSET) diff --git a/kittycad/models/raw_file.py b/kittycad/models/raw_file.py new file mode 100644 index 000000000..c0b92e383 --- /dev/null +++ b/kittycad/models/raw_file.py @@ -0,0 +1,64 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +CX = TypeVar("CX", bound="RawFile") + + +@attr.s(auto_attribs=True) +class RawFile: + """A raw file with unencoded contents to be passed over binary websockets.""" # noqa: E501 + + contents: Union[Unset, List[int]] = UNSET + name: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, List[int]] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: + d = src_dict.copy() + contents = cast(List[int], d.pop("contents", UNSET)) + + name = d.pop("name", UNSET) + + raw_file = cls( + contents=contents, + name=name, + ) + + raw_file.additional_properties = d + return raw_file + + @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 diff --git a/kittycad/models/registry_service_config.py b/kittycad/models/registry_service_config.py index f7e9ac714..e3c940d94 100644 --- a/kittycad/models/registry_service_config.py +++ b/kittycad/models/registry_service_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -SK = TypeVar("SK", bound="RegistryServiceConfig") +MT = TypeVar("MT", bound="RegistryServiceConfig") @attr.s(auto_attribs=True) @@ -59,7 +59,7 @@ class RegistryServiceConfig: return field_dict @classmethod - def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: + def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: d = src_dict.copy() allow_nondistributable_artifacts_cid_rs = cast( List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET) diff --git a/kittycad/models/rtc_ice_candidate.py b/kittycad/models/rtc_ice_candidate.py new file mode 100644 index 000000000..9c61f8764 --- /dev/null +++ b/kittycad/models/rtc_ice_candidate.py @@ -0,0 +1,139 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.rtc_ice_candidate_type import RtcIceCandidateType +from ..models.rtc_ice_protocol import RtcIceProtocol +from ..types import UNSET, Unset + +LJ = TypeVar("LJ", bound="RtcIceCandidate") + + +@attr.s(auto_attribs=True) +class RtcIceCandidate: + """ICECandidate represents a ice candidate""" # noqa: E501 + + address: Union[Unset, str] = UNSET + component: Union[Unset, int] = UNSET + foundation: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + priority: Union[Unset, int] = UNSET + protocol: Union[Unset, RtcIceProtocol] = UNSET + related_address: Union[Unset, str] = UNSET + related_port: Union[Unset, int] = UNSET + stats_id: Union[Unset, str] = UNSET + tcp_type: Union[Unset, str] = UNSET + typ: Union[Unset, RtcIceCandidateType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + address = self.address + component = self.component + foundation = self.foundation + port = self.port + priority = self.priority + if not isinstance(self.protocol, Unset): + protocol = self.protocol + related_address = self.related_address + related_port = self.related_port + stats_id = self.stats_id + tcp_type = self.tcp_type + if not isinstance(self.typ, Unset): + typ = self.typ + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict["address"] = address + if component is not UNSET: + field_dict["component"] = component + if foundation is not UNSET: + field_dict["foundation"] = foundation + if port is not UNSET: + field_dict["port"] = port + if priority is not UNSET: + field_dict["priority"] = priority + if protocol is not UNSET: + field_dict["protocol"] = protocol + if related_address is not UNSET: + field_dict["related_address"] = related_address + if related_port is not UNSET: + field_dict["related_port"] = related_port + if stats_id is not UNSET: + field_dict["stats_id"] = stats_id + if tcp_type is not UNSET: + field_dict["tcp_type"] = tcp_type + if typ is not UNSET: + field_dict["typ"] = typ + + return field_dict + + @classmethod + def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: + d = src_dict.copy() + address = d.pop("address", UNSET) + + component = d.pop("component", UNSET) + + foundation = d.pop("foundation", UNSET) + + port = d.pop("port", UNSET) + + priority = d.pop("priority", UNSET) + + _protocol = d.pop("protocol", UNSET) + protocol: Union[Unset, RtcIceProtocol] + if isinstance(_protocol, Unset): + protocol = UNSET + else: + protocol = _protocol # type: ignore[arg-type] + + related_address = d.pop("related_address", UNSET) + + related_port = d.pop("related_port", UNSET) + + stats_id = d.pop("stats_id", UNSET) + + tcp_type = d.pop("tcp_type", UNSET) + + _typ = d.pop("typ", UNSET) + typ: Union[Unset, RtcIceCandidateType] + if isinstance(_typ, Unset): + typ = UNSET + else: + typ = _typ # type: ignore[arg-type] + + rtc_ice_candidate = cls( + address=address, + component=component, + foundation=foundation, + port=port, + priority=priority, + protocol=protocol, + related_address=related_address, + related_port=related_port, + stats_id=stats_id, + tcp_type=tcp_type, + typ=typ, + ) + + rtc_ice_candidate.additional_properties = d + return rtc_ice_candidate + + @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 diff --git a/kittycad/models/rtc_ice_candidate_init.py b/kittycad/models/rtc_ice_candidate_init.py new file mode 100644 index 000000000..8e8e9dcaa --- /dev/null +++ b/kittycad/models/rtc_ice_candidate_init.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +TF = TypeVar("TF", bound="RtcIceCandidateInit") + + +@attr.s(auto_attribs=True) +class RtcIceCandidateInit: + """ICECandidateInit is used to serialize ice candidates""" # noqa: E501 + + candidate: Union[Unset, str] = UNSET + sdp_m_line_index: Union[Unset, int] = UNSET + sdp_mid: Union[Unset, str] = UNSET + username_fragment: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + candidate = self.candidate + sdp_m_line_index = self.sdp_m_line_index + sdp_mid = self.sdp_mid + username_fragment = self.username_fragment + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict["candidate"] = candidate + if sdp_m_line_index is not UNSET: + field_dict["sdpMLineIndex"] = sdp_m_line_index + if sdp_mid is not UNSET: + field_dict["sdpMid"] = sdp_mid + if username_fragment is not UNSET: + field_dict["usernameFragment"] = username_fragment + + return field_dict + + @classmethod + def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: + d = src_dict.copy() + candidate = d.pop("candidate", UNSET) + + sdp_m_line_index = d.pop("sdpMLineIndex", UNSET) + + sdp_mid = d.pop("sdpMid", UNSET) + + username_fragment = d.pop("usernameFragment", UNSET) + + rtc_ice_candidate_init = cls( + candidate=candidate, + sdp_m_line_index=sdp_m_line_index, + sdp_mid=sdp_mid, + username_fragment=username_fragment, + ) + + rtc_ice_candidate_init.additional_properties = d + return rtc_ice_candidate_init + + @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 diff --git a/kittycad/models/rtc_ice_candidate_type.py b/kittycad/models/rtc_ice_candidate_type.py new file mode 100644 index 000000000..1f157b888 --- /dev/null +++ b/kittycad/models/rtc_ice_candidate_type.py @@ -0,0 +1,19 @@ +from enum import Enum + + +class RtcIceCandidateType(str, Enum): + """ICECandidateType represents the type of the ICE candidate used.""" # noqa: E501 + + """# Unspecified indicates that the candidate type is unspecified. """ # noqa: E501 + UNSPECIFIED = "unspecified" + """# ICECandidateTypeHost indicates that the candidate is of Host type as described in . A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs. """ # noqa: E501 + HOST = "host" + """# ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described . A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server. """ # noqa: E501 + SRFLX = "srflx" + """# ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to its peer. """ # noqa: E501 + PRFLX = "prflx" + """# ICECandidateTypeRelay indicates the the candidate is of Relay type as described in . A candidate type obtained from a relay server, such as a TURN server. """ # noqa: E501 + RELAY = "relay" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/rtc_ice_protocol.py b/kittycad/models/rtc_ice_protocol.py new file mode 100644 index 000000000..351946309 --- /dev/null +++ b/kittycad/models/rtc_ice_protocol.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class RtcIceProtocol(str, Enum): + """ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.""" # noqa: E501 + + """# Unspecified indicates that the protocol is unspecified. """ # noqa: E501 + UNSPECIFIED = "unspecified" + """# UDP indicates the URL uses a UDP transport. """ # noqa: E501 + UDP = "udp" + """# TCP indicates the URL uses a TCP transport. """ # noqa: E501 + TCP = "tcp" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/rtc_sdp_type.py b/kittycad/models/rtc_sdp_type.py new file mode 100644 index 000000000..d8f67675c --- /dev/null +++ b/kittycad/models/rtc_sdp_type.py @@ -0,0 +1,19 @@ +from enum import Enum + + +class RtcSdpType(str, Enum): + """SDPType describes the type of an SessionDescription.""" # noqa: E501 + + """# Unspecified indicates that the type is unspecified. """ # noqa: E501 + UNSPECIFIED = "unspecified" + """# indicates that a description MUST be treated as an SDP offer. """ # noqa: E501 + OFFER = "offer" + """# indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer. """ # noqa: E501 + PRANSWER = "pranswer" + """# indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer. """ # noqa: E501 + ANSWER = "answer" + """# indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation. """ # noqa: E501 + ROLLBACK = "rollback" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/rtc_session_description.py b/kittycad/models/rtc_session_description.py new file mode 100644 index 000000000..c436d4658 --- /dev/null +++ b/kittycad/models/rtc_session_description.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.rtc_sdp_type import RtcSdpType +from ..types import UNSET, Unset + +HF = TypeVar("HF", bound="RtcSessionDescription") + + +@attr.s(auto_attribs=True) +class RtcSessionDescription: + """SessionDescription is used to expose local and remote session descriptions.""" # noqa: E501 + + sdp: Union[Unset, str] = UNSET + type: Union[Unset, RtcSdpType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + sdp = self.sdp + if not isinstance(self.type, Unset): + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sdp is not UNSET: + field_dict["sdp"] = sdp + if type is not UNSET: + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: + d = src_dict.copy() + sdp = d.pop("sdp", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, RtcSdpType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] + + rtc_session_description = cls( + sdp=sdp, + type=type, + ) + + rtc_session_description.additional_properties = d + return rtc_session_description + + @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 diff --git a/kittycad/models/runtime.py b/kittycad/models/runtime.py index 70a4f2e3e..a29fb1798 100644 --- a/kittycad/models/runtime.py +++ b/kittycad/models/runtime.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UK = TypeVar("UK", bound="Runtime") +JD = TypeVar("JD", bound="Runtime") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class Runtime: return field_dict @classmethod - def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: + def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: d = src_dict.copy() path = d.pop("path", UNSET) diff --git a/kittycad/models/session.py b/kittycad/models/session.py index d75cc6100..65892edcf 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -CX = TypeVar("CX", bound="Session") +RZ = TypeVar("RZ", bound="Session") @attr.s(auto_attribs=True) @@ -58,7 +58,7 @@ class Session: return field_dict @classmethod - def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: + def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/snake_case_result.py b/kittycad/models/snake_case_result.py new file mode 100644 index 000000000..9d34b23be --- /dev/null +++ b/kittycad/models/snake_case_result.py @@ -0,0 +1,3 @@ +from typing import Any + +SnakeCaseResult = Any diff --git a/kittycad/models/system.py b/kittycad/models/system.py index c91e69cc2..740088bac 100644 --- a/kittycad/models/system.py +++ b/kittycad/models/system.py @@ -5,7 +5,7 @@ import attr from ..models.axis_direction_pair import AxisDirectionPair from ..types import UNSET, Unset -MT = TypeVar("MT", bound="System") +BH = TypeVar("BH", bound="System") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class System: return field_dict @classmethod - def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: + def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: d = src_dict.copy() _forward = d.pop("forward", UNSET) forward: Union[Unset, AxisDirectionPair] diff --git a/kittycad/models/system_info_default_address_pools.py b/kittycad/models/system_info_default_address_pools.py index edacbb771..fc686a49f 100644 --- a/kittycad/models/system_info_default_address_pools.py +++ b/kittycad/models/system_info_default_address_pools.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LJ = TypeVar("LJ", bound="SystemInfoDefaultAddressPools") +SX = TypeVar("SX", bound="SystemInfoDefaultAddressPools") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools: return field_dict @classmethod - def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: + def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: d = src_dict.copy() base = d.pop("base", UNSET) diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index 184a3285d..f08ea40af 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_angle import UnitAngle from ..models.uuid import Uuid from ..types import UNSET, Unset -TF = TypeVar("TF", bound="UnitAngleConversion") +CN = TypeVar("CN", bound="UnitAngleConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAngleConversion: return field_dict @classmethod - def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: + def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index f815f2384..f1c5a4a21 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -HF = TypeVar("HF", bound="UnitAreaConversion") +GS = TypeVar("GS", bound="UnitAreaConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAreaConversion: return field_dict @classmethod - def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: + def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_current_conversion.py b/kittycad/models/unit_current_conversion.py index db62d4d4c..58a3e9d3c 100644 --- a/kittycad/models/unit_current_conversion.py +++ b/kittycad/models/unit_current_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_current import UnitCurrent from ..models.uuid import Uuid from ..types import UNSET, Unset -JD = TypeVar("JD", bound="UnitCurrentConversion") +SO = TypeVar("SO", bound="UnitCurrentConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitCurrentConversion: return field_dict @classmethod - def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: + def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index 9143792ff..a75ad5b00 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_energy import UnitEnergy from ..models.uuid import Uuid from ..types import UNSET, Unset -RZ = TypeVar("RZ", bound="UnitEnergyConversion") +ZS = TypeVar("ZS", bound="UnitEnergyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitEnergyConversion: return field_dict @classmethod - def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: + def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index 269e8298a..373c90876 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_force import UnitForce from ..models.uuid import Uuid from ..types import UNSET, Unset -BH = TypeVar("BH", bound="UnitForceConversion") +AM = TypeVar("AM", bound="UnitForceConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitForceConversion: return field_dict @classmethod - def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: + def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_frequency_conversion.py b/kittycad/models/unit_frequency_conversion.py index 27ea8061e..6e7cae909 100644 --- a/kittycad/models/unit_frequency_conversion.py +++ b/kittycad/models/unit_frequency_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_frequency import UnitFrequency from ..models.uuid import Uuid from ..types import UNSET, Unset -SX = TypeVar("SX", bound="UnitFrequencyConversion") +GK = TypeVar("GK", bound="UnitFrequencyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitFrequencyConversion: return field_dict @classmethod - def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: + def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index 4cf7c5768..60224c2d2 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -CN = TypeVar("CN", bound="UnitLengthConversion") +SG = TypeVar("SG", bound="UnitLengthConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitLengthConversion: return field_dict @classmethod - def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: + def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index e46dff0d8..c0614b9c0 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -GS = TypeVar("GS", bound="UnitMassConversion") +QZ = TypeVar("QZ", bound="UnitMassConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitMassConversion: return field_dict @classmethod - def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: + def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index 137989be2..2048faadb 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_power import UnitPower from ..models.uuid import Uuid from ..types import UNSET, Unset -SO = TypeVar("SO", bound="UnitPowerConversion") +SY = TypeVar("SY", bound="UnitPowerConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPowerConversion: return field_dict @classmethod - def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: + def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index 3d433499d..233b4c6b5 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_pressure import UnitPressure from ..models.uuid import Uuid from ..types import UNSET, Unset -ZS = TypeVar("ZS", bound="UnitPressureConversion") +YK = TypeVar("YK", bound="UnitPressureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPressureConversion: return field_dict @classmethod - def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: + def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index 17bc9de63..8bd1c1f3f 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_temperature import UnitTemperature from ..models.uuid import Uuid from ..types import UNSET, Unset -AM = TypeVar("AM", bound="UnitTemperatureConversion") +WS = TypeVar("WS", bound="UnitTemperatureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTemperatureConversion: return field_dict @classmethod - def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: + def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_torque_conversion.py b/kittycad/models/unit_torque_conversion.py index 115287ad9..34fe51b1a 100644 --- a/kittycad/models/unit_torque_conversion.py +++ b/kittycad/models/unit_torque_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_torque import UnitTorque from ..models.uuid import Uuid from ..types import UNSET, Unset -GK = TypeVar("GK", bound="UnitTorqueConversion") +SL = TypeVar("SL", bound="UnitTorqueConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTorqueConversion: return field_dict @classmethod - def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: + def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index 7c6e16751..44af51416 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -SG = TypeVar("SG", bound="UnitVolumeConversion") +MK = TypeVar("MK", bound="UnitVolumeConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitVolumeConversion: return field_dict @classmethod - def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: + def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index c82c5686d..c6001bd04 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -QZ = TypeVar("QZ", bound="UpdateUser") +TU = TypeVar("TU", bound="UpdateUser") @attr.s(auto_attribs=True) @@ -47,7 +47,7 @@ class UpdateUser: return field_dict @classmethod - def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: + def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 14f00d4db..0b2513ef1 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -SY = TypeVar("SY", bound="User") +FY = TypeVar("FY", bound="User") @attr.s(auto_attribs=True) @@ -83,7 +83,7 @@ class User: return field_dict @classmethod - def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: + def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user_results_page.py b/kittycad/models/user_results_page.py index 496f6d93a..bf2eda1fc 100644 --- a/kittycad/models/user_results_page.py +++ b/kittycad/models/user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -YK = TypeVar("YK", bound="UserResultsPage") +FD = TypeVar("FD", bound="UserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class UserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: + def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: d = src_dict.copy() from ..models.user import User diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index ca899dbd7..b7fdc4465 100644 --- a/kittycad/models/verification_token.py +++ b/kittycad/models/verification_token.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -WS = TypeVar("WS", bound="VerificationToken") +TZ = TypeVar("TZ", bound="VerificationToken") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class VerificationToken: return field_dict @classmethod - def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: + def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/web_socket_messages.py b/kittycad/models/web_socket_messages.py new file mode 100644 index 000000000..7c2b9bfcf --- /dev/null +++ b/kittycad/models/web_socket_messages.py @@ -0,0 +1,213 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.modeling_cmd import ModelingCmd +from ..models.modeling_cmd_id import ModelingCmdId +from ..models.rtc_ice_candidate_init import RtcIceCandidateInit +from ..models.rtc_session_description import RtcSessionDescription +from ..types import UNSET, Unset + +AX = TypeVar("AX", bound="trickle_ice") + + +@attr.s(auto_attribs=True) +class trickle_ice: + """The trickle ICE candidate request.""" # noqa: E501 + + candidate: Union[Unset, RtcIceCandidateInit] = UNSET + type: str = "trickle_ice" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.candidate, Unset): + candidate = self.candidate + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict["candidate"] = candidate + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: + d = src_dict.copy() + _candidate = d.pop("candidate", UNSET) + candidate: Union[Unset, RtcIceCandidateInit] + if isinstance(_candidate, Unset): + candidate = UNSET + else: + candidate = _candidate # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + trickle_ice = cls( + candidate=candidate, + type=type, + ) + + trickle_ice.additional_properties = d + return trickle_ice + + @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 + + +RQ = TypeVar("RQ", bound="sdp_offer") + + +@attr.s(auto_attribs=True) +class sdp_offer: + """The SDP offer request.""" # noqa: E501 + + offer: Union[Unset, RtcSessionDescription] = UNSET + type: str = "sdp_offer" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.offer, Unset): + offer = self.offer + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if offer is not UNSET: + field_dict["offer"] = offer + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: + d = src_dict.copy() + _offer = d.pop("offer", UNSET) + offer: Union[Unset, RtcSessionDescription] + if isinstance(_offer, Unset): + offer = UNSET + else: + offer = _offer # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + sdp_offer = cls( + offer=offer, + type=type, + ) + + sdp_offer.additional_properties = d + return sdp_offer + + @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 + + +ZL = TypeVar("ZL", bound="modeling_cmd_req") + + +@attr.s(auto_attribs=True) +class modeling_cmd_req: + """The modeling command request.""" # noqa: E501 + + cmd: Union[Unset, ModelingCmd] = UNSET + cmd_id: Union[Unset, ModelingCmdId] = UNSET + type: str = "modeling_cmd_req" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.cmd, Unset): + cmd = self.cmd + if not isinstance(self.cmd_id, Unset): + cmd_id = self.cmd_id + type = self.type + + 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 + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: + d = src_dict.copy() + _cmd = d.pop("cmd", UNSET) + cmd: Union[Unset, ModelingCmd] + if isinstance(_cmd, Unset): + cmd = UNSET + else: + cmd = _cmd # type: ignore[arg-type] + + _cmd_id = d.pop("cmd_id", UNSET) + cmd_id: Union[Unset, ModelingCmdId] + if isinstance(_cmd_id, Unset): + cmd_id = UNSET + else: + cmd_id = _cmd_id # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + modeling_cmd_req = cls( + cmd=cmd, + cmd_id=cmd_id, + type=type, + ) + + modeling_cmd_req.additional_properties = d + return modeling_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 + + +WebSocketMessages = Union[trickle_ice, sdp_offer, modeling_cmd_req] diff --git a/kittycad/models/web_socket_responses.py b/kittycad/models/web_socket_responses.py new file mode 100644 index 000000000..738a5e1e2 --- /dev/null +++ b/kittycad/models/web_socket_responses.py @@ -0,0 +1,343 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.modeling_cmd_id import ModelingCmdId +from ..models.rtc_ice_candidate import RtcIceCandidate +from ..models.rtc_session_description import RtcSessionDescription +from ..models.snake_case_result import SnakeCaseResult +from ..types import UNSET, Unset + +CM = TypeVar("CM", bound="trickle_ice") + + +@attr.s(auto_attribs=True) +class trickle_ice: + """The trickle ICE candidate response.""" # noqa: E501 + + candidate: Union[Unset, RtcIceCandidate] = UNSET + type: str = "trickle_ice" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.candidate, Unset): + candidate = self.candidate + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict["candidate"] = candidate + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: + d = src_dict.copy() + _candidate = d.pop("candidate", UNSET) + candidate: Union[Unset, RtcIceCandidate] + if isinstance(_candidate, Unset): + candidate = UNSET + else: + candidate = _candidate # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + trickle_ice = cls( + candidate=candidate, + type=type, + ) + + trickle_ice.additional_properties = d + return trickle_ice + + @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 + + +OS = TypeVar("OS", bound="sdp_answer") + + +@attr.s(auto_attribs=True) +class sdp_answer: + """The SDP answer response.""" # noqa: E501 + + answer: Union[Unset, RtcSessionDescription] = UNSET + type: str = "sdp_answer" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.answer, Unset): + answer = self.answer + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if answer is not UNSET: + field_dict["answer"] = answer + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: + d = src_dict.copy() + _answer = d.pop("answer", UNSET) + answer: Union[Unset, RtcSessionDescription] + if isinstance(_answer, Unset): + answer = UNSET + else: + answer = _answer # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + sdp_answer = cls( + answer=answer, + type=type, + ) + + sdp_answer.additional_properties = d + return sdp_answer + + @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 + + +WP = TypeVar("WP", bound="ice_server_info") + + +@attr.s(auto_attribs=True) +class ice_server_info: + """The ICE server info response.""" # noqa: E501 + + from ..models.ice_server import IceServer + + ice_servers: Union[Unset, List[IceServer]] = UNSET + type: str = "ice_server_info" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.ice_server import IceServer + + ice_servers: Union[Unset, List[IceServer]] = UNSET + if not isinstance(self.ice_servers, Unset): + ice_servers = self.ice_servers + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ice_servers is not UNSET: + field_dict["ice_servers"] = ice_servers + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: + d = src_dict.copy() + from ..models.ice_server import IceServer + + ice_servers = cast(List[IceServer], d.pop("ice_servers", UNSET)) + + type = d.pop("type", UNSET) + + ice_server_info = cls( + ice_servers=ice_servers, + type=type, + ) + + ice_server_info.additional_properties = d + return ice_server_info + + @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 + + +XO = TypeVar("XO", bound="modeling") + + +@attr.s(auto_attribs=True) +class modeling: + """The modeling command response.""" # noqa: E501 + + cmd_id: Union[Unset, ModelingCmdId] = UNSET + result: Union[Unset, SnakeCaseResult] = UNSET + type: str = "modeling" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.cmd_id, Unset): + cmd_id = self.cmd_id + if not isinstance(self.result, Unset): + result = self.result + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cmd_id is not UNSET: + field_dict["cmd_id"] = cmd_id + if result is not UNSET: + field_dict["result"] = result + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: + d = src_dict.copy() + _cmd_id = d.pop("cmd_id", UNSET) + cmd_id: Union[Unset, ModelingCmdId] + if isinstance(_cmd_id, Unset): + cmd_id = UNSET + else: + cmd_id = _cmd_id # type: ignore[arg-type] + + _result = d.pop("result", UNSET) + result: Union[Unset, SnakeCaseResult] + if isinstance(_result, Unset): + result = UNSET + else: + result = _result # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + modeling = cls( + cmd_id=cmd_id, + result=result, + type=type, + ) + + modeling.additional_properties = d + return modeling + + @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 + + +LN = TypeVar("LN", bound="export") + + +@attr.s(auto_attribs=True) +class export: + """The export command response, this is sent as binary.""" # noqa: E501 + + from ..models.raw_file import RawFile + + files: Union[Unset, List[RawFile]] = UNSET + type: str = "export" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.raw_file import RawFile + + files: Union[Unset, List[RawFile]] = UNSET + if not isinstance(self.files, Unset): + files = self.files + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if files is not UNSET: + field_dict["files"] = files + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: + d = src_dict.copy() + from ..models.raw_file import RawFile + + files = cast(List[RawFile], d.pop("files", UNSET)) + + type = d.pop("type", UNSET) + + export = cls( + files=files, + type=type, + ) + + export.additional_properties = d + return export + + @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 + + +WebSocketResponses = Union[trickle_ice, sdp_answer, ice_server_info, modeling, export] diff --git a/pyproject.toml b/pyproject.toml index 4b82a2865..d395ad7dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kittycad" -version = "0.4.6" +version = "0.4.7" description = "A client library for accessing KittyCAD" authors = [] diff --git a/spec.json b/spec.json index 65c0300c7..097b0f3c2 100644 --- a/spec.json +++ b/spec.json @@ -438,35 +438,35 @@ { "description": "The async API call is queued.", "enum": [ - "Queued" + "queued" ], "type": "string" }, { "description": "The async API call was uploaded to be converted.", "enum": [ - "Uploaded" + "uploaded" ], "type": "string" }, { "description": "The async API call is in progress.", "enum": [ - "In Progress" + "in_progress" ], "type": "string" }, { "description": "The async API call has completed.", "enum": [ - "Completed" + "completed" ], "type": "string" }, { "description": "The async API call has failed.", "enum": [ - "Failed" + "failed" ], "type": "string" } @@ -894,7 +894,7 @@ }, "type": { "enum": [ - "FileConversion" + "file_conversion" ], "type": "string" }, @@ -991,7 +991,7 @@ }, "type": { "enum": [ - "FileCenterOfMass" + "file_center_of_mass" ], "type": "string" }, @@ -1099,7 +1099,7 @@ }, "type": { "enum": [ - "FileMass" + "file_mass" ], "type": "string" }, @@ -1188,7 +1188,7 @@ }, "type": { "enum": [ - "FileVolume" + "file_volume" ], "type": "string" }, @@ -1302,7 +1302,7 @@ }, "type": { "enum": [ - "FileDensity" + "file_density" ], "type": "string" }, @@ -1397,7 +1397,7 @@ }, "type": { "enum": [ - "FileSurfaceArea" + "file_surface_area" ], "type": "string" }, @@ -1452,42 +1452,42 @@ { "description": "File conversion.", "enum": [ - "FileConversion" + "file_conversion" ], "type": "string" }, { "description": "File volume.", "enum": [ - "FileVolume" + "file_volume" ], "type": "string" }, { "description": "File center of mass.", "enum": [ - "FileCenterOfMass" + "file_center_of_mass" ], "type": "string" }, { "description": "File mass.", "enum": [ - "FileMass" + "file_mass" ], "type": "string" }, { "description": "File density.", "enum": [ - "FileDensity" + "file_density" ], "type": "string" }, { "description": "File surface area.", "enum": [ - "FileSurfaceArea" + "file_surface_area" ], "type": "string" } @@ -3897,16 +3897,16 @@ "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", "oneOf": [ { - "description": "sort in increasing order of \"created_at\"", + "description": "Sort in increasing order of \"created_at\".", "enum": [ - "created-at-ascending" + "created_at_ascending" ], "type": "string" }, { - "description": "sort in decreasing order of \"created_at\"", + "description": "Sort in decreasing order of \"created_at\".", "enum": [ - "created-at-descending" + "created_at_descending" ], "type": "string" } @@ -5588,21 +5588,59 @@ ] }, "Error": { - "description": "Error information from a response.", + "description": "An error.", "properties": { - "error_code": { - "type": "string" + "code": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorCode" + } + ], + "description": "The error code." }, "message": { - "type": "string" - }, - "request_id": { + "description": "The error message.", "type": "string" } }, "required": [ - "message", - "request_id" + "code", + "message" + ], + "type": "object" + }, + "ErrorCode": { + "description": "The type of errorcode.", + "oneOf": [ + { + "description": "User requested something impossible or invalid", + "enum": [ + "bad_request" + ], + "type": "string" + }, + { + "description": "Engine failed to complete request, consider retrying", + "enum": [ + "internal_engine" + ], + "type": "string" + } + ] + }, + "ErrorResponse": { + "description": "The error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "items": { + "$ref": "#/components/schemas/Error" + }, + "type": "array" + } + }, + "required": [ + "errors" ], "type": "object" }, @@ -6480,6 +6518,32 @@ }, "type": "object" }, + "IceServer": { + "description": "Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on ", + "properties": { + "credential": { + "description": "Credentials for a given TURN server.", + "nullable": true, + "type": "string" + }, + "urls": { + "description": "URLs for a given STUN/TURN server. IceServer urls can either be a string or an array of strings But, we choose to always convert to an array of strings for consistency", + "items": { + "type": "string" + }, + "type": "array" + }, + "username": { + "description": "Username for a given TURN server.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "urls" + ], + "type": "object" + }, "ImageType": { "description": "An enumeration.", "enum": [ @@ -8168,7 +8232,7 @@ "format": "uuid", "type": "string" }, - "face_uuid": { + "face_id": { "description": "Which face is used to figure out the opposite edge?", "format": "uuid", "type": "string" @@ -8187,7 +8251,7 @@ }, "required": [ "edge_id", - "face_uuid", + "face_id", "object_id", "type" ], @@ -8201,7 +8265,7 @@ "format": "uuid", "type": "string" }, - "face_uuid": { + "face_id": { "description": "Which face is used to figure out the opposite edge?", "format": "uuid", "type": "string" @@ -8220,7 +8284,7 @@ }, "required": [ "edge_id", - "face_uuid", + "face_id", "object_id", "type" ], @@ -8234,7 +8298,7 @@ "format": "uuid", "type": "string" }, - "face_uuid": { + "face_id": { "description": "Which face is used to figure out the opposite edge?", "format": "uuid", "type": "string" @@ -8253,7 +8317,7 @@ }, "required": [ "edge_id", - "face_uuid", + "face_id", "object_id", "type" ], @@ -9309,6 +9373,29 @@ ], "type": "object" }, + "RawFile": { + "description": "A raw file with unencoded contents to be passed over binary websockets.", + "properties": { + "contents": { + "description": "The contents of the file.", + "items": { + "format": "uint8", + "minimum": 0, + "type": "integer" + }, + "type": "array" + }, + "name": { + "description": "The name of the file.", + "type": "string" + } + }, + "required": [ + "contents", + "name" + ], + "type": "object" + }, "RegistryServiceConfig": { "description": "RegistryServiceConfig stores daemon registry services configuration.", "properties": { @@ -9349,6 +9436,243 @@ }, "type": "object" }, + "RtcIceCandidate": { + "description": "ICECandidate represents a ice candidate", + "properties": { + "address": { + "description": "The address of the candidate.", + "type": "string" + }, + "component": { + "description": "The component of the candidate.", + "format": "uint16", + "minimum": 0, + "type": "integer" + }, + "foundation": { + "description": "The foundation for the address.", + "type": "string" + }, + "port": { + "description": "The port used for the candidate.", + "format": "uint16", + "minimum": 0, + "type": "integer" + }, + "priority": { + "description": "The priority of the candidate.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcIceProtocol" + } + ], + "description": "The protocol used for the candidate." + }, + "related_address": { + "description": "The related address of the candidate.", + "type": "string" + }, + "related_port": { + "description": "The related port of the candidate.", + "format": "uint16", + "minimum": 0, + "type": "integer" + }, + "stats_id": { + "description": "The stats ID.", + "type": "string" + }, + "tcp_type": { + "description": "The TCP type of the candidate.", + "type": "string" + }, + "typ": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcIceCandidateType" + } + ], + "description": "The type of the candidate." + } + }, + "required": [ + "address", + "component", + "foundation", + "port", + "priority", + "protocol", + "related_address", + "related_port", + "stats_id", + "tcp_type", + "typ" + ], + "type": "object" + }, + "RtcIceCandidateInit": { + "description": "ICECandidateInit is used to serialize ice candidates", + "properties": { + "candidate": { + "description": "The candidate string associated with the object.", + "type": "string" + }, + "sdpMLineIndex": { + "description": "The index (starting at zero) of the m-line in the SDP this candidate is associated with.", + "format": "uint16", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "sdpMid": { + "description": "The identifier of the \"media stream identification\" as defined in [RFC 8841](https://tools.ietf.org/html/rfc8841).", + "nullable": true, + "type": "string" + }, + "usernameFragment": { + "description": "The username fragment (as defined in [RFC 8445](https://tools.ietf.org/html/rfc8445#section-5.2.1)) associated with the object.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "candidate" + ], + "type": "object" + }, + "RtcIceCandidateType": { + "description": "ICECandidateType represents the type of the ICE candidate used.", + "oneOf": [ + { + "description": "Unspecified indicates that the candidate type is unspecified.", + "enum": [ + "unspecified" + ], + "type": "string" + }, + { + "description": "ICECandidateTypeHost indicates that the candidate is of Host type as described in . A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs.", + "enum": [ + "host" + ], + "type": "string" + }, + { + "description": "ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described . A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server.", + "enum": [ + "srflx" + ], + "type": "string" + }, + { + "description": "ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to its peer.", + "enum": [ + "prflx" + ], + "type": "string" + }, + { + "description": "ICECandidateTypeRelay indicates the the candidate is of Relay type as described in . A candidate type obtained from a relay server, such as a TURN server.", + "enum": [ + "relay" + ], + "type": "string" + } + ] + }, + "RtcIceProtocol": { + "description": "ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.", + "oneOf": [ + { + "description": "Unspecified indicates that the protocol is unspecified.", + "enum": [ + "unspecified" + ], + "type": "string" + }, + { + "description": "UDP indicates the URL uses a UDP transport.", + "enum": [ + "udp" + ], + "type": "string" + }, + { + "description": "TCP indicates the URL uses a TCP transport.", + "enum": [ + "tcp" + ], + "type": "string" + } + ] + }, + "RtcSdpType": { + "description": "SDPType describes the type of an SessionDescription.", + "oneOf": [ + { + "description": "Unspecified indicates that the type is unspecified.", + "enum": [ + "unspecified" + ], + "type": "string" + }, + { + "description": "indicates that a description MUST be treated as an SDP offer.", + "enum": [ + "offer" + ], + "type": "string" + }, + { + "description": "indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer.", + "enum": [ + "pranswer" + ], + "type": "string" + }, + { + "description": "indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer.", + "enum": [ + "answer" + ], + "type": "string" + }, + { + "description": "indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation.", + "enum": [ + "rollback" + ], + "type": "string" + } + ] + }, + "RtcSessionDescription": { + "description": "SessionDescription is used to expose local and remote session descriptions.", + "properties": { + "sdp": { + "description": "SDP string.", + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcSdpType" + } + ], + "description": "SDP type." + } + }, + "required": [ + "sdp", + "type" + ], + "type": "object" + }, "Runtime": { "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", "properties": { @@ -9439,6 +9763,37 @@ ], "type": "object" }, + "SnakeCaseResult": { + "description": "Serde serializes Result into JSON as \"Ok\" and \"Err\", but we want \"ok\" and \"err\". So, create a new enum that serializes as lowercase.", + "oneOf": [ + { + "additionalProperties": false, + "description": "The result is Ok.", + "properties": { + "ok": { + "$ref": "#/components/schemas/OkModelingCmdResponse" + } + }, + "required": [ + "ok" + ], + "type": "object" + }, + { + "additionalProperties": false, + "description": "The result is Err.", + "properties": { + "err": { + "$ref": "#/components/schemas/ErrorResponse" + } + }, + "required": [ + "err" + ], + "type": "object" + } + ] + }, "Storage": { "description": "Describes the storage format of a glTF 2.0 scene.", "oneOf": [ @@ -11508,6 +11863,224 @@ "updated_at" ], "type": "object" + }, + "WebSocketMessages": { + "description": "The websocket messages the server receives.", + "oneOf": [ + { + "description": "The trickle ICE candidate request.", + "properties": { + "candidate": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcIceCandidateInit" + } + ], + "description": "Information about the ICE candidate." + }, + "type": { + "enum": [ + "trickle_ice" + ], + "type": "string" + } + }, + "required": [ + "candidate", + "type" + ], + "type": "object" + }, + { + "description": "The SDP offer request.", + "properties": { + "offer": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcSessionDescription" + } + ], + "description": "The session description." + }, + "type": { + "enum": [ + "sdp_offer" + ], + "type": "string" + } + }, + "required": [ + "offer", + "type" + ], + "type": "object" + }, + { + "description": "The modeling command request.", + "properties": { + "cmd": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmd" + } + ], + "description": "Which command to submit to the Kittycad engine." + }, + "cmd_id": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "ID of command being submitted." + }, + "type": { + "enum": [ + "modeling_cmd_req" + ], + "type": "string" + } + }, + "required": [ + "cmd", + "cmd_id", + "type" + ], + "type": "object" + } + ] + }, + "WebSocketResponses": { + "description": "The websocket messages this server sends.", + "oneOf": [ + { + "description": "The trickle ICE candidate response.", + "properties": { + "candidate": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcIceCandidate" + } + ], + "description": "Information about the ICE candidate." + }, + "type": { + "enum": [ + "trickle_ice" + ], + "type": "string" + } + }, + "required": [ + "candidate", + "type" + ], + "type": "object" + }, + { + "description": "The SDP answer response.", + "properties": { + "answer": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcSessionDescription" + } + ], + "description": "The session description." + }, + "type": { + "enum": [ + "sdp_answer" + ], + "type": "string" + } + }, + "required": [ + "answer", + "type" + ], + "type": "object" + }, + { + "description": "The ICE server info response.", + "properties": { + "ice_servers": { + "description": "Information about the ICE servers.", + "items": { + "$ref": "#/components/schemas/IceServer" + }, + "type": "array" + }, + "type": { + "enum": [ + "ice_server_info" + ], + "type": "string" + } + }, + "required": [ + "ice_servers", + "type" + ], + "type": "object" + }, + { + "description": "The modeling command response.", + "properties": { + "cmd_id": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "The ID of the command." + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/SnakeCaseResult" + } + ], + "description": "The result of the command." + }, + "type": { + "enum": [ + "modeling" + ], + "type": "string" + } + }, + "required": [ + "cmd_id", + "result", + "type" + ], + "type": "object" + }, + { + "description": "The export command response, this is sent as binary.", + "properties": { + "files": { + "description": "The exported files.", + "items": { + "$ref": "#/components/schemas/RawFile" + }, + "type": "array" + }, + "type": { + "enum": [ + "export" + ], + "type": "string" + } + }, + "required": [ + "files", + "type" + ], + "type": "object" + } + ] } } }, @@ -14001,6 +14574,77 @@ ] } }, + "/hidden/ws/modeling": { + "options": { + "operationId": "hidden_ws_modeling_types", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSocketMessages" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSocketResponses" + } + } + }, + "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": "Hidden endpoint for defining the modeling websocket types.", + "tags": [ + "hidden" + ] + } + }, "/logout": { "options": { "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", @@ -14241,7 +14885,7 @@ ] } }, - "/modeling/cmd_batch": { + "/modeling/cmd-batch": { "options": { "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", "operationId": "options_cmd_batch",