diff --git a/generate/generate.py b/generate/generate.py index 3a2ba9391..583107e86 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -1270,7 +1270,7 @@ def generateAnyOfType(path: str, name: str, schema: dict, data: dict): f.write("from ." + camel_to_snake(ref_name) + " import " + ref_name + "\n") all_options.append(ref_name) - if isNestedObjectOneOf(schema): + if isNestedObjectAnyOf(schema): # We want to write each of the nested objects. for any_of in schema["anyOf"]: # Get the nested object. @@ -1326,6 +1326,47 @@ def generateAnyOfType(path: str, name: str, schema: dict, data: dict): f.write(object_code) f.write("\n") all_options.append(object_name) + else: + # We want to write each of the nested objects. + for any_of in schema["anyOf"]: + # Get the nested object. + if "properties" in any_of: + for prop_name in any_of["properties"]: + nested_object = any_of["properties"][prop_name] + if nested_object == {}: + f.write("from typing import Any\n") + f.write(prop_name + " = Any\n") + f.write("\n") + all_options.append(prop_name) + elif "$ref" in nested_object: + ref = nested_object["$ref"] + ref_name = ref[ref.rfind("/") + 1 :] + f.write( + "from ." + + camel_to_snake(ref_name) + + " import " + + ref_name + + "\n" + ) + f.write("\n") + if prop_name != ref_name: + f.write(prop_name + " = " + ref_name + "\n") + f.write("\n") + all_options.append(prop_name) + else: + object_code = generateObjectTypeCode( + prop_name, nested_object, "object", data, None, None + ) + f.write(object_code) + f.write("\n") + all_options.append(prop_name) + elif "type" in any_of and any_of["type"] == "string": + enum_code = generateEnumTypeCode( + any_of["enum"][0], any_of, "string", [] + ) + f.write(enum_code) + f.write("\n") + all_options.append(any_of["enum"][0]) # Write the sum type. description = getAnyOfDescription(schema) @@ -1953,6 +1994,40 @@ def getOneOfRefType(schema: dict) -> str: raise Exception("Cannot get oneOf ref type for schema: ", schema) +def isNestedObjectAnyOf(schema: dict) -> bool: + if "anyOf" not in schema: + return False + + is_nested_object = False + for any_of in schema["anyOf"]: + # Check if each are an object w 1 property in it. + if ( + "type" in any_of + and any_of["type"] == "object" + and "properties" in any_of + and len(any_of["properties"]) == 1 + ): + for prop_name in any_of["properties"]: + nested_object = any_of["properties"][prop_name] + if "type" in nested_object and nested_object["type"] == "object": + is_nested_object = True + else: + is_nested_object = False + break + elif ( + "type" in any_of + and any_of["type"] == "string" + and "enum" in any_of + and len(any_of["enum"]) == 1 + ): + is_nested_object = True + else: + is_nested_object = False + break + + return is_nested_object + + def isNestedObjectOneOf(schema: dict) -> bool: if "oneOf" not in schema: return False @@ -1961,7 +2036,8 @@ def isNestedObjectOneOf(schema: dict) -> bool: for one_of in schema["oneOf"]: # Check if each are an object w 1 property in it. if ( - one_of["type"] == "object" + "type" in one_of + and one_of["type"] == "object" and "properties" in one_of and len(one_of["properties"]) == 1 ): @@ -1973,7 +2049,10 @@ def isNestedObjectOneOf(schema: dict) -> bool: is_nested_object = False break elif ( - one_of["type"] == "string" and "enum" in one_of and len(one_of["enum"]) == 1 + "type" in one_of + and one_of["type"] == "string" + and "enum" in one_of + and len(one_of["enum"]) == 1 ): is_nested_object = True else: diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index edff69712..3df55dce0 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -1,50 +1,42 @@ [ { "op": "add", - "path": "/paths/~1user~1privacy/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_get_user_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n get_user_privacy_settings.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_privacy_settings.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1privacy/put/x-python", + "path": "/info/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.privacy_settings import PrivacySettings\nfrom kittycad.types import Response\n\n\ndef example_update_user_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n update_user_privacy_settings.sync(\n client=client,\n body=PrivacySettings(\n can_train_on_data=False,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_privacy_settings.html" + "client": "# Create a client with your token.\nfrom kittycad.client 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.client 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/~1orgs~1{id}~1payment~1balance/get/x-python", + "path": "/paths/~1orgs~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_any_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_any_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_any_org.sync(\n client=client,\n id=Uuid(\"\"),\n )\n )\n\n if isinstance(result, Error) or result is 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_any_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_any_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_any_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = get_any_org.sync(\n client=client,\n id=Uuid(\"\"),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_any_org.html" } }, { "op": "add", - "path": "/paths/~1orgs~1{id}~1payment~1balance/put/x-python", + "path": "/paths/~1org~1members~1{user_id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_balance_for_any_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.update_payment_balance import UpdatePaymentBalance\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_payment_balance_for_any_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n update_payment_balance_for_any_org.sync(\n client=client,\n id=Uuid(\"\"),\n body=UpdatePaymentBalance(),\n )\n )\n\n if isinstance(result, Error) or result is 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.update_payment_balance_for_any_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMember\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMember, Error]] = get_org_member.sync(\n client=client,\n user_id=Uuid(\"\"),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMember = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org_member.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1org~1members~1{user_id}/put/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMember\nfrom kittycad.models.update_member_to_org_body import UpdateMemberToOrgBody\nfrom kittycad.models.user_org_role import UserOrgRole\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMember, Error]] = update_org_member.sync(\n client=client,\n user_id=Uuid(\"\"),\n body=UpdateMemberToOrgBody(\n role=UserOrgRole.ADMIN,\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMember = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org_member.html" } }, { "op": "add", - "path": "/paths/~1user~1org/get/x-python", + "path": "/paths/~1org~1members~1{user_id}/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_user_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserOrgInfo\nfrom kittycad.types import Response\n\n\ndef example_get_user_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserOrgInfo, Error]] = get_user_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserOrgInfo = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_user_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import delete_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_delete_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_org_member.sync(\n client=client,\n user_id=Uuid(\"\"),\n )\n\n if isinstance(result, Error) or result is 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.orgs.delete_org_member.html" } }, { @@ -57,218 +49,218 @@ }, { "op": "add", - "path": "/paths/~1user~1text-to-cad~1{id}/post/x-python", + "path": "/paths/~1ws~1executor~1term/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"\",\n feedback=AiFeedback.THUMBS_UP,\n )\n\n if isinstance(result, Error) or result is 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.ai.create_text_to_cad_model_feedback.html" + "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 with create_executor_term.sync(\n client=client,\n ) as websocket:\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/~1user~1text-to-cad~1{id}/get/x-python", + "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.ai import get_text_to_cad_model_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.types import Response\n\n\ndef example_get_text_to_cad_model_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = (\n get_text_to_cad_model_for_user.sync(\n client=client,\n id=\"\",\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_text_to_cad_model_for_user.html" + "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[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\n if isinstance(result, Error) or result is 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/~1ai-prompts~1{id}/get/x-python", + "path": "/paths/~1ping/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.html" + "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 is 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/~1user~1api-calls~1{id}/get/x-python", + "path": "/paths/~1user~1payment~1balance/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 is 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" + "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[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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/~1org~1members/post/x-python", + "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.orgs import create_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMember\nfrom kittycad.models.add_org_member import AddOrgMember\nfrom kittycad.models.user_org_role import UserOrgRole\nfrom kittycad.types import Response\n\n\ndef example_create_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMember, Error]] = create_org_member.sync(\n client=client,\n body=AddOrgMember(\n email=\"\",\n role=UserOrgRole.ADMIN,\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMember = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.create_org_member.html" + "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[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\n if isinstance(result, Error) or result is 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/~1org~1members/get/x-python", + "path": "/paths/~1org/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import list_org_members\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMemberResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.models.user_org_role import UserOrgRole\nfrom kittycad.types import Response\n\n\ndef example_list_org_members():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMemberResultsPage, Error]] = list_org_members.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n role=UserOrgRole.ADMIN,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMemberResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.list_org_members.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import delete_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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.orgs.delete_org.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1invoices/get/x-python", + "path": "/paths/~1org/put/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.models.org_details import OrgDetails\nfrom kittycad.types import Response\n\n\ndef example_update_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = update_org.sync(\n client=client,\n body=OrgDetails(\n billing_email=\"\",\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org.html" } }, { "op": "add", - "path": "/paths/~1org~1payment~1methods~1{id}/delete/x-python", + "path": "/paths/~1org/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_org.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.types import Response\n\n\ndef example_get_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = get_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org.html" } }, { "op": "add", - "path": "/paths/~1orgs~1{id}/get/x-python", + "path": "/paths/~1org/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_any_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_any_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = get_any_org.sync(\n client=client,\n id=Uuid(\"\"),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_any_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import create_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.models.org_details import OrgDetails\nfrom kittycad.types import Response\n\n\ndef example_create_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = create_org.sync(\n client=client,\n body=OrgDetails(\n billing_email=\"\",\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.create_org.html" } }, { "op": "add", - "path": "/paths/~1users~1{id}~1payment~1balance/get/x-python", + "path": "/paths/~1org~1payment~1subscriptions/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_any_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_any_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_any_user.sync(\n client=client,\n id=Uuid(\"\"),\n )\n )\n\n if isinstance(result, Error) or result is 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_any_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_org_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.types import Response\n\n\ndef example_get_org_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n get_org_subscription.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_org_subscription.html" } }, { "op": "add", - "path": "/paths/~1users~1{id}~1payment~1balance/put/x-python", + "path": "/paths/~1org~1payment~1subscriptions/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_balance_for_any_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.update_payment_balance import UpdatePaymentBalance\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_payment_balance_for_any_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n update_payment_balance_for_any_user.sync(\n client=client,\n id=Uuid(\"\"),\n body=UpdatePaymentBalance(),\n )\n )\n\n if isinstance(result, Error) or result is 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.update_payment_balance_for_any_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_org_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_organization_subscription_tier import (\n ModelingAppOrganizationSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_org_request import (\n ZooProductSubscriptionsOrgRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_create_org_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n create_org_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsOrgRequest(\n modeling_app=ModelingAppOrganizationSubscriptionTier.TEAM,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_org_subscription.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1org~1payment~1subscriptions/put/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_org_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_organization_subscription_tier import (\n ModelingAppOrganizationSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_org_request import (\n ZooProductSubscriptionsOrgRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_update_org_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n update_org_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsOrgRequest(\n modeling_app=ModelingAppOrganizationSubscriptionTier.TEAM,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_org_subscription.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1org~1members/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import list_org_members\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMemberResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.models.user_org_role import UserOrgRole\nfrom kittycad.types import Response\n\n\ndef example_list_org_members():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMemberResultsPage, Error]] = list_org_members.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n role=UserOrgRole.ADMIN,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMemberResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.list_org_members.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1org~1members/post/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import create_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMember\nfrom kittycad.models.add_org_member import AddOrgMember\nfrom kittycad.models.user_org_role import UserOrgRole\nfrom kittycad.types import Response\n\n\ndef example_create_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMember, Error]] = create_org_member.sync(\n client=client,\n body=AddOrgMember(\n email=\"\",\n role=UserOrgRole.ADMIN,\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMember = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.create_org_member.html" } }, { "op": "add", - "path": "/paths/~1apps~1github~1webhook/post/x-python", + "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.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 is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1org~1api-calls~1{id}/get/x-python", + "path": "/paths/~1user~1payment~1tax/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_org.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "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 is 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/~1user~1api-calls/get/x-python", + "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.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[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\n if isinstance(result, Error) or result is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1org~1members~1{user_id}/get/x-python", + "path": "/paths/~1internal~1discord~1api-token~1{discord_id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMember\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMember, Error]] = get_org_member.sync(\n client=client,\n user_id=Uuid(\"\"),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMember = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org_member.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import internal_get_api_token_for_discord_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_internal_get_api_token_for_discord_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = (\n internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"\",\n )\n )\n\n if isinstance(result, Error) or result is 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.meta.internal_get_api_token_for_discord_user.html" } }, { "op": "add", - "path": "/paths/~1org~1members~1{user_id}/put/x-python", + "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgMember\nfrom kittycad.models.update_member_to_org_body import UpdateMemberToOrgBody\nfrom kittycad.models.user_org_role import UserOrgRole\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgMember, Error]] = update_org_member.sync(\n client=client,\n user_id=Uuid(\"\"),\n body=UpdateMemberToOrgBody(\n role=UserOrgRole.ADMIN,\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgMember = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org_member.html" + "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 TextToCad,\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 TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is 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 TextToCad,\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/~1org~1members~1{user_id}/delete/x-python", + "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.orgs import delete_org_member\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_delete_org_member():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_org_member.sync(\n client=client,\n user_id=Uuid(\"\"),\n )\n\n if isinstance(result, Error) or result is 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.orgs.delete_org_member.html" + "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[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\n if isinstance(result, Error) or result is 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/~1api-calls~1{id}/get/x-python", + "path": "/paths/~1users/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 is 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" + "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 is 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/~1api-call-metrics/get/x-python", + "path": "/paths/~1auth~1email/post/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[Union[List[ApiCallQueryGroup], Error]] = (\n get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n )\n\n if isinstance(result, Error) or result is 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" + "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, VerificationTokenResponse\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[VerificationTokenResponse, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationTokenResponse = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1intent/post/x-python", + "path": "/paths/~1api-calls/get/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[Union[PaymentIntent, Error]] = (\n create_payment_intent_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1file~1surface-area/post/x-python", + "path": "/paths/~1logout/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[Union[FileSurfaceArea, Error]] = (\n create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n )\n\n if isinstance(result, Error) or result is 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" + "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 is 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/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1extended/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[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\n if isinstance(result, Error) or result is 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" + "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 is 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~1payment~1subscriptions/post/x-python", + "path": "/paths/~1file~1center-of-mass/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_user_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_individual_subscription_tier import (\n ModelingAppIndividualSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_user_request import (\n ZooProductSubscriptionsUserRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_create_user_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n create_user_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsUserRequest(\n modeling_app=ModelingAppIndividualSubscriptionTier.FREE,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_user_subscription.html" + "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[Union[FileCenterOfMass, Error]] = (\n create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n )\n\n if isinstance(result, Error) or result is 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~1payment~1subscriptions/put/x-python", + "path": "/paths/~1pricing~1subscriptions/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_user_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_individual_subscription_tier import (\n ModelingAppIndividualSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_user_request import (\n ZooProductSubscriptionsUserRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_update_user_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n update_user_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsUserRequest(\n modeling_app=ModelingAppIndividualSubscriptionTier.FREE,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_user_subscription.html" + "example": "from kittycad.api.meta import get_pricing_subscriptions\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_pricing_subscriptions():\n # Create our client.\n client = ClientFromEnv()\n\n get_pricing_subscriptions.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_pricing_subscriptions.html" } }, { @@ -281,738 +273,746 @@ }, { "op": "add", - "path": "/paths/~1users-extended~1{id}/get/x-python", + "path": "/paths/~1user~1payment~1subscriptions/post/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_user_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_individual_subscription_tier import (\n ModelingAppIndividualSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_user_request import (\n ZooProductSubscriptionsUserRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_create_user_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n create_user_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsUserRequest(\n modeling_app=ModelingAppIndividualSubscriptionTier.FREE,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_user_subscription.html" } }, { "op": "add", - "path": "/paths/~1debug~1uploads/post/x-python", + "path": "/paths/~1user~1payment~1subscriptions/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import create_debug_uploads\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_create_debug_uploads():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[str], Error]] = create_debug_uploads.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[str] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.create_debug_uploads.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_user_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_individual_subscription_tier import (\n ModelingAppIndividualSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_user_request import (\n ZooProductSubscriptionsUserRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_update_user_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n update_user_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsUserRequest(\n modeling_app=ModelingAppIndividualSubscriptionTier.FREE,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_user_subscription.html" } }, { "op": "add", - "path": "/paths/~1file~1execute~1{lang}/post/x-python", + "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.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 is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1user~1api-tokens/post/x-python", + "path": "/paths/~1org~1api-calls/get/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 label=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import org_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_org_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPriceResultsPage, Error]] = (\n org_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\n if isinstance(result, Error) or result is 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.org_list_api_calls.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens/get/x-python", + "path": "/paths/~1user~1api-calls/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[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\n if isinstance(result, Error) or result is 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" + "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[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\n if isinstance(result, Error) or result is 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~1volume/post/x-python", + "path": "/paths/~1org~1saml~1idp/delete/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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import delete_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_org_saml_idp.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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.orgs.delete_org_saml_idp.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", + "path": "/paths/~1org~1saml~1idp/put/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, SamlIdentityProvider\nfrom kittycad.models.idp_metadata_source import base64_encoded_xml\nfrom kittycad.models.saml_identity_provider_create import (\n SamlIdentityProviderCreate,\n)\nfrom kittycad.types import Response\n\n\ndef example_update_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[SamlIdentityProvider, Error]] = (\n update_org_saml_idp.sync(\n client=client,\n body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=base64_encoded_xml(\n data=\"\",\n ),\n technical_contact_email=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: SamlIdentityProvider = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org_saml_idp.html" } }, { "op": "add", - "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", + "path": "/paths/~1org~1saml~1idp/get/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, SamlIdentityProvider\nfrom kittycad.types import Response\n\n\ndef example_get_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[SamlIdentityProvider, Error]] = get_org_saml_idp.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: SamlIdentityProvider = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org_saml_idp.html" } }, { "op": "add", - "path": "/paths/~1org~1api-calls/get/x-python", + "path": "/paths/~1org~1saml~1idp/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import org_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_org_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPriceResultsPage, Error]] = (\n org_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\n if isinstance(result, Error) or result is 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.org_list_api_calls.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import create_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, SamlIdentityProvider\nfrom kittycad.models.idp_metadata_source import base64_encoded_xml\nfrom kittycad.models.saml_identity_provider_create import (\n SamlIdentityProviderCreate,\n)\nfrom kittycad.types import Response\n\n\ndef example_create_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[SamlIdentityProvider, Error]] = (\n create_org_saml_idp.sync(\n client=client,\n body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=base64_encoded_xml(\n data=\"\",\n ),\n technical_contact_email=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: SamlIdentityProvider = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.create_org_saml_idp.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1tax/get/x-python", + "path": "/paths/~1org~1payment/delete/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1apps~1github~1callback/get/x-python", + "path": "/paths/~1org~1payment/put/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_org\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_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Customer, Error]] = (\n update_payment_information_for_org.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1async~1operations~1{id}/get/x-python", + "path": "/paths/~1org~1payment/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 TextToCad,\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 TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is 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 TextToCad,\n ] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Customer, Error]] = (\n get_payment_information_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1user~1payment~1balance/get/x-python", + "path": "/paths/~1org~1payment/post/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[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_org\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_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Customer, Error]] = (\n create_payment_information_for_org.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1org/post/x-python", + "path": "/paths/~1org~1service-accounts~1{token}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import create_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.models.org_details import OrgDetails\nfrom kittycad.types import Response\n\n\ndef example_create_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = create_org.sync(\n client=client,\n body=OrgDetails(\n billing_email=\"\",\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.create_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import get_service_account_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ServiceAccount\nfrom kittycad.types import Response\n\n\ndef example_get_service_account_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ServiceAccount, Error]] = (\n get_service_account_for_org.sync(\n client=client,\n token=\"\",\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ServiceAccount = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.service_accounts.get_service_account_for_org.html" } }, { "op": "add", - "path": "/paths/~1org/get/x-python", + "path": "/paths/~1org~1service-accounts~1{token}/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.types import Response\n\n\ndef example_get_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = get_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import delete_service_account_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_service_account_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_service_account_for_org.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result is 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.service_accounts.delete_service_account_for_org.html" } }, { "op": "add", - "path": "/paths/~1org/put/x-python", + "path": "/paths/~1/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Org\nfrom kittycad.models.org_details import OrgDetails\nfrom kittycad.types import Response\n\n\ndef example_update_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Org, Error]] = update_org.sync(\n client=client,\n body=OrgDetails(\n billing_email=\"\",\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Org = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org.html" + "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/~1org/delete/x-python", + "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.orgs import delete_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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.orgs.delete_org.html" + "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[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\n if isinstance(result, Error) or result is 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~1onboarding/get/x-python", + "path": "/paths/~1user~1api-calls~1{id}/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 is 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" + "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 is 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/~1store~1coupon/post/x-python", + "path": "/paths/~1users~1{id}~1payment~1balance/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.store import create_store_coupon\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import DiscountCode, Error\nfrom kittycad.models.store_coupon_params import StoreCouponParams\nfrom kittycad.types import Response\n\n\ndef example_create_store_coupon():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[DiscountCode, Error]] = create_store_coupon.sync(\n client=client,\n body=StoreCouponParams(\n percent_off=10,\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: DiscountCode = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.store.create_store_coupon.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_any_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_any_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_any_user.sync(\n client=client,\n id=Uuid(\"\"),\n )\n )\n\n if isinstance(result, Error) or result is 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_any_user.html" } }, { "op": "add", - "path": "/paths/~1/get/x-python", + "path": "/paths/~1users~1{id}~1payment~1balance/put/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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_balance_for_any_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.update_payment_balance import UpdatePaymentBalance\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_payment_balance_for_any_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n update_payment_balance_for_any_user.sync(\n client=client,\n id=Uuid(\"\"),\n body=UpdatePaymentBalance(),\n )\n )\n\n if isinstance(result, Error) or result is 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.update_payment_balance_for_any_user.html" } }, { "op": "add", - "path": "/paths/~1org~1payment~1invoices/get/x-python", + "path": "/paths/~1api-calls~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "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 is 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/~1org~1payment~1tax/get/x-python", + "path": "/paths/~1org~1payment~1intent/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PaymentIntent, Error]] = (\n create_payment_intent_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1user~1session~1{token}/get/x-python", + "path": "/paths/~1org~1privacy/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_get_org_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n get_org_privacy_settings.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org_privacy_settings.html" } }, { "op": "add", - "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", + "path": "/paths/~1org~1privacy/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\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():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.privacy_settings import PrivacySettings\nfrom kittycad.types import Response\n\n\ndef example_update_org_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n update_org_privacy_settings.sync(\n client=client,\n body=PrivacySettings(\n can_train_on_data=False,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org_privacy_settings.html" } }, { "op": "add", - "path": "/paths/~1user~1extended/get/x-python", + "path": "/paths/~1user~1text-to-cad~1{id}/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_text_to_cad_model_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.types import Response\n\n\ndef example_get_text_to_cad_model_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = (\n get_text_to_cad_model_for_user.sync(\n client=client,\n id=\"\",\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_text_to_cad_model_for_user.html" } }, { "op": "add", - "path": "/paths/~1users/get/x-python", + "path": "/paths/~1user~1text-to-cad~1{id}/post/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"\",\n feedback=AiFeedback.THUMBS_UP,\n )\n\n if isinstance(result, Error) or result is 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.ai.create_text_to_cad_model_feedback.html" } }, { "op": "add", - "path": "/paths/~1user/get/x-python", + "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.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 is 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" + "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[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\n if isinstance(result, Error) or result is 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/put/x-python", + "path": "/paths/~1org~1payment~1invoices/get/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 image=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1user/delete/x-python", + "path": "/paths/~1_meta~1ipinfo/get/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ipinfo\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, IpAddrInfo\nfrom kittycad.types import Response\n\n\ndef example_get_ipinfo():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[IpAddrInfo, Error]] = get_ipinfo.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: IpAddrInfo = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ipinfo.html" } }, { "op": "add", - "path": "/paths/~1file~1center-of-mass/post/x-python", + "path": "/paths/~1user~1session~1{token}/get/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[Union[FileCenterOfMass, Error]] = (\n create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n )\n\n if isinstance(result, Error) or result is 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" + "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 is 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/~1logout/post/x-python", + "path": "/paths/~1org~1api-calls~1{id}/get/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_org.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1orgs~1{id}~1enterprise~1pricing/put/x-python", + "path": "/paths/~1user~1privacy/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_enterprise_pricing_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.plan_interval import PlanInterval\nfrom kittycad.models.subscription_tier_price import per_user\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_enterprise_pricing_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n update_enterprise_pricing_for_org.sync(\n client=client,\n id=Uuid(\"\"),\n body=per_user(\n interval=PlanInterval.DAY,\n price=3.14,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_enterprise_pricing_for_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_get_user_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n get_user_privacy_settings.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_privacy_settings.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/post/x-python", + "path": "/paths/~1user~1privacy/put/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[Union[Customer, Error]] = (\n create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.privacy_settings import PrivacySettings\nfrom kittycad.types import Response\n\n\ndef example_update_user_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n update_user_privacy_settings.sync(\n client=client,\n body=PrivacySettings(\n can_train_on_data=False,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_privacy_settings.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/get/x-python", + "path": "/paths/~1orgs~1{id}~1enterprise~1pricing/put/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[Union[Customer, Error]] = (\n get_payment_information_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_enterprise_pricing_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.plan_interval import PlanInterval\nfrom kittycad.models.subscription_tier_price import per_user\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_enterprise_pricing_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n update_enterprise_pricing_for_org.sync(\n client=client,\n id=Uuid(\"\"),\n body=per_user(\n interval=PlanInterval.DAY,\n price=3.14,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_enterprise_pricing_for_org.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/put/x-python", + "path": "/paths/~1org~1payment~1methods~1{id}/delete/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[Union[Customer, Error]] = (\n update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_org.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/delete/x-python", + "path": "/paths/~1auth~1email~1callback/get/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 is 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" + "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 is 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/~1apps~1github~1consent/get/x-python", + "path": "/paths/~1users-extended~1{id}/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 is 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" + "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 is 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/~1internal~1discord~1api-token~1{discord_id}/get/x-python", + "path": "/paths/~1auth~1saml~1provider~1{provider_id}~1login/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import internal_get_api_token_for_discord_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_internal_get_api_token_for_discord_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = (\n internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"\",\n )\n )\n\n if isinstance(result, Error) or result is 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.meta.internal_get_api_token_for_discord_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import get_auth_saml\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_auth_saml():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = get_auth_saml.sync(\n client=client,\n provider_id=Uuid(\"\"),\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result is 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.get_auth_saml.html" } }, { "op": "add", - "path": "/paths/~1ai-prompts/get/x-python", + "path": "/paths/~1auth~1saml~1provider~1{provider_id}~1login/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.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 is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPromptResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import post_auth_saml\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_post_auth_saml():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = post_auth_saml.sync(\n client=client,\n provider_id=Uuid(\"\"),\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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.post_auth_saml.html" } }, { "op": "add", - "path": "/paths/~1org~1payment~1balance/get/x-python", + "path": "/paths/~1apps~1github~1consent/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "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 is 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/~1file~1density/post/x-python", + "path": "/paths/~1ai~1text-to-cad~1{output_format}/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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1ws~1modeling~1commands/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketRequest, WebSocketResponse\nfrom kittycad.models.post_effect_type import PostEffectType\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\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 with modeling_commands_ws.WebSocket(\n client=client,\n fps=10,\n post_effect=PostEffectType.PHOSPHOR,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n pool=None, # Optional[str]\n ) as websocket:\n\n # Send a message.\n websocket.send(\n WebSocketRequest(\n sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n )\n )\n )\n\n # Get a message.\n message = websocket.recv()\n print(message)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" } }, { "op": "add", - "path": "/paths/~1users-extended/get/x-python", + "path": "/paths/~1store~1coupon/post/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.store import create_store_coupon\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import DiscountCode, Error\nfrom kittycad.models.store_coupon_params import StoreCouponParams\nfrom kittycad.types import Response\n\n\ndef example_create_store_coupon():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[DiscountCode, Error]] = create_store_coupon.sync(\n client=client,\n body=StoreCouponParams(\n percent_off=10,\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: DiscountCode = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.store.create_store_coupon.html" } }, { "op": "add", - "path": "/paths/~1auth~1saml~1provider~1{provider_id}~1login/post/x-python", + "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.hidden import post_auth_saml\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_post_auth_saml():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = post_auth_saml.sync(\n client=client,\n provider_id=Uuid(\"\"),\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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.post_auth_saml.html" + "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[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\n if isinstance(result, Error) or result is 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/~1auth~1saml~1provider~1{provider_id}~1login/get/x-python", + "path": "/paths/~1user~1payment/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import get_auth_saml\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_auth_saml():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = get_auth_saml.sync(\n client=client,\n provider_id=Uuid(\"\"),\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result is 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.get_auth_saml.html" + "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 is 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/~1orgs/get/x-python", + "path": "/paths/~1user~1payment/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import list_orgs\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_orgs():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgResultsPage, Error]] = list_orgs.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 is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.list_orgs.html" + "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[Union[Customer, Error]] = (\n update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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/~1api-calls/get/x-python", + "path": "/paths/~1user~1payment/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[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\n if isinstance(result, Error) or result is 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" + "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[Union[Customer, Error]] = (\n get_payment_information_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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/~1_meta~1ipinfo/get/x-python", + "path": "/paths/~1user~1payment/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ipinfo\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, IpAddrInfo\nfrom kittycad.types import Response\n\n\ndef example_get_ipinfo():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[IpAddrInfo, Error]] = get_ipinfo.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: IpAddrInfo = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ipinfo.html" + "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[Union[Customer, Error]] = (\n create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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/~1events/post/x-python", + "path": "/paths/~1orgs~1{id}~1payment~1balance/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import create_event\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.event import modeling_app_event\nfrom kittycad.models.modeling_app_event_type import ModelingAppEventType\nfrom kittycad.types import Response\n\n\ndef example_create_event():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_event.sync(\n client=client,\n body=modeling_app_event(\n created_at=\"\",\n event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE,\n project_name=\"\",\n source_id=\"\",\n user_id=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is 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.meta.create_event.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_any_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_any_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_any_org.sync(\n client=client,\n id=Uuid(\"\"),\n )\n )\n\n if isinstance(result, Error) or result is 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_any_org.html" } }, { "op": "add", - "path": "/paths/~1org~1payment~1methods/get/x-python", + "path": "/paths/~1orgs~1{id}~1payment~1balance/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[PaymentMethod], Error]] = (\n list_payment_methods_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_balance_for_any_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.models.update_payment_balance import UpdatePaymentBalance\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.types import Response\n\n\ndef example_update_payment_balance_for_any_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n update_payment_balance_for_any_org.sync(\n client=client,\n id=Uuid(\"\"),\n body=UpdatePaymentBalance(),\n )\n )\n\n if isinstance(result, Error) or result is 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.update_payment_balance_for_any_org.html" } }, { "op": "add", - "path": "/paths/~1org~1payment~1subscriptions/post/x-python", + "path": "/paths/~1user~1api-tokens/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_org_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_organization_subscription_tier import (\n ModelingAppOrganizationSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_org_request import (\n ZooProductSubscriptionsOrgRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_create_org_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n create_org_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsOrgRequest(\n modeling_app=ModelingAppOrganizationSubscriptionTier.TEAM,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_org_subscription.html" + "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[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\n if isinstance(result, Error) or result is 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/~1org~1payment~1subscriptions/put/x-python", + "path": "/paths/~1user~1api-tokens/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_org_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.models.modeling_app_organization_subscription_tier import (\n ModelingAppOrganizationSubscriptionTier,\n)\nfrom kittycad.models.zoo_product_subscriptions_org_request import (\n ZooProductSubscriptionsOrgRequest,\n)\nfrom kittycad.types import Response\n\n\ndef example_update_org_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n update_org_subscription.sync(\n client=client,\n body=ZooProductSubscriptionsOrgRequest(\n modeling_app=ModelingAppOrganizationSubscriptionTier.TEAM,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_org_subscription.html" + "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 label=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result is 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/~1org~1payment~1subscriptions/get/x-python", + "path": "/paths/~1org~1payment~1methods/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_org_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.types import Response\n\n\ndef example_get_org_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n get_org_subscription.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ZooProductSubscriptions = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_org_subscription.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[PaymentMethod], Error]] = (\n list_payment_methods_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1async~1operations/get/x-python", + "path": "/paths/~1file~1volume/post/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[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\n if isinstance(result, Error) or result is 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" + "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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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~1current~1{input_unit}~1{output_unit}/get/x-python", + "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_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[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\n if isinstance(result, Error) or result is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1_meta~1info/get/x-python", + "path": "/paths/~1user/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 is 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" + "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 is 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/~1auth~1email/post/x-python", + "path": "/paths/~1user/put/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, VerificationTokenResponse\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[VerificationTokenResponse, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationTokenResponse = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html" + "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 image=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is 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/~1org~1service-accounts~1{token}/get/x-python", + "path": "/paths/~1user/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import get_service_account_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ServiceAccount\nfrom kittycad.types import Response\n\n\ndef example_get_service_account_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ServiceAccount, Error]] = (\n get_service_account_for_org.sync(\n client=client,\n token=\"\",\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ServiceAccount = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.service_accounts.get_service_account_for_org.html" + "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 is 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/~1org~1service-accounts~1{token}/delete/x-python", + "path": "/paths/~1api-call-metrics/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import delete_service_account_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_service_account_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_service_account_for_org.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result is 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.service_accounts.delete_service_account_for_org.html" + "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[Union[List[ApiCallQueryGroup], Error]] = (\n get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n )\n\n if isinstance(result, Error) or result is 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~1text-to-cad/get/x-python", + "path": "/paths/~1user~1onboarding/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCadResultsPage, Error]] = (\n list_text_to_cad_models_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 no_models=None, # Optional[bool]\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html" + "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 is 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~1torque~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1org~1payment~1balance/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CustomerBalance, Error]] = (\n get_payment_balance_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1ai~1kcl~1completions/post/x-python", + "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.ai import create_kcl_code_completions\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, KclCodeCompletionResponse\nfrom kittycad.models.kcl_code_completion_params import KclCodeCompletionParams\nfrom kittycad.models.kcl_code_completion_request import KclCodeCompletionRequest\nfrom kittycad.types import Response\n\n\ndef example_create_kcl_code_completions():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[KclCodeCompletionResponse, Error]] = (\n create_kcl_code_completions.sync(\n client=client,\n body=KclCodeCompletionRequest(\n extra=KclCodeCompletionParams(\n language=\"\",\n trim_by_indentation=False,\n ),\n prompt=\"\",\n stop=[\"\"],\n stream=False,\n suffix=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: KclCodeCompletionResponse = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_kcl_code_completions.html" + "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[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\n if isinstance(result, Error) or result is 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/~1pricing~1subscriptions/get/x-python", + "path": "/paths/~1ai-prompts/get/x-python", "value": { - "example": "from kittycad.api.meta import get_pricing_subscriptions\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_pricing_subscriptions():\n # Create our client.\n client = ClientFromEnv()\n\n get_pricing_subscriptions.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_pricing_subscriptions.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.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 is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPromptResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.html" } }, { "op": "add", - "path": "/paths/~1file~1mass/post/x-python", + "path": "/paths/~1user~1oauth2~1providers/get/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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_oauth2_providers_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AccountProvider, Error\nfrom kittycad.types import Response\n\n\ndef example_get_oauth2_providers_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[AccountProvider], Error]] = (\n get_oauth2_providers_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[AccountProvider] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_oauth2_providers_for_user.html" } }, { "op": "add", - "path": "/paths/~1users~1{id}/get/x-python", + "path": "/paths/~1users-extended/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 is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1ws~1executor~1term/get/x-python", + "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/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 with create_executor_term.sync(\n client=client,\n ) as websocket:\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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\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():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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.html" } }, { "op": "add", - "path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python", + "path": "/paths/~1debug~1uploads/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import create_debug_uploads\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_create_debug_uploads():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[str], Error]] = create_debug_uploads.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[str] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.create_debug_uploads.html" } }, { "op": "add", - "path": "/paths/~1ping/get/x-python", + "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.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 is 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" + "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[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\n if isinstance(result, Error) or result is 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/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1file~1surface-area/post/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[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\n if isinstance(result, Error) or result is 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" + "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[Union[FileSurfaceArea, Error]] = (\n create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n )\n\n if isinstance(result, Error) or result is 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~1temperature~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1ai-prompts~1{id}/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[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\n if isinstance(result, Error) or result is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.html" } }, { "op": "add", - "path": "/paths/~1auth~1email~1callback/get/x-python", + "path": "/paths/~1org~1payment~1tax/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 is 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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_org.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1users~1{id}/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[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\n if isinstance(result, Error) or result is 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" + "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 is 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/~1user~1oauth2~1providers/get/x-python", + "path": "/paths/~1file~1mass/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_oauth2_providers_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AccountProvider, Error\nfrom kittycad.types import Response\n\n\ndef example_get_oauth2_providers_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[AccountProvider], Error]] = (\n get_oauth2_providers_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[AccountProvider] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_oauth2_providers_for_user.html" + "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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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~1payment~1methods/get/x-python", + "path": "/paths/~1_meta~1info/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[Union[List[PaymentMethod], Error]] = (\n list_payment_methods_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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" + "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 is 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/~1org~1privacy/get/x-python", + "path": "/paths/~1org~1service-accounts/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_get_org_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n get_org_privacy_settings.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org_privacy_settings.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import list_service_accounts_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ServiceAccountResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_service_accounts_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ServiceAccountResultsPage, Error]] = (\n list_service_accounts_for_org.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\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ServiceAccountResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.service_accounts.list_service_accounts_for_org.html" } }, { "op": "add", - "path": "/paths/~1org~1privacy/put/x-python", + "path": "/paths/~1org~1service-accounts/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org_privacy_settings\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.privacy_settings import PrivacySettings\nfrom kittycad.types import Response\n\n\ndef example_update_org_privacy_settings():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PrivacySettings, Error]] = (\n update_org_privacy_settings.sync(\n client=client,\n body=PrivacySettings(\n can_train_on_data=False,\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PrivacySettings = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org_privacy_settings.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import create_service_account_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ServiceAccount\nfrom kittycad.types import Response\n\n\ndef example_create_service_account_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ServiceAccount, Error]] = (\n create_service_account_for_org.sync(\n client=client,\n label=None, # Optional[str]\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ServiceAccount = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.service_accounts.create_service_account_for_org.html" } }, { "op": "add", - "path": "/paths/~1org~1saml~1idp/post/x-python", + "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.orgs import create_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, SamlIdentityProvider\nfrom kittycad.models.idp_metadata_source import base64_encoded_xml\nfrom kittycad.models.saml_identity_provider_create import (\n SamlIdentityProviderCreate,\n)\nfrom kittycad.types import Response\n\n\ndef example_create_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[SamlIdentityProvider, Error]] = (\n create_org_saml_idp.sync(\n client=client,\n body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=base64_encoded_xml(\n data=\"\",\n ),\n technical_contact_email=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: SamlIdentityProvider = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.create_org_saml_idp.html" + "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[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\n if isinstance(result, Error) or result is 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/~1org~1saml~1idp/get/x-python", + "path": "/paths/~1user~1payment~1intent/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, SamlIdentityProvider\nfrom kittycad.types import Response\n\n\ndef example_get_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[SamlIdentityProvider, Error]] = get_org_saml_idp.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: SamlIdentityProvider = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_org_saml_idp.html" + "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[Union[PaymentIntent, Error]] = (\n create_payment_intent_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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/~1org~1saml~1idp/put/x-python", + "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import update_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, SamlIdentityProvider\nfrom kittycad.models.idp_metadata_source import base64_encoded_xml\nfrom kittycad.models.saml_identity_provider_create import (\n SamlIdentityProviderCreate,\n)\nfrom kittycad.types import Response\n\n\ndef example_update_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[SamlIdentityProvider, Error]] = (\n update_org_saml_idp.sync(\n client=client,\n body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=base64_encoded_xml(\n data=\"\",\n ),\n technical_contact_email=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: SamlIdentityProvider = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.update_org_saml_idp.html" + "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 is 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/~1org~1saml~1idp/delete/x-python", + "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import delete_org_saml_idp\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_org_saml_idp():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_org_saml_idp.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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.orgs.delete_org_saml_idp.html" + "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[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\n if isinstance(result, Error) or result is 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~1power~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1file~1execute~1{lang}/post/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[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\n if isinstance(result, Error) or result is 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" + "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 is 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~1pressure~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1payment~1methods/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[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\n if isinstance(result, Error) or result is 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" + "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[Union[List[PaymentMethod], Error]] = (\n list_payment_methods_for_user.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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/~1org~1payment~1intent/post/x-python", + "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PaymentIntent, Error]] = (\n create_payment_intent_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "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 is 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/~1users~1{id}~1api-calls/get/x-python", + "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_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[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\n if isinstance(result, Error) or result is 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" + "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 is 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/~1org~1payment/post/x-python", + "path": "/paths/~1ai~1kcl~1completions/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_org\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_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Customer, Error]] = (\n create_payment_information_for_org.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_kcl_code_completions\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, KclCodeCompletionResponse\nfrom kittycad.models.kcl_code_completion_params import KclCodeCompletionParams\nfrom kittycad.models.kcl_code_completion_request import KclCodeCompletionRequest\nfrom kittycad.types import Response\n\n\ndef example_create_kcl_code_completions():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[KclCodeCompletionResponse, Error]] = (\n create_kcl_code_completions.sync(\n client=client,\n body=KclCodeCompletionRequest(\n extra=KclCodeCompletionParams(\n language=\"\",\n trim_by_indentation=False,\n ),\n prompt=\"\",\n stop=[\"\"],\n stream=False,\n suffix=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: KclCodeCompletionResponse = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_kcl_code_completions.html" } }, { "op": "add", - "path": "/paths/~1org~1payment/get/x-python", + "path": "/paths/~1apps~1github~1callback/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Customer, Error]] = (\n get_payment_information_for_org.sync(\n client=client,\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "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 is 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/~1org~1payment/put/x-python", + "path": "/paths/~1file~1density/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_org\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_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Customer, Error]] = (\n update_payment_information_for_org.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "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.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result is 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/~1org~1payment/delete/x-python", + "path": "/paths/~1user~1text-to-cad/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is 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_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCadResultsPage, Error]] = (\n list_text_to_cad_models_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 no_models=None, # Optional[bool]\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html" } }, { "op": "add", - "path": "/paths/~1org~1service-accounts/post/x-python", + "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import create_service_account_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ServiceAccount\nfrom kittycad.types import Response\n\n\ndef example_create_service_account_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ServiceAccount, Error]] = (\n create_service_account_for_org.sync(\n client=client,\n label=None, # Optional[str]\n )\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ServiceAccount = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.service_accounts.create_service_account_for_org.html" + "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 is 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/~1org~1service-accounts/get/x-python", + "path": "/paths/~1user~1org/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.service_accounts import list_service_accounts_for_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ServiceAccountResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_service_accounts_for_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ServiceAccountResultsPage, Error]] = (\n list_service_accounts_for_org.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\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ServiceAccountResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.service_accounts.list_service_accounts_for_org.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import get_user_org\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserOrgInfo\nfrom kittycad.types import Response\n\n\ndef example_get_user_org():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserOrgInfo, Error]] = get_user_org.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserOrgInfo = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.get_user_org.html" } }, { "op": "add", - "path": "/paths/~1ws~1modeling~1commands/get/x-python", + "path": "/paths/~1async~1operations/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketRequest, WebSocketResponse\nfrom kittycad.models.post_effect_type import PostEffectType\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\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 with modeling_commands_ws.WebSocket(\n client=client,\n fps=10,\n post_effect=PostEffectType.PHOSPHOR,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n pool=None, # Optional[str]\n ) as websocket:\n\n # Send a message.\n websocket.send(\n WebSocketRequest(\n sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n )\n )\n )\n\n # Get a message.\n message = websocket.recv()\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" + "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[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\n if isinstance(result, Error) or result is 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": "/info/x-python", + "path": "/paths/~1events/post/x-python", "value": { - "client": "# Create a client with your token.\nfrom kittycad.client 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.client 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import create_event\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.event import modeling_app_event\nfrom kittycad.models.modeling_app_event_type import ModelingAppEventType\nfrom kittycad.types import Response\n\n\ndef example_create_event():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_event.sync(\n client=client,\n body=modeling_app_event(\n created_at=\"\",\n event_type=ModelingAppEventType.SUCCESSFUL_COMPILE_BEFORE_CLOSE,\n project_name=\"\",\n source_id=\"\",\n user_id=\"\",\n ),\n )\n\n if isinstance(result, Error) or result is 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.meta.create_event.html" + } + }, + { + "op": "add", + "path": "/paths/~1orgs/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.orgs import list_orgs\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, OrgResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_orgs():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[OrgResultsPage, Error]] = list_orgs.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 is None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: OrgResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.orgs.list_orgs.html" } } ] \ No newline at end of file diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 24c15a185..5e4e7751d 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -31,6 +31,7 @@ from .auth_callback import AuthCallback from .axis import Axis from .axis_direction_pair import AxisDirectionPair +from .batch_response import BatchResponse from .billing_info import BillingInfo from .block_reason import BlockReason from .cache_metadata import CacheMetadata diff --git a/kittycad/models/batch_response.py b/kittycad/models/batch_response.py new file mode 100644 index 000000000..6e2ede07b --- /dev/null +++ b/kittycad/models/batch_response.py @@ -0,0 +1,24 @@ +from typing import Union + +from pydantic import BaseModel, ConfigDict, RootModel + + + +class response(BaseModel): + """Response to the modeling command.""" + + model_config = ConfigDict(protected_namespaces=()) + + +class errors(BaseModel): + """Errors that occurred during the modeling command.""" + + model_config = ConfigDict(protected_namespaces=()) + + +BatchResponse = RootModel[ + Union[ + response, + errors, + ] +] diff --git a/kittycad/models/ok_web_socket_response_data.py b/kittycad/models/ok_web_socket_response_data.py index 7e30612fa..28782149e 100644 --- a/kittycad/models/ok_web_socket_response_data.py +++ b/kittycad/models/ok_web_socket_response_data.py @@ -1,8 +1,9 @@ -from typing import List, Literal, Union +from typing import Dict, List, Literal, Union from pydantic import BaseModel, ConfigDict, Field, RootModel from typing_extensions import Annotated +from ..models.batch_response import BatchResponse from ..models.ice_server import IceServer from ..models.ok_modeling_cmd_response import OkModelingCmdResponse from ..models.raw_file import RawFile @@ -82,6 +83,24 @@ class modeling(BaseModel): model_config = ConfigDict(protected_namespaces=()) +class ModelingBatchData(BaseModel): + """""" + + responses: Dict[str, BatchResponse] + + model_config = ConfigDict(protected_namespaces=()) + + +class modeling_batch(BaseModel): + """Response to a ModelingBatch.""" + + data: ModelingBatchData + + type: Literal["modeling_batch"] = "modeling_batch" + + model_config = ConfigDict(protected_namespaces=()) + + class ExportData(BaseModel): """""" @@ -139,6 +158,7 @@ class pong(BaseModel): trickle_ice, sdp_answer, modeling, + modeling_batch, export, metrics_request, pong, diff --git a/pyproject.toml b/pyproject.toml index 4fbbc0b3b..1bb9f4087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kittycad" -version = "0.6.11" +version = "0.6.12" description = "A client library for accessing KittyCAD" authors = [] diff --git a/spec.json b/spec.json index c1991eaf1..0bb805696 100644 --- a/spec.json +++ b/spec.json @@ -14257,6 +14257,44 @@ "direction" ] }, + "BatchResponse": { + "description": "Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.", + "anyOf": [ + { + "description": "Response sent when a request succeeded.", + "type": "object", + "properties": { + "response": { + "description": "Response to the modeling command.", + "allOf": [ + { + "$ref": "#/components/schemas/OkModelingCmdResponse" + } + ] + } + }, + "required": [ + "response" + ] + }, + { + "description": "Response sent when a request did not succeed.", + "type": "object", + "properties": { + "errors": { + "description": "Errors that occurred during the modeling command.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiError" + } + } + }, + "required": [ + "errors" + ] + } + ] + }, "BillingInfo": { "description": "The billing information for payments.", "type": "object", @@ -22467,6 +22505,37 @@ "type" ] }, + { + "description": "Response to a ModelingBatch.", + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "responses": { + "description": "For each request in the batch, maps its ID to the request's outcome.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/BatchResponse" + } + } + }, + "required": [ + "responses" + ] + }, + "type": { + "type": "string", + "enum": [ + "modeling_batch" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "description": "The exported files.", "type": "object",