From d724c8e70671a9df2d22560442eb6ccc6e28974e Mon Sep 17 00:00:00 2001 From: "zoo-github-actions-auth[bot]" <155849648+zoo-github-actions-auth[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:11:23 -0700 Subject: [PATCH] Update api spec (#256) * YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] --- kittycad.py.patch.json | 766 ++--- kittycad/api/api_calls/get_async_operation.py | 16 + .../api/ml/create_kcl_code_completions.py | 2 +- .../api/ml/create_text_to_cad_iteration.py | 118 + .../ml/create_text_to_cad_model_feedback.py | 12 +- .../ml/{get_ai_prompt.py => get_ml_prompt.py} | 18 +- ...{list_ai_prompts.py => list_ml_prompts.py} | 22 +- kittycad/examples_test.py | 522 ++-- kittycad/models/__init__.py | 15 +- kittycad/models/ai_prompt_metadata.py | 12 - kittycad/models/async_api_call_output.py | 46 +- kittycad/models/async_api_call_type.py | 2 + .../models/{ai_feedback.py => ml_feedback.py} | 4 +- .../models/{ai_prompt.py => ml_prompt.py} | 16 +- kittycad/models/ml_prompt_metadata.py | 17 + ...ults_page.py => ml_prompt_results_page.py} | 6 +- .../{ai_prompt_type.py => ml_prompt_type.py} | 6 +- kittycad/models/source_position.py | 13 + kittycad/models/source_range.py | 14 + kittycad/models/source_range_prompt.py | 14 + kittycad/models/text_to_cad.py | 4 +- kittycad/models/text_to_cad_iteration.py | 46 + kittycad/models/text_to_cad_iteration_body.py | 17 + kittycad/models/text_to_cad_model.py | 2 + spec.json | 2497 ++++++++++------- 25 files changed, 2564 insertions(+), 1643 deletions(-) create mode 100644 kittycad/api/ml/create_text_to_cad_iteration.py rename kittycad/api/ml/{get_ai_prompt.py => get_ml_prompt.py} (85%) rename kittycad/api/ml/{list_ai_prompts.py => list_ml_prompts.py} (84%) delete mode 100644 kittycad/models/ai_prompt_metadata.py rename kittycad/models/{ai_feedback.py => ml_feedback.py} (80%) rename kittycad/models/{ai_prompt.py => ml_prompt.py} (64%) create mode 100644 kittycad/models/ml_prompt_metadata.py rename kittycad/models/{ai_prompt_results_page.py => ml_prompt_results_page.py} (66%) rename kittycad/models/{ai_prompt_type.py => ml_prompt_type.py} (56%) create mode 100644 kittycad/models/source_position.py create mode 100644 kittycad/models/source_range.py create mode 100644 kittycad/models/source_range_prompt.py create mode 100644 kittycad/models/text_to_cad_iteration.py create mode 100644 kittycad/models/text_to_cad_iteration_body.py diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index a04ed84c3..b740c1854 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -9,426 +9,450 @@ }, { "op": "add", - "path": "/paths/~1auth~1email~1callback/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.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 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/~1users~1{id}/get/x-python", + "path": "/paths/~1api-calls/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.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/~1user~1api-calls/get/x-python", + "path": "/paths/~1ml-prompts/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.ml import list_ml_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, MlPromptResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ml_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[MlPromptResultsPage, Error]] = list_ml_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: MlPromptResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ml.list_ml_prompts.html" } }, { "op": "add", - "path": "/paths/~1logout/post/x-python", + "path": "/paths/~1file~1density/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result 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.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/~1api-calls/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.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 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/~1async~1operations/get/x-python", + "path": "/paths/~1orgs/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[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.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" } }, { "op": "add", - "path": "/paths/~1user~1payment~1tax/get/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.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.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~1api-tokens/get/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.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.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/~1user~1api-tokens/post/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.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.ml 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.ml.get_text_to_cad_model_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1privacy/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 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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ml import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ml_feedback import MlFeedback\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=MlFeedback.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.ml.create_text_to_cad_model_feedback.html" } }, { "op": "add", - "path": "/paths/~1user~1privacy/put/x-python", + "path": "/paths/~1ml-prompts~1{id}/get/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" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ml import get_ml_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, MlPrompt\nfrom kittycad.types import Response\n\n\ndef example_get_ml_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[MlPrompt, Error]] = get_ml_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: MlPrompt = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ml.get_ml_prompt.html" } }, { "op": "add", - "path": "/paths/~1api-calls~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_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.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/~1pricing~1subscriptions/get/x-python", + "path": "/paths/~1org~1payment/post/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.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~1api-calls~1{id}/get/x-python", + "path": "/paths/~1org~1payment/delete/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 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/~1async~1operations~1{id}/get/x-python", + "path": "/paths/~1org~1payment/put/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 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/~1users-extended/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.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.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/~1events/post/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 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.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/~1org~1service-accounts~1{token}/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.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.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~1service-accounts~1{token}/delete/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.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.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/~1file~1execute~1{lang}/post/x-python", + "path": "/paths/~1store~1coupon/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result 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.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/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/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.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.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/~1users~1{id}~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_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.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/~1org~1payment~1subscriptions/get/x-python", + "path": "/paths/~1user~1payment/post/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 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/~1org~1payment~1subscriptions/post/x-python", + "path": "/paths/~1user~1payment/delete/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.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/~1org~1payment~1subscriptions/put/x-python", + "path": "/paths/~1user~1payment/put/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.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/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/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.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.ml 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.ml.list_text_to_cad_models_for_user.html" } }, { "op": "add", - "path": "/paths/~1org~1members~1{user_id}/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.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.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/~1org~1members~1{user_id}/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.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.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/~1org~1members~1{user_id}/put/x-python", + "path": "/paths/~1org~1payment~1intent/post/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.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/~1org~1payment~1methods~1{id}/delete/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.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.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/~1file~1volume/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.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.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/~1user/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.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_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/~1user/delete/x-python", + "path": "/paths/~1org~1service-accounts/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.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/~1user/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.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.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/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/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.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.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/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", + "path": "/paths/~1users~1{id}~1payment~1balance/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.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~1balance/get/x-python", + "path": "/paths/~1debug~1uploads/post/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.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/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1file~1volume/post/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.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/~1org/post/x-python", + "path": "/paths/~1apps~1github~1callback/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.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/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.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.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/~1org/delete/x-python", + "path": "/paths/~1_meta~1info/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.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/put/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.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 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/~1orgs/get/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.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.ml 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 kcl=None, # Optional[bool]\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.ml.create_text_to_cad.html" } }, { "op": "add", - "path": "/paths/~1internal~1discord~1api-token~1{discord_id}/get/x-python", + "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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.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/~1user~1payment~1subscriptions/get/x-python", + "path": "/paths/~1logout/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_user_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.types import Response\n\n\ndef example_get_user_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n get_user_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_user_subscription.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/~1user~1payment~1subscriptions/post/x-python", + "path": "/paths/~1file~1surface-area/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_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/~1user~1payment~1subscriptions/put/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.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 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/~1org~1privacy/get/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.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.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/~1org~1privacy/put/x-python", + "path": "/paths/~1user~1onboarding/get/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.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/~1orgs~1{id}~1payment~1balance/get/x-python", + "path": "/paths/~1user~1payment~1invoices/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.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/~1orgs~1{id}~1payment~1balance/put/x-python", + "path": "/paths/~1user~1api-calls/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.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/~1org~1members/get/x-python", + "path": "/paths/~1auth~1email/post/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.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/~1org~1members/post/x-python", + "path": "/paths/~1ml~1kcl~1completions/post/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.ml 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.ml.create_kcl_code_completions.html" + } + }, + { + "op": "add", + "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.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~1api-calls/get/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" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[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" } }, { @@ -441,386 +465,386 @@ }, { "op": "add", - "path": "/paths/~1user~1onboarding/get/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.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.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/~1user~1text-to-cad~1{id}/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.ml 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.ml.get_text_to_cad_model_for_user.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/~1user~1text-to-cad~1{id}/post/x-python", + "path": "/paths/~1user~1privacy/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ml 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.ml.create_text_to_cad_model_feedback.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/~1/get/x-python", + "path": "/paths/~1user~1privacy/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.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/post/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 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.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/~1user~1payment/get/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 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.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/~1user~1payment/delete/x-python", + "path": "/paths/~1org~1payment~1subscriptions/put/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.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/~1user~1payment/put/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 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.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~1text-to-cad/get/x-python", + "path": "/paths/~1org/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ml 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.ml.list_text_to_cad_models_for_user.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/~1store~1coupon/post/x-python", + "path": "/paths/~1org/post/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.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/~1user~1payment~1invoices/get/x-python", + "path": "/paths/~1org/delete/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 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~1api-tokens~1{token}/get/x-python", + "path": "/paths/~1org/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\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/~1user~1api-tokens~1{token}/delete/x-python", + "path": "/paths/~1org~1members/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 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/~1org~1payment/post/x-python", + "path": "/paths/~1org~1members/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.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/~1org~1payment/get/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 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 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" } }, { "op": "add", - "path": "/paths/~1org~1payment/delete/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.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.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" } }, { "op": "add", - "path": "/paths/~1org~1payment/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_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.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/~1file~1mass/post/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.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.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/~1ai~1kcl~1completions/post/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.ml 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.ml.create_kcl_code_completions.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/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1async~1operations/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[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.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": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1payment~1methods~1{id}/delete/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.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result 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_user.html" } }, { "op": "add", - "path": "/paths/~1ping/get/x-python", + "path": "/paths/~1user~1extended/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.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/~1org~1payment~1methods/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 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.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/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1org~1payment~1invoices/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 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~1api-calls~1{id}/get/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.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.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/~1ws~1modeling~1commands/get/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.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 show_grid=False,\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.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/~1ai-prompts/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.ml 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.ml.list_ai_prompts.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/~1user~1extended/get/x-python", + "path": "/paths/~1ml~1text-to-cad~1iteration/post/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.ml import create_text_to_cad_iteration\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadIteration\nfrom kittycad.models.source_position import SourcePosition\nfrom kittycad.models.source_range import SourceRange\nfrom kittycad.models.source_range_prompt import SourceRangePrompt\nfrom kittycad.models.text_to_cad_iteration_body import TextToCadIterationBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_iteration():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCadIteration, Error]] = (\n create_text_to_cad_iteration.sync(\n client=client,\n body=TextToCadIterationBody(\n original_source_code=\"\",\n source_ranges=[\n SourceRangePrompt(\n prompt=\"\",\n range=SourceRange(\n end=SourcePosition(\n column=10,\n line=10,\n ),\n start=SourcePosition(\n column=10,\n line=10,\n ),\n ),\n )\n ],\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: TextToCadIteration = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ml.create_text_to_cad_iteration.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1payment~1subscriptions/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.payments import get_user_subscription\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ZooProductSubscriptions\nfrom kittycad.types import Response\n\n\ndef example_get_user_subscription():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ZooProductSubscriptions, Error]] = (\n get_user_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_user_subscription.html" } }, { "op": "add", - "path": "/paths/~1org~1payment~1invoices/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.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.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/~1auth~1email/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.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.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/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/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.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.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/~1apps~1github~1consent/get/x-python", + "path": "/paths/~1users/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 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/~1user~1payment~1balance/get/x-python", + "path": "/paths/~1api-call-metrics/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[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.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/~1ai-prompts~1{id}/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.ml 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.ml.get_ai_prompt.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/~1org~1payment~1intent/post/x-python", + "path": "/paths/~1org~1privacy/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.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/~1api-call-metrics/get/x-python", + "path": "/paths/~1org~1privacy/put/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.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/~1users~1{id}~1payment~1balance/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.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.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/~1users~1{id}~1payment~1balance/put/x-python", + "path": "/paths/~1org~1saml~1idp/get/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.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/~1user~1org/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.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 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/~1org~1payment~1tax/get/x-python", + "path": "/paths/~1org~1saml~1idp/delete/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.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~1session~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.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 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/~1file~1center-of-mass/post/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.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.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/~1auth~1saml~1provider~1{provider_id}~1login/get/x-python", + "path": "/paths/~1file~1mass/post/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.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/~1auth~1saml~1provider~1{provider_id}~1login/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.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_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/~1orgs~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.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.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/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/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.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.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/~1user~1payment~1methods/get/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.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.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 TextToCadIteration,\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 TextToCadIteration,\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 TextToCadIteration,\n ] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" } }, { @@ -833,58 +857,50 @@ }, { "op": "add", - "path": "/paths/~1_meta~1info/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result 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~1saml~1idp/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.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.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/~1org~1saml~1idp/get/x-python", + "path": "/paths/~1auth~1email~1callback/get/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.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/~1org~1saml~1idp/delete/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 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.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/put/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.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.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/~1user~1payment~1intent/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_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_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~1api-calls/get/x-python", + "path": "/paths/~1user~1api-tokens/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.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" } }, { @@ -897,122 +913,114 @@ }, { "op": "add", - "path": "/paths/~1_meta~1ipinfo/get/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" - } - }, - { - "op": "add", - "path": "/paths/~1user~1oauth2~1providers/get/x-python", + "path": "/paths/~1events/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.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/~1users-extended~1{id}/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.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.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 show_grid=False,\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/~1debug~1uploads/post/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.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.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/~1file~1density/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.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.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/~1ai~1text-to-cad~1{output_format}/post/x-python", + "path": "/paths/~1user~1payment~1tax/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ml 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 kcl=None, # Optional[bool]\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.ml.create_text_to_cad.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~1payment~1methods~1{id}/delete/x-python", + "path": "/paths/~1/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result 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_user.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/~1file~1surface-area/post/x-python", + "path": "/paths/~1org~1payment~1balance/get/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.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/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1user~1org/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[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.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/~1apps~1github~1callback/get/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.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.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/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/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.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.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/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1ping/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[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.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/~1users/get/x-python", + "path": "/paths/~1user/delete/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.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/get/x-python", + "path": "/paths/~1user/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.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/~1org~1service-accounts/post/x-python", + "path": "/paths/~1user/put/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.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" } } ] \ No newline at end of file diff --git a/kittycad/api/api_calls/get_async_operation.py b/kittycad/api/api_calls/get_async_operation.py index 4247dbffd..f7157bd37 100644 --- a/kittycad/api/api_calls/get_async_operation.py +++ b/kittycad/api/api_calls/get_async_operation.py @@ -11,6 +11,7 @@ from ...models.file_surface_area import FileSurfaceArea from ...models.file_volume import FileVolume from ...models.text_to_cad import TextToCad +from ...models.text_to_cad_iteration import TextToCadIteration from ...types import Response @@ -44,6 +45,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[ FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ]: @@ -108,6 +110,15 @@ def _parse_response(*, response: httpx.Response) -> Optional[ raise TypeError() option_text_to_cad = TextToCad(**data) return option_text_to_cad + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_text_to_cad_iteration = TextToCadIteration(**data) + return option_text_to_cad_iteration except ValueError: raise except TypeError: @@ -131,6 +142,7 @@ def _build_response(*, response: httpx.Response) -> Response[ FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] @@ -157,6 +169,7 @@ def sync_detailed( FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] @@ -187,6 +200,7 @@ def sync( FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ]: @@ -216,6 +230,7 @@ async def asyncio_detailed( FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] @@ -244,6 +259,7 @@ async def asyncio( FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ]: diff --git a/kittycad/api/ml/create_kcl_code_completions.py b/kittycad/api/ml/create_kcl_code_completions.py index 4f7a80f6e..9253c5507 100644 --- a/kittycad/api/ml/create_kcl_code_completions.py +++ b/kittycad/api/ml/create_kcl_code_completions.py @@ -14,7 +14,7 @@ def _get_kwargs( *, client: Client, ) -> Dict[str, Any]: - url = "{}/ai/kcl/completions".format( + url = "{}/ml/kcl/completions".format( client.base_url, ) # noqa: E501 diff --git a/kittycad/api/ml/create_text_to_cad_iteration.py b/kittycad/api/ml/create_text_to_cad_iteration.py new file mode 100644 index 000000000..74577c170 --- /dev/null +++ b/kittycad/api/ml/create_text_to_cad_iteration.py @@ -0,0 +1,118 @@ +from typing import Any, Dict, Optional, Union + +import httpx + +from ...client import Client +from ...models.error import Error +from ...models.text_to_cad_iteration import TextToCadIteration +from ...models.text_to_cad_iteration_body import TextToCadIterationBody +from ...types import Response + + +def _get_kwargs( + body: TextToCadIterationBody, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/ml/text-to-cad/iteration".format( + client.base_url, + ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + "content": body.model_dump_json(), + } + + +def _parse_response( + *, response: httpx.Response +) -> Optional[Union[TextToCadIteration, Error]]: + if response.status_code == 201: + response_201 = TextToCadIteration(**response.json()) + return response_201 + if response.status_code == 400: + response_4XX = Error(**response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error(**response.json()) + return response_5XX + return Error(**response.json()) + + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Union[TextToCadIteration, Error]]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + body: TextToCadIterationBody, + *, + client: Client, +) -> Response[Optional[Union[TextToCadIteration, Error]]]: + kwargs = _get_kwargs( + body=body, + client=client, + ) + + response = httpx.post( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + body: TextToCadIterationBody, + *, + client: Client, +) -> Optional[Union[TextToCadIteration, Error]]: + """This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + + return sync_detailed( + body=body, + client=client, + ).parsed + + +async def asyncio_detailed( + body: TextToCadIterationBody, + *, + client: Client, +) -> Response[Optional[Union[TextToCadIteration, Error]]]: + kwargs = _get_kwargs( + body=body, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.post(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + body: TextToCadIterationBody, + *, + client: Client, +) -> Optional[Union[TextToCadIteration, Error]]: + """This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 + + return ( + await asyncio_detailed( + body=body, + client=client, + ) + ).parsed diff --git a/kittycad/api/ml/create_text_to_cad_model_feedback.py b/kittycad/api/ml/create_text_to_cad_model_feedback.py index eeff9c2c5..260b4ac12 100644 --- a/kittycad/api/ml/create_text_to_cad_model_feedback.py +++ b/kittycad/api/ml/create_text_to_cad_model_feedback.py @@ -3,14 +3,14 @@ import httpx from ...client import Client -from ...models.ai_feedback import AiFeedback from ...models.error import Error +from ...models.ml_feedback import MlFeedback from ...types import Response def _get_kwargs( id: str, - feedback: AiFeedback, + feedback: MlFeedback, *, client: Client, ) -> Dict[str, Any]: @@ -59,7 +59,7 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( id: str, - feedback: AiFeedback, + feedback: MlFeedback, *, client: Client, ) -> Response[Optional[Error]]: @@ -79,7 +79,7 @@ def sync_detailed( def sync( id: str, - feedback: AiFeedback, + feedback: MlFeedback, *, client: Client, ) -> Optional[Error]: @@ -94,7 +94,7 @@ def sync( async def asyncio_detailed( id: str, - feedback: AiFeedback, + feedback: MlFeedback, *, client: Client, ) -> Response[Optional[Error]]: @@ -112,7 +112,7 @@ async def asyncio_detailed( async def asyncio( id: str, - feedback: AiFeedback, + feedback: MlFeedback, *, client: Client, ) -> Optional[Error]: diff --git a/kittycad/api/ml/get_ai_prompt.py b/kittycad/api/ml/get_ml_prompt.py similarity index 85% rename from kittycad/api/ml/get_ai_prompt.py rename to kittycad/api/ml/get_ml_prompt.py index 246601bfd..ad1915e94 100644 --- a/kittycad/api/ml/get_ai_prompt.py +++ b/kittycad/api/ml/get_ml_prompt.py @@ -3,8 +3,8 @@ import httpx from ...client import Client -from ...models.ai_prompt import AiPrompt from ...models.error import Error +from ...models.ml_prompt import MlPrompt from ...types import Response @@ -13,7 +13,7 @@ def _get_kwargs( *, client: Client, ) -> Dict[str, Any]: - url = "{}/ai-prompts/{id}".format( + url = "{}/ml-prompts/{id}".format( client.base_url, id=id, ) # noqa: E501 @@ -29,9 +29,9 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[AiPrompt, Error]]: +def _parse_response(*, response: httpx.Response) -> Optional[Union[MlPrompt, Error]]: if response.status_code == 200: - response_200 = AiPrompt(**response.json()) + response_200 = MlPrompt(**response.json()) return response_200 if response.status_code == 400: response_4XX = Error(**response.json()) @@ -44,7 +44,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[AiPrompt, Err def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[AiPrompt, Error]]]: +) -> Response[Optional[Union[MlPrompt, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -57,7 +57,7 @@ def sync_detailed( id: str, *, client: Client, -) -> Response[Optional[Union[AiPrompt, Error]]]: +) -> Response[Optional[Union[MlPrompt, Error]]]: kwargs = _get_kwargs( id=id, client=client, @@ -75,7 +75,7 @@ def sync( id: str, *, client: Client, -) -> Optional[Union[AiPrompt, Error]]: +) -> Optional[Union[MlPrompt, Error]]: """This endpoint requires authentication by a Zoo employee.""" # noqa: E501 return sync_detailed( @@ -88,7 +88,7 @@ async def asyncio_detailed( id: str, *, client: Client, -) -> Response[Optional[Union[AiPrompt, Error]]]: +) -> Response[Optional[Union[MlPrompt, Error]]]: kwargs = _get_kwargs( id=id, client=client, @@ -104,7 +104,7 @@ async def asyncio( id: str, *, client: Client, -) -> Optional[Union[AiPrompt, Error]]: +) -> Optional[Union[MlPrompt, Error]]: """This endpoint requires authentication by a Zoo employee.""" # noqa: E501 return ( diff --git a/kittycad/api/ml/list_ai_prompts.py b/kittycad/api/ml/list_ml_prompts.py similarity index 84% rename from kittycad/api/ml/list_ai_prompts.py rename to kittycad/api/ml/list_ml_prompts.py index d4f6950ce..8f98fd1af 100644 --- a/kittycad/api/ml/list_ai_prompts.py +++ b/kittycad/api/ml/list_ml_prompts.py @@ -3,9 +3,9 @@ import httpx from ...client import Client -from ...models.ai_prompt_results_page import AiPromptResultsPage from ...models.created_at_sort_mode import CreatedAtSortMode from ...models.error import Error +from ...models.ml_prompt_results_page import MlPromptResultsPage from ...types import Response @@ -16,7 +16,7 @@ def _get_kwargs( limit: Optional[int] = None, page_token: Optional[str] = None, ) -> Dict[str, Any]: - url = "{}/ai-prompts".format( + url = "{}/ml-prompts".format( client.base_url, ) # noqa: E501 @@ -54,9 +54,9 @@ def _get_kwargs( def _parse_response( *, response: httpx.Response -) -> Optional[Union[AiPromptResultsPage, Error]]: +) -> Optional[Union[MlPromptResultsPage, Error]]: if response.status_code == 200: - response_200 = AiPromptResultsPage(**response.json()) + response_200 = MlPromptResultsPage(**response.json()) return response_200 if response.status_code == 400: response_4XX = Error(**response.json()) @@ -69,7 +69,7 @@ def _parse_response( def _build_response( *, response: httpx.Response -) -> Response[Optional[Union[AiPromptResultsPage, Error]]]: +) -> Response[Optional[Union[MlPromptResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -84,7 +84,7 @@ def sync_detailed( client: Client, limit: Optional[int] = None, page_token: Optional[str] = None, -) -> Response[Optional[Union[AiPromptResultsPage, Error]]]: +) -> Response[Optional[Union[MlPromptResultsPage, Error]]]: kwargs = _get_kwargs( limit=limit, page_token=page_token, @@ -106,10 +106,10 @@ def sync( client: Client, limit: Optional[int] = None, page_token: Optional[str] = None, -) -> Optional[Union[AiPromptResultsPage, Error]]: +) -> Optional[Union[MlPromptResultsPage, Error]]: """For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested. This endpoint requires authentication by a Zoo employee. - The AI prompts are returned in order of creation, with the most recently created AI prompts first. + The ML prompts are returned in order of creation, with the most recently created ML prompts first. """ # noqa: E501 return sync_detailed( @@ -126,7 +126,7 @@ async def asyncio_detailed( client: Client, limit: Optional[int] = None, page_token: Optional[str] = None, -) -> Response[Optional[Union[AiPromptResultsPage, Error]]]: +) -> Response[Optional[Union[MlPromptResultsPage, Error]]]: kwargs = _get_kwargs( limit=limit, page_token=page_token, @@ -146,10 +146,10 @@ async def asyncio( client: Client, limit: Optional[int] = None, page_token: Optional[str] = None, -) -> Optional[Union[AiPromptResultsPage, Error]]: +) -> Optional[Union[MlPromptResultsPage, Error]]: """For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested. This endpoint requires authentication by a Zoo employee. - The AI prompts are returned in order of creation, with the most recently created AI prompts first. + The ML prompts are returned in order of creation, with the most recently created ML prompts first. """ # noqa: E501 return ( diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index 2e707b7a0..8a644de74 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -54,10 +54,11 @@ from kittycad.api.ml import ( create_kcl_code_completions, create_text_to_cad, + create_text_to_cad_iteration, create_text_to_cad_model_feedback, - get_ai_prompt, + get_ml_prompt, get_text_to_cad_model_for_user, - list_ai_prompts, + list_ml_prompts, list_text_to_cad_models_for_user, ) from kittycad.api.modeling import modeling_commands_ws @@ -154,8 +155,6 @@ from kittycad.client import ClientFromEnv from kittycad.models import ( AccountProvider, - AiPrompt, - AiPromptResultsPage, ApiCallQueryGroup, ApiCallWithPrice, ApiCallWithPriceResultsPage, @@ -180,6 +179,8 @@ IpAddrInfo, KclCodeCompletionResponse, Metadata, + MlPrompt, + MlPromptResultsPage, Onboarding, Org, OrgMember, @@ -193,6 +194,7 @@ ServiceAccountResultsPage, Session, TextToCad, + TextToCadIteration, TextToCadResultsPage, UnitAngleConversion, UnitAreaConversion, @@ -215,7 +217,6 @@ ZooProductSubscriptions, ) from kittycad.models.add_org_member import AddOrgMember -from kittycad.models.ai_feedback import AiFeedback from kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy from kittycad.models.api_call_status import ApiCallStatus from kittycad.models.billing_info import BillingInfo @@ -228,6 +229,7 @@ from kittycad.models.idp_metadata_source import base64_encoded_xml from kittycad.models.kcl_code_completion_params import KclCodeCompletionParams from kittycad.models.kcl_code_completion_request import KclCodeCompletionRequest +from kittycad.models.ml_feedback import MlFeedback from kittycad.models.modeling_app_event_type import ModelingAppEventType from kittycad.models.modeling_app_individual_subscription_tier import ( ModelingAppIndividualSubscriptionTier, @@ -242,9 +244,13 @@ from kittycad.models.rtc_sdp_type import RtcSdpType from kittycad.models.rtc_session_description import RtcSessionDescription from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate +from kittycad.models.source_position import SourcePosition +from kittycad.models.source_range import SourceRange +from kittycad.models.source_range_prompt import SourceRangePrompt from kittycad.models.store_coupon_params import StoreCouponParams from kittycad.models.subscription_tier_price import per_user from kittycad.models.text_to_cad_create_body import TextToCadCreateBody +from kittycad.models.text_to_cad_iteration_body import TextToCadIterationBody from kittycad.models.unit_angle import UnitAngle from kittycad.models.unit_area import UnitArea from kittycad.models.unit_current import UnitCurrent @@ -388,193 +394,6 @@ async def test_get_ipinfo_async(): ) -@pytest.mark.skip -def test_list_ai_prompts(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.sync( - client=client, - sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, - limit=None, # Optional[int] - page_token=None, # Optional[str] - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: AiPromptResultsPage = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[Optional[Union[AiPromptResultsPage, Error]]] = ( - list_ai_prompts.sync_detailed( - client=client, - sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, - limit=None, # Optional[int] - page_token=None, # Optional[str] - ) - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_list_ai_prompts_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[AiPromptResultsPage, Error]] = await list_ai_prompts.asyncio( - client=client, - sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, - limit=None, # Optional[int] - page_token=None, # Optional[str] - ) - - # OR run async with more info - response: Response[Optional[Union[AiPromptResultsPage, Error]]] = ( - await list_ai_prompts.asyncio_detailed( - client=client, - sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, - limit=None, # Optional[int] - page_token=None, # Optional[str] - ) - ) - - -@pytest.mark.skip -def test_get_ai_prompt(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync( - client=client, - id="", - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: AiPrompt = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[Optional[Union[AiPrompt, Error]]] = get_ai_prompt.sync_detailed( - client=client, - id="", - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_get_ai_prompt_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[AiPrompt, Error]] = await get_ai_prompt.asyncio( - client=client, - id="", - ) - - # OR run async with more info - response: Response[Optional[Union[AiPrompt, Error]]] = ( - await get_ai_prompt.asyncio_detailed( - client=client, - id="", - ) - ) - - -@pytest.mark.skip -def test_create_kcl_code_completions(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[KclCodeCompletionResponse, Error]] = ( - create_kcl_code_completions.sync( - client=client, - body=KclCodeCompletionRequest( - extra=KclCodeCompletionParams( - language="", - trim_by_indentation=False, - ), - prompt="", - stop=[""], - stream=False, - suffix="", - ), - ) - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: KclCodeCompletionResponse = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[Optional[Union[KclCodeCompletionResponse, Error]]] = ( - create_kcl_code_completions.sync_detailed( - client=client, - body=KclCodeCompletionRequest( - extra=KclCodeCompletionParams( - language="", - trim_by_indentation=False, - ), - prompt="", - stop=[""], - stream=False, - suffix="", - ), - ) - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_create_kcl_code_completions_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[KclCodeCompletionResponse, Error]] = ( - await create_kcl_code_completions.asyncio( - client=client, - body=KclCodeCompletionRequest( - extra=KclCodeCompletionParams( - language="", - trim_by_indentation=False, - ), - prompt="", - stop=[""], - stream=False, - suffix="", - ), - ) - ) - - # OR run async with more info - response: Response[Optional[Union[KclCodeCompletionResponse, Error]]] = ( - await create_kcl_code_completions.asyncio_detailed( - client=client, - body=KclCodeCompletionRequest( - extra=KclCodeCompletionParams( - language="", - trim_by_indentation=False, - ), - prompt="", - stop=[""], - stream=False, - suffix="", - ), - ) - ) - - @pytest.mark.skip def test_create_text_to_cad(): # Create our client. @@ -993,6 +812,7 @@ def test_get_async_operation(): FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] = get_async_operation.sync( @@ -1012,6 +832,7 @@ def test_get_async_operation(): FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, ] = result print(body) @@ -1026,6 +847,7 @@ def test_get_async_operation(): FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] @@ -1051,6 +873,7 @@ async def test_get_async_operation_async(): FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] = await get_async_operation.asyncio( @@ -1069,6 +892,7 @@ async def test_get_async_operation_async(): FileDensity, FileSurfaceArea, TextToCad, + TextToCadIteration, Error, ] ] @@ -1887,6 +1711,312 @@ async def test_logout_async(): ) +@pytest.mark.skip +def test_list_ml_prompts(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[MlPromptResultsPage, Error]] = list_ml_prompts.sync( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: MlPromptResultsPage = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[Optional[Union[MlPromptResultsPage, Error]]] = ( + list_ml_prompts.sync_detailed( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_list_ml_prompts_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[MlPromptResultsPage, Error]] = await list_ml_prompts.asyncio( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + + # OR run async with more info + response: Response[Optional[Union[MlPromptResultsPage, Error]]] = ( + await list_ml_prompts.asyncio_detailed( + client=client, + sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING, + limit=None, # Optional[int] + page_token=None, # Optional[str] + ) + ) + + +@pytest.mark.skip +def test_get_ml_prompt(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[MlPrompt, Error]] = get_ml_prompt.sync( + client=client, + id="", + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: MlPrompt = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[Optional[Union[MlPrompt, Error]]] = get_ml_prompt.sync_detailed( + client=client, + id="", + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_get_ml_prompt_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[MlPrompt, Error]] = await get_ml_prompt.asyncio( + client=client, + id="", + ) + + # OR run async with more info + response: Response[Optional[Union[MlPrompt, Error]]] = ( + await get_ml_prompt.asyncio_detailed( + client=client, + id="", + ) + ) + + +@pytest.mark.skip +def test_create_kcl_code_completions(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[KclCodeCompletionResponse, Error]] = ( + create_kcl_code_completions.sync( + client=client, + body=KclCodeCompletionRequest( + extra=KclCodeCompletionParams( + language="", + trim_by_indentation=False, + ), + prompt="", + stop=[""], + stream=False, + suffix="", + ), + ) + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: KclCodeCompletionResponse = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[Optional[Union[KclCodeCompletionResponse, Error]]] = ( + create_kcl_code_completions.sync_detailed( + client=client, + body=KclCodeCompletionRequest( + extra=KclCodeCompletionParams( + language="", + trim_by_indentation=False, + ), + prompt="", + stop=[""], + stream=False, + suffix="", + ), + ) + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_create_kcl_code_completions_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[KclCodeCompletionResponse, Error]] = ( + await create_kcl_code_completions.asyncio( + client=client, + body=KclCodeCompletionRequest( + extra=KclCodeCompletionParams( + language="", + trim_by_indentation=False, + ), + prompt="", + stop=[""], + stream=False, + suffix="", + ), + ) + ) + + # OR run async with more info + response: Response[Optional[Union[KclCodeCompletionResponse, Error]]] = ( + await create_kcl_code_completions.asyncio_detailed( + client=client, + body=KclCodeCompletionRequest( + extra=KclCodeCompletionParams( + language="", + trim_by_indentation=False, + ), + prompt="", + stop=[""], + stream=False, + suffix="", + ), + ) + ) + + +@pytest.mark.skip +def test_create_text_to_cad_iteration(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[TextToCadIteration, Error]] = ( + create_text_to_cad_iteration.sync( + client=client, + body=TextToCadIterationBody( + original_source_code="", + source_ranges=[ + SourceRangePrompt( + prompt="", + range=SourceRange( + end=SourcePosition( + column=10, + line=10, + ), + start=SourcePosition( + column=10, + line=10, + ), + ), + ) + ], + ), + ) + ) + + if isinstance(result, Error) or result is None: + print(result) + raise Exception("Error in response") + + body: TextToCadIteration = result + print(body) + + # OR if you need more info (e.g. status_code) + response: Response[Optional[Union[TextToCadIteration, Error]]] = ( + create_text_to_cad_iteration.sync_detailed( + client=client, + body=TextToCadIterationBody( + original_source_code="", + source_ranges=[ + SourceRangePrompt( + prompt="", + range=SourceRange( + end=SourcePosition( + column=10, + line=10, + ), + start=SourcePosition( + column=10, + line=10, + ), + ), + ) + ], + ), + ) + ) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_create_text_to_cad_iteration_async(): + # Create our client. + client = ClientFromEnv() + + result: Optional[Union[TextToCadIteration, Error]] = ( + await create_text_to_cad_iteration.asyncio( + client=client, + body=TextToCadIterationBody( + original_source_code="", + source_ranges=[ + SourceRangePrompt( + prompt="", + range=SourceRange( + end=SourcePosition( + column=10, + line=10, + ), + start=SourcePosition( + column=10, + line=10, + ), + ), + ) + ], + ), + ) + ) + + # OR run async with more info + response: Response[Optional[Union[TextToCadIteration, Error]]] = ( + await create_text_to_cad_iteration.asyncio_detailed( + client=client, + body=TextToCadIterationBody( + original_source_code="", + source_ranges=[ + SourceRangePrompt( + prompt="", + range=SourceRange( + end=SourcePosition( + column=10, + line=10, + ), + start=SourcePosition( + column=10, + line=10, + ), + ), + ) + ], + ), + ) + ) + + @pytest.mark.skip def test_get_org(): # Create our client. @@ -6350,7 +6480,7 @@ def test_create_text_to_cad_model_feedback(): result: Optional[Error] = create_text_to_cad_model_feedback.sync( client=client, id="", - feedback=AiFeedback.THUMBS_UP, + feedback=MlFeedback.THUMBS_UP, ) if isinstance(result, Error) or result is None: @@ -6365,7 +6495,7 @@ def test_create_text_to_cad_model_feedback(): create_text_to_cad_model_feedback.sync_detailed( client=client, id="", - feedback=AiFeedback.THUMBS_UP, + feedback=MlFeedback.THUMBS_UP, ) ) @@ -6380,7 +6510,7 @@ async def test_create_text_to_cad_model_feedback_async(): result: Optional[Error] = await create_text_to_cad_model_feedback.asyncio( client=client, id="", - feedback=AiFeedback.THUMBS_UP, + feedback=MlFeedback.THUMBS_UP, ) # OR run async with more info @@ -6388,7 +6518,7 @@ async def test_create_text_to_cad_model_feedback_async(): await create_text_to_cad_model_feedback.asyncio_detailed( client=client, id="", - feedback=AiFeedback.THUMBS_UP, + feedback=MlFeedback.THUMBS_UP, ) ) diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 9b5ea9ecd..5aea5eb4c 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -3,11 +3,6 @@ from .account_provider import AccountProvider from .add_org_member import AddOrgMember from .address_details import AddressDetails -from .ai_feedback import AiFeedback -from .ai_prompt import AiPrompt -from .ai_prompt_metadata import AiPromptMetadata -from .ai_prompt_results_page import AiPromptResultsPage -from .ai_prompt_type import AiPromptType from .angle import Angle from .annotation_line_end import AnnotationLineEnd from .annotation_line_end_options import AnnotationLineEndOptions @@ -142,6 +137,11 @@ from .meta_cluster_info import MetaClusterInfo from .metadata import Metadata from .method import Method +from .ml_feedback import MlFeedback +from .ml_prompt import MlPrompt +from .ml_prompt_metadata import MlPromptMetadata +from .ml_prompt_results_page import MlPromptResultsPage +from .ml_prompt_type import MlPromptType from .modeling_app_event_type import ModelingAppEventType from .modeling_app_individual_subscription_tier import ( ModelingAppIndividualSubscriptionTier, @@ -213,6 +213,9 @@ from .solid3d_get_next_adjacent_edge import Solid3dGetNextAdjacentEdge from .solid3d_get_opposite_edge import Solid3dGetOppositeEdge from .solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge +from .source_position import SourcePosition +from .source_range import SourceRange +from .source_range_prompt import SourceRangePrompt from .stl_storage import StlStorage from .store_coupon_params import StoreCouponParams from .string_uuid import StringUuid @@ -227,6 +230,8 @@ from .take_snapshot import TakeSnapshot from .text_to_cad import TextToCad from .text_to_cad_create_body import TextToCadCreateBody +from .text_to_cad_iteration import TextToCadIteration +from .text_to_cad_iteration_body import TextToCadIterationBody from .text_to_cad_model import TextToCadModel from .text_to_cad_results_page import TextToCadResultsPage from .unit_angle import UnitAngle diff --git a/kittycad/models/ai_prompt_metadata.py b/kittycad/models/ai_prompt_metadata.py deleted file mode 100644 index 489c93352..000000000 --- a/kittycad/models/ai_prompt_metadata.py +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Optional - -from pydantic import BaseModel, ConfigDict - - - -class AiPromptMetadata(BaseModel): - """Metadata for an AI prompt.""" - - code: Optional[str] = None - - model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index 416ccd2ed..78b3d4a3a 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -1,16 +1,17 @@ import datetime -from typing import Dict, Literal, Optional, Union +from typing import Dict, List, Literal, Optional, Union from pydantic import BaseModel, ConfigDict, Field, RootModel from typing_extensions import Annotated -from ..models.ai_feedback import AiFeedback from ..models.api_call_status import ApiCallStatus from ..models.file_export_format import FileExportFormat from ..models.file_import_format import FileImportFormat from ..models.input_format import InputFormat +from ..models.ml_feedback import MlFeedback from ..models.output_format import OutputFormat from ..models.point3d import Point3d +from ..models.source_range_prompt import SourceRangePrompt from ..models.text_to_cad_model import TextToCadModel from ..models.unit_area import UnitArea from ..models.unit_density import UnitDensity @@ -224,7 +225,7 @@ class text_to_cad(BaseModel): error: Optional[str] = None - feedback: Optional[AiFeedback] = None + feedback: Optional[MlFeedback] = None id: Uuid @@ -251,6 +252,44 @@ class text_to_cad(BaseModel): model_config = ConfigDict(protected_namespaces=()) +class text_to_cad_iteration(BaseModel): + """Text to CAD iteration.""" + + code: str + + completed_at: Optional[datetime.datetime] = None + + created_at: datetime.datetime + + error: Optional[str] = None + + feedback: Optional[MlFeedback] = None + + id: Uuid + + model: TextToCadModel + + model_version: str + + original_source_code: str + + prompt: Optional[str] = None + + source_ranges: List[SourceRangePrompt] + + started_at: Optional[datetime.datetime] = None + + status: ApiCallStatus + + type: Literal["text_to_cad_iteration"] = "text_to_cad_iteration" + + updated_at: datetime.datetime + + user_id: Uuid + + model_config = ConfigDict(protected_namespaces=()) + + AsyncApiCallOutput = RootModel[ Annotated[ Union[ @@ -261,6 +300,7 @@ class text_to_cad(BaseModel): file_density, file_surface_area, text_to_cad, + text_to_cad_iteration, ], Field(discriminator="type"), ] diff --git a/kittycad/models/async_api_call_type.py b/kittycad/models/async_api_call_type.py index 4a4c44563..ef70299a0 100644 --- a/kittycad/models/async_api_call_type.py +++ b/kittycad/models/async_api_call_type.py @@ -18,6 +18,8 @@ class AsyncApiCallType(str, Enum): FILE_SURFACE_AREA = "file_surface_area" """# Text to CAD. """ # noqa: E501 TEXT_TO_CAD = "text_to_cad" + """# Text to CAD iteration. """ # noqa: E501 + TEXT_TO_CAD_ITERATION = "text_to_cad_iteration" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/ai_feedback.py b/kittycad/models/ml_feedback.py similarity index 80% rename from kittycad/models/ai_feedback.py rename to kittycad/models/ml_feedback.py index 5710a4478..69e5ac355 100644 --- a/kittycad/models/ai_feedback.py +++ b/kittycad/models/ml_feedback.py @@ -1,8 +1,8 @@ from enum import Enum -class AiFeedback(str, Enum): - """Human feedback on an AI response.""" # noqa: E501 +class MlFeedback(str, Enum): + """Human feedback on an ML response.""" # noqa: E501 """# Thumbs up. """ # noqa: E501 THUMBS_UP = "thumbs_up" diff --git a/kittycad/models/ai_prompt.py b/kittycad/models/ml_prompt.py similarity index 64% rename from kittycad/models/ai_prompt.py rename to kittycad/models/ml_prompt.py index b9ef17a9c..b2df3c9e5 100644 --- a/kittycad/models/ai_prompt.py +++ b/kittycad/models/ml_prompt.py @@ -3,15 +3,15 @@ from pydantic import BaseModel, ConfigDict -from ..models.ai_feedback import AiFeedback -from ..models.ai_prompt_metadata import AiPromptMetadata -from ..models.ai_prompt_type import AiPromptType from ..models.api_call_status import ApiCallStatus +from ..models.ml_feedback import MlFeedback +from ..models.ml_prompt_metadata import MlPromptMetadata +from ..models.ml_prompt_type import MlPromptType from ..models.uuid import Uuid -class AiPrompt(BaseModel): - """An AI prompt.""" +class MlPrompt(BaseModel): + """A ML prompt.""" completed_at: Optional[datetime.datetime] = None @@ -19,11 +19,11 @@ class AiPrompt(BaseModel): error: Optional[str] = None - feedback: Optional[AiFeedback] = None + feedback: Optional[MlFeedback] = None id: Uuid - metadata: Optional[AiPromptMetadata] = None + metadata: Optional[MlPromptMetadata] = None model_version: str @@ -35,7 +35,7 @@ class AiPrompt(BaseModel): status: ApiCallStatus - type: AiPromptType + type: MlPromptType updated_at: datetime.datetime diff --git a/kittycad/models/ml_prompt_metadata.py b/kittycad/models/ml_prompt_metadata.py new file mode 100644 index 000000000..ca76ec796 --- /dev/null +++ b/kittycad/models/ml_prompt_metadata.py @@ -0,0 +1,17 @@ +from typing import List, Optional + +from pydantic import BaseModel, ConfigDict + +from ..models.source_range_prompt import SourceRangePrompt + + +class MlPromptMetadata(BaseModel): + """Metadata for a ML prompt.""" + + code: Optional[str] = None + + original_source_code: Optional[str] = None + + source_ranges: Optional[List[SourceRangePrompt]] = None + + model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/ai_prompt_results_page.py b/kittycad/models/ml_prompt_results_page.py similarity index 66% rename from kittycad/models/ai_prompt_results_page.py rename to kittycad/models/ml_prompt_results_page.py index 2f237bd6e..3028f5a99 100644 --- a/kittycad/models/ai_prompt_results_page.py +++ b/kittycad/models/ml_prompt_results_page.py @@ -2,13 +2,13 @@ from pydantic import BaseModel, ConfigDict -from ..models.ai_prompt import AiPrompt +from ..models.ml_prompt import MlPrompt -class AiPromptResultsPage(BaseModel): +class MlPromptResultsPage(BaseModel): """A single page of results""" - items: List[AiPrompt] + items: List[MlPrompt] next_page: Optional[str] = None diff --git a/kittycad/models/ai_prompt_type.py b/kittycad/models/ml_prompt_type.py similarity index 56% rename from kittycad/models/ai_prompt_type.py rename to kittycad/models/ml_prompt_type.py index fd3cb59b6..89c103417 100644 --- a/kittycad/models/ai_prompt_type.py +++ b/kittycad/models/ml_prompt_type.py @@ -1,13 +1,15 @@ from enum import Enum -class AiPromptType(str, Enum): - """A type of AI prompt.""" # noqa: E501 +class MlPromptType(str, Enum): + """A type of ML prompt.""" # noqa: E501 """# Text to CAD. """ # noqa: E501 TEXT_TO_CAD = "text_to_cad" """# Text to KCL. """ # noqa: E501 TEXT_TO_KCL = "text_to_kcl" + """# Text to Kcl iteration, """ # noqa: E501 + TEXT_TO_KCL_ITERATION = "text_to_kcl_iteration" def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/source_position.py b/kittycad/models/source_position.py new file mode 100644 index 000000000..fc1eba615 --- /dev/null +++ b/kittycad/models/source_position.py @@ -0,0 +1,13 @@ + +from pydantic import BaseModel, ConfigDict + + + +class SourcePosition(BaseModel): + """A position in the source code.""" + + column: int + + line: int + + model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/source_range.py b/kittycad/models/source_range.py new file mode 100644 index 000000000..d9ebb2066 --- /dev/null +++ b/kittycad/models/source_range.py @@ -0,0 +1,14 @@ + +from pydantic import BaseModel, ConfigDict + +from ..models.source_position import SourcePosition + + +class SourceRange(BaseModel): + """A source range of code.""" + + end: SourcePosition + + start: SourcePosition + + model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/source_range_prompt.py b/kittycad/models/source_range_prompt.py new file mode 100644 index 000000000..04447d990 --- /dev/null +++ b/kittycad/models/source_range_prompt.py @@ -0,0 +1,14 @@ + +from pydantic import BaseModel, ConfigDict + +from ..models.source_range import SourceRange + + +class SourceRangePrompt(BaseModel): + """A source range and prompt for a text to CAD iteration.""" + + prompt: str + + range: SourceRange + + model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/text_to_cad.py b/kittycad/models/text_to_cad.py index 5f5e335dc..69b072a1c 100644 --- a/kittycad/models/text_to_cad.py +++ b/kittycad/models/text_to_cad.py @@ -3,9 +3,9 @@ from pydantic import BaseModel, ConfigDict -from ..models.ai_feedback import AiFeedback from ..models.api_call_status import ApiCallStatus from ..models.file_export_format import FileExportFormat +from ..models.ml_feedback import MlFeedback from ..models.text_to_cad_model import TextToCadModel from ..models.uuid import Uuid from .base64data import Base64Data @@ -22,7 +22,7 @@ class TextToCad(BaseModel): error: Optional[str] = None - feedback: Optional[AiFeedback] = None + feedback: Optional[MlFeedback] = None id: Uuid diff --git a/kittycad/models/text_to_cad_iteration.py b/kittycad/models/text_to_cad_iteration.py new file mode 100644 index 000000000..2e4f0cba0 --- /dev/null +++ b/kittycad/models/text_to_cad_iteration.py @@ -0,0 +1,46 @@ +import datetime +from typing import List, Optional + +from pydantic import BaseModel, ConfigDict + +from ..models.api_call_status import ApiCallStatus +from ..models.ml_feedback import MlFeedback +from ..models.source_range_prompt import SourceRangePrompt +from ..models.text_to_cad_model import TextToCadModel +from ..models.uuid import Uuid + + +class TextToCadIteration(BaseModel): + """A response from a text to CAD iteration.""" + + code: str + + completed_at: Optional[datetime.datetime] = None + + created_at: datetime.datetime + + error: Optional[str] = None + + feedback: Optional[MlFeedback] = None + + id: Uuid + + model: TextToCadModel + + model_version: str + + original_source_code: str + + prompt: Optional[str] = None + + source_ranges: List[SourceRangePrompt] + + started_at: Optional[datetime.datetime] = None + + status: ApiCallStatus + + updated_at: datetime.datetime + + user_id: Uuid + + model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/text_to_cad_iteration_body.py b/kittycad/models/text_to_cad_iteration_body.py new file mode 100644 index 000000000..b6a9393e3 --- /dev/null +++ b/kittycad/models/text_to_cad_iteration_body.py @@ -0,0 +1,17 @@ +from typing import List, Optional + +from pydantic import BaseModel, ConfigDict + +from ..models.source_range_prompt import SourceRangePrompt + + +class TextToCadIterationBody(BaseModel): + """Body for generating models from text.""" + + original_source_code: str + + prompt: Optional[str] = None + + source_ranges: List[SourceRangePrompt] + + model_config = ConfigDict(protected_namespaces=()) diff --git a/kittycad/models/text_to_cad_model.py b/kittycad/models/text_to_cad_model.py index 213a905ed..a4eb39b4a 100644 --- a/kittycad/models/text_to_cad_model.py +++ b/kittycad/models/text_to_cad_model.py @@ -8,6 +8,8 @@ class TextToCadModel(str, Enum): CAD = "cad" """# KCL. """ # noqa: E501 KCL = "kcl" + """# KCL iteration. """ # noqa: E501 + KCL_ITERATION = "kcl_iteration" def __str__(self) -> str: return str(self.value) diff --git a/spec.json b/spec.json index 560fccb9e..111b2d89c 100644 --- a/spec.json +++ b/spec.json @@ -194,47 +194,47 @@ } } }, - "/ai-prompts": { - "get": { + "/ai/text-to-cad/{output_format}": { + "post": { "tags": [ - "ml", - "hidden" + "ml" ], - "summary": "List all AI prompts.", - "description": "For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a Zoo employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.", - "operationId": "list_ai_prompts", + "summary": "Generate a CAD model from text.", + "description": "Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.\nThis operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\nOne thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.", + "operationId": "create_text_to_cad", "parameters": [ { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", + "in": "path", + "name": "output_format", + "description": "The format the output file should be converted to.", + "required": true, "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 + "$ref": "#/components/schemas/FileExportFormat" } }, { "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", + "name": "kcl", + "description": "If we should output the kcl for the model.", "schema": { "nullable": true, - "type": "string" - } - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "type": "boolean" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TextToCadCreateBody" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -272,7 +272,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AiPromptResultsPage" + "$ref": "#/components/schemas/TextToCad" } } } @@ -283,36 +283,29 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - } - }, - "/ai-prompts/{id}": { - "get": { + }, + "options": { "tags": [ - "ml", "hidden" ], - "summary": "Get an AI prompt.", - "description": "This endpoint requires authentication by a Zoo employee.", - "operationId": "get_ai_prompt", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_text_to_cad", "parameters": [ { "in": "path", - "name": "id", - "description": "The id of the model to give feedback to.", + "name": "output_format", + "description": "The format the output file should be converted to.", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/FileExportFormat" } } ], "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -346,13 +339,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiPrompt" - } - } } }, "4XX": { @@ -364,27 +350,29 @@ } } }, - "/ai/kcl/completions": { - "post": { + "/api-call-metrics": { + "get": { "tags": [ - "ml", - "beta" + "api-calls", + "hidden" ], - "summary": "Generate code completions for KCL.", - "operationId": "create_kcl_code_completions", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KclCodeCompletionRequest" - } + "summary": "Get API call metrics.", + "description": "This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "in": "query", + "name": "group_by", + "description": "What field to group the metrics by.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy" } - }, - "required": true - }, + } + ], "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -422,7 +410,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/KclCodeCompletionResponse" + "title": "Array_of_ApiCallQueryGroup", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup" + } } } } @@ -434,17 +426,49 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/api-calls": { + "get": { "tags": [ + "api-calls", "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_kcl_code_completions", + "summary": "List API calls.", + "description": "This endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + } + ], "responses": { - "204": { - "description": "successful operation, no content", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -478,6 +502,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } } }, "4XX": { @@ -486,50 +517,36 @@ "5XX": { "$ref": "#/components/responses/Error" } + }, + "x-dropshot-pagination": { + "required": [] } } }, - "/ai/text-to-cad/{output_format}": { - "post": { + "/api-calls/{id}": { + "get": { "tags": [ - "ml" + "api-calls", + "hidden" ], - "summary": "Generate a CAD model from text.", - "description": "Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.\nThis operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\nOne thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.", - "operationId": "create_text_to_cad", + "summary": "Get details of an API call.", + "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly Zoo employees can view API calls for other users.", + "operationId": "get_api_call", "parameters": [ { "in": "path", - "name": "output_format", - "description": "The format the output file should be converted to.", + "name": "id", + "description": "The ID of the API call.", "required": true, "schema": { - "$ref": "#/components/schemas/FileExportFormat" - } - }, - { - "in": "query", - "name": "kcl", - "description": "If we should output the kcl for the model.", - "schema": { - "nullable": true, - "type": "boolean" + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TextToCadCreateBody" - } - } - }, - "required": true - }, "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -567,7 +584,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TextToCad" + "$ref": "#/components/schemas/ApiCallWithPrice" } } } @@ -579,25 +596,25 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/apps/github/callback": { + "get": { "tags": [ + "apps", "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_text_to_cad", - "parameters": [ - { - "in": "path", - "name": "output_format", - "description": "The format the output file should be converted to.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileExportFormat" + "summary": "Listen for callbacks to GitHub app authentication.", + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "operationId": "apps_github_callback", + "requestBody": { + "content": { + "application/json": { + "schema": {} } - } - ], + }, + "required": true + }, "responses": { "204": { "description": "successful operation, no content", @@ -645,26 +662,15 @@ } } }, - "/api-call-metrics": { + "/apps/github/consent": { "get": { "tags": [ - "api-calls", + "apps", "hidden" ], - "summary": "Get API call metrics.", - "description": "This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.", - "operationId": "get_api_call_metrics", - "parameters": [ - { - "in": "query", - "name": "group_by", - "description": "What field to group the metrics by.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ApiCallQueryGroupBy" - } - } - ], + "summary": "Get the consent URL for GitHub app authentication.", + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "operationId": "apps_github_consent", "responses": { "200": { "description": "successful operation", @@ -705,11 +711,7 @@ "content": { "application/json": { "schema": { - "title": "Array_of_ApiCallQueryGroup", - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiCallQueryGroup" - } + "$ref": "#/components/schemas/AppClientInfo" } } } @@ -723,47 +725,29 @@ } } }, - "/api-calls": { - "get": { + "/apps/github/webhook": { + "post": { "tags": [ - "api-calls", + "apps", "hidden" ], - "summary": "List API calls.", - "description": "This endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls", - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - } - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" + "summary": "Listen for GitHub webhooks.", + "description": "These come from the GitHub app.", + "operationId": "apps_github_webhook", + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } } }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - } - } - ], + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -797,13 +781,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } } }, "4XX": { @@ -812,36 +789,18 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - } - }, - "/api-calls/{id}": { - "get": { + }, + "options": { "tags": [ - "api-calls", "hidden" ], - "summary": "Get details of an API call.", - "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly Zoo employees can view API calls for other users.", - "operationId": "get_api_call", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the API call.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_apps_github_webhook", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -875,13 +834,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } } }, "4XX": { @@ -893,26 +845,55 @@ } } }, - "/apps/github/callback": { + "/async/operations": { "get": { "tags": [ - "apps", + "api-calls", "hidden" ], - "summary": "Listen for callbacks to GitHub app authentication.", - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", - "operationId": "apps_github_callback", - "requestBody": { - "content": { - "application/json": { - "schema": {} + "summary": "List async operations.", + "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a Zoo employee.", + "operationId": "list_async_operations", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 } }, - "required": true - }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + }, + { + "in": "query", + "name": "status", + "description": "The status to filter by.", + "schema": { + "$ref": "#/components/schemas/ApiCallStatus" + } + } + ], "responses": { - "204": { - "description": "successful operation, no content", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -946,6 +927,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallResultsPage" + } + } } }, "4XX": { @@ -954,18 +942,32 @@ "5XX": { "$ref": "#/components/responses/Error" } + }, + "x-dropshot-pagination": { + "required": [] } } }, - "/apps/github/consent": { + "/async/operations/{id}": { "get": { "tags": [ - "apps", - "hidden" + "api-calls" + ], + "summary": "Get an async operation.", + "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly Zoo employees with the proper access can view async operations for other users.", + "operationId": "get_async_operation", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the async operation.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get the consent URL for GitHub app authentication.", - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", - "operationId": "apps_github_consent", "responses": { "200": { "description": "successful operation", @@ -1006,7 +1008,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AppClientInfo" + "$ref": "#/components/schemas/AsyncApiCallOutput" } } } @@ -1020,29 +1022,26 @@ } } }, - "/apps/github/webhook": { + "/auth/email": { "post": { "tags": [ - "apps", "hidden" ], - "summary": "Listen for GitHub webhooks.", - "description": "These come from the GitHub app.", - "operationId": "apps_github_webhook", + "summary": "Create an email verification request for a user.", + "operationId": "auth_email", "requestBody": { "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/EmailAuthenticationForm" } } }, "required": true }, "responses": { - "204": { - "description": "successful operation, no content", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1076,6 +1075,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerificationTokenResponse" + } + } } }, "4XX": { @@ -1092,7 +1098,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_apps_github_webhook", + "operationId": "options_auth_email", "responses": { "204": { "description": "successful operation, no content", @@ -1140,55 +1146,47 @@ } } }, - "/async/operations": { + "/auth/email/callback": { "get": { "tags": [ - "api-calls", "hidden" ], - "summary": "List async operations.", - "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a Zoo employee.", - "operationId": "list_async_operations", + "summary": "Listen for callbacks for email verification for users.", + "operationId": "auth_email_callback", "parameters": [ { "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", + "name": "callback_url", + "description": "The URL to redirect back to after we have authenticated.", "schema": { "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 + "type": "string", + "format": "uri" } }, { "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "in": "query", - "name": "sort_by", + "name": "email", + "description": "The user's email.", + "required": true, "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "type": "string", + "format": "email" } }, { "in": "query", - "name": "status", - "description": "The status to filter by.", + "name": "token", + "description": "The verification token.", + "required": true, "schema": { - "$ref": "#/components/schemas/ApiCallStatus" + "type": "string" } } ], "responses": { - "200": { - "description": "successful operation", + "302": { + "description": "Temporary Redirect", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1221,12 +1219,13 @@ "schema": { "type": "string" } - } - }, - "content": { - "application/json": { + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, "schema": { - "$ref": "#/components/schemas/AsyncApiCallResultsPage" + "type": "string" } } } @@ -1237,35 +1236,41 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } } }, - "/async/operations/{id}": { + "/auth/saml/provider/{provider_id}/login": { "get": { "tags": [ - "api-calls" + "hidden" ], - "summary": "Get an async operation.", - "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly Zoo employees with the proper access can view async operations for other users.", - "operationId": "get_async_operation", + "summary": "Get a redirect straight to the SAML IdP.", + "description": "The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.", + "operationId": "get_auth_saml", "parameters": [ { "in": "path", - "name": "id", - "description": "The ID of the async operation.", + "name": "provider_id", + "description": "The ID of the identity provider.", "required": true, "schema": { + "$ref": "#/components/schemas/Uuid" + } + }, + { + "in": "query", + "name": "callback_url", + "description": "The URL to redirect back to after we have authenticated.", + "schema": { + "nullable": true, "type": "string", - "format": "uuid" + "format": "uri" } } ], "responses": { - "200": { - "description": "successful operation", + "302": { + "description": "Temporary Redirect", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1299,13 +1304,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } } }, "4XX": { @@ -1315,28 +1313,38 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/auth/email": { + }, "post": { "tags": [ "hidden" ], - "summary": "Create an email verification request for a user.", - "operationId": "auth_email", + "summary": "Authenticate a user via SAML", + "operationId": "post_auth_saml", + "parameters": [ + { + "in": "path", + "name": "provider_id", + "description": "The ID of the identity provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Uuid" + } + } + ], "requestBody": { "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/EmailAuthenticationForm" + "type": "string", + "format": "binary" } } }, "required": true }, "responses": { - "201": { - "description": "successful creation", + "302": { + "description": "Temporary Redirect", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1369,12 +1377,13 @@ "schema": { "type": "string" } - } - }, - "content": { - "application/json": { + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, "schema": { - "$ref": "#/components/schemas/VerificationTokenResponse" + "type": "string" } } } @@ -1393,7 +1402,18 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_auth_email", + "operationId": "options_auth_saml", + "parameters": [ + { + "in": "path", + "name": "provider_id", + "description": "The ID of the identity provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Uuid" + } + } + ], "responses": { "204": { "description": "successful operation, no content", @@ -1441,47 +1461,29 @@ } } }, - "/auth/email/callback": { - "get": { + "/debug/uploads": { + "post": { "tags": [ + "meta", "hidden" ], - "summary": "Listen for callbacks for email verification for users.", - "operationId": "auth_email_callback", - "parameters": [ - { - "in": "query", - "name": "callback_url", - "description": "The URL to redirect back to after we have authenticated.", - "schema": { - "nullable": true, - "type": "string", - "format": "uri" - } - }, - { - "in": "query", - "name": "email", - "description": "The user's email.", - "required": true, - "schema": { - "type": "string", - "format": "email" + "summary": "Uploads files to public blob storage for debugging purposes.", + "description": "Do NOT send files here that you don't want to be public.", + "operationId": "create_debug_uploads", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "string", + "format": "binary" + } } }, - { - "in": "query", - "name": "token", - "description": "The verification token.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { - "302": { - "description": "Temporary Redirect", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1514,13 +1516,17 @@ "schema": { "type": "string" } - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "style": "simple", - "required": true, + } + }, + "content": { + "application/json": { "schema": { - "type": "string" + "title": "Array_of_Url", + "type": "array", + "items": { + "type": "string", + "format": "uri" + } } } } @@ -1532,40 +1538,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/auth/saml/provider/{provider_id}/login": { - "get": { + }, + "options": { "tags": [ "hidden" ], - "summary": "Get a redirect straight to the SAML IdP.", - "description": "The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.", - "operationId": "get_auth_saml", - "parameters": [ - { - "in": "path", - "name": "provider_id", - "description": "The ID of the identity provider.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Uuid" - } - }, - { - "in": "query", - "name": "callback_url", - "description": "The URL to redirect back to after we have authenticated.", - "schema": { - "nullable": true, - "type": "string", - "format": "uri" - } - } - ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_create_debug_uploads", "responses": { - "302": { - "description": "Temporary Redirect", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1608,38 +1591,31 @@ "$ref": "#/components/responses/Error" } } - }, + } + }, + "/events": { "post": { "tags": [ + "meta", "hidden" ], - "summary": "Authenticate a user via SAML", - "operationId": "post_auth_saml", - "parameters": [ - { - "in": "path", - "name": "provider_id", - "description": "The ID of the identity provider.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Uuid" - } - } - ], + "summary": "Creates an internal telemetry event.", + "description": "We collect anonymous telemetry data for improving our product.", + "operationId": "create_event", "requestBody": { + "description": "Telemetry requests", "content": { - "application/octet-stream": { + "multipart/form-data": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/Event" } } }, "required": true }, "responses": { - "302": { - "description": "Temporary Redirect", + "204": { + "description": "resource updated", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1672,14 +1648,6 @@ "schema": { "type": "string" } - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } } } }, @@ -1697,18 +1665,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_auth_saml", - "parameters": [ - { - "in": "path", - "name": "provider_id", - "description": "The ID of the identity provider.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Uuid" - } - } - ], + "operationId": "options_create_event", "responses": { "204": { "description": "successful operation, no content", @@ -1756,18 +1713,36 @@ } } }, - "/debug/uploads": { + "/file/center-of-mass": { "post": { "tags": [ - "meta", - "hidden" + "file" + ], + "summary": "Get CAD file center of mass.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cartesian coordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_center_of_mass", + "parameters": [ + { + "in": "query", + "name": "output_unit", + "description": "The output unit for the center of mass.", + "schema": { + "$ref": "#/components/schemas/UnitLength" + } + }, + { + "in": "query", + "name": "src_format", + "description": "The format of the file.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileImportFormat" + } + } ], - "summary": "Uploads files to public blob storage for debugging purposes.", - "description": "Do NOT send files here that you don't want to be public.", - "operationId": "create_debug_uploads", "requestBody": { "content": { - "multipart/form-data": { + "application/octet-stream": { "schema": { "type": "string", "format": "binary" @@ -1816,12 +1791,7 @@ "content": { "application/json": { "schema": { - "title": "Array_of_Url", - "type": "array", - "items": { - "type": "string", - "format": "uri" - } + "$ref": "#/components/schemas/FileCenterOfMass" } } } @@ -1840,7 +1810,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_debug_uploads", + "operationId": "options_file_center_of_mass", "responses": { "204": { "description": "successful operation, no content", @@ -1888,29 +1858,48 @@ } } }, - "/events": { + "/file/conversion/{src_format}/{output_format}": { "post": { "tags": [ - "meta", - "hidden" + "file" + ], + "summary": "Convert CAD file with defaults.", + "description": "If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.\nConvert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_conversion", + "parameters": [ + { + "in": "path", + "name": "output_format", + "description": "The format the file should be converted to.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileExportFormat" + } + }, + { + "in": "path", + "name": "src_format", + "description": "The format of the file to convert.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileImportFormat" + } + } ], - "summary": "Creates an internal telemetry event.", - "description": "We collect anonymous telemetry data for improving our product.", - "operationId": "create_event", "requestBody": { - "description": "Telemetry requests", "content": { - "multipart/form-data": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/Event" + "type": "string", + "format": "binary" } } }, "required": true }, "responses": { - "204": { - "description": "resource updated", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1944,6 +1933,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversion" + } + } } }, "4XX": { @@ -1960,7 +1956,27 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_event", + "operationId": "options_file_conversion", + "parameters": [ + { + "in": "path", + "name": "output_format", + "description": "The format the file should be converted to.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileExportFormat" + } + }, + { + "in": "path", + "name": "src_format", + "description": "The format of the file to convert.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileImportFormat" + } + } + ], "responses": { "204": { "description": "successful operation, no content", @@ -2008,21 +2024,39 @@ } } }, - "/file/center-of-mass": { + "/file/density": { "post": { "tags": [ "file" ], - "summary": "Get CAD file center of mass.", - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cartesian coordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_center_of_mass", + "summary": "Get CAD file density.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_density", "parameters": [ + { + "in": "query", + "name": "material_mass", + "description": "The material mass.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + }, + { + "in": "query", + "name": "material_mass_unit", + "description": "The unit of the material mass.", + "schema": { + "$ref": "#/components/schemas/UnitMass" + } + }, { "in": "query", "name": "output_unit", - "description": "The output unit for the center of mass.", + "description": "The output unit for the density.", "schema": { - "$ref": "#/components/schemas/UnitLength" + "$ref": "#/components/schemas/UnitDensity" } }, { @@ -2086,7 +2120,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileCenterOfMass" + "$ref": "#/components/schemas/FileDensity" } } } @@ -2105,7 +2139,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_center_of_mass", + "operationId": "options_file_density", "responses": { "204": { "description": "successful operation, no content", @@ -2153,31 +2187,31 @@ } } }, - "/file/conversion/{src_format}/{output_format}": { + "/file/execute/{lang}": { "post": { "tags": [ - "file" + "executor", + "hidden" ], - "summary": "Convert CAD file with defaults.", - "description": "If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.\nConvert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_conversion", + "summary": "Execute a Zoo program in a specific language.", + "operationId": "create_file_execution", "parameters": [ { "in": "path", - "name": "output_format", - "description": "The format the file should be converted to.", + "name": "lang", + "description": "The language of the code.", "required": true, "schema": { - "$ref": "#/components/schemas/FileExportFormat" + "$ref": "#/components/schemas/CodeLanguage" } }, { - "in": "path", - "name": "src_format", - "description": "The format of the file to convert.", - "required": true, + "in": "query", + "name": "output", + "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", "schema": { - "$ref": "#/components/schemas/FileImportFormat" + "nullable": true, + "type": "string" } } ], @@ -2232,7 +2266,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileConversion" + "$ref": "#/components/schemas/CodeOutput" } } } @@ -2251,24 +2285,15 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_conversion", + "operationId": "options_file_execution", "parameters": [ { "in": "path", - "name": "output_format", - "description": "The format the file should be converted to.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileExportFormat" - } - }, - { - "in": "path", - "name": "src_format", - "description": "The format of the file to convert.", + "name": "lang", + "description": "The language of the code.", "required": true, "schema": { - "$ref": "#/components/schemas/FileImportFormat" + "$ref": "#/components/schemas/CodeLanguage" } } ], @@ -2319,19 +2344,19 @@ } } }, - "/file/density": { + "/file/mass": { "post": { "tags": [ "file" ], - "summary": "Get CAD file density.", - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_density", + "summary": "Get CAD file mass.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_mass", "parameters": [ { "in": "query", - "name": "material_mass", - "description": "The material mass.", + "name": "material_density", + "description": "The material density.", "required": true, "schema": { "type": "number", @@ -2340,18 +2365,18 @@ }, { "in": "query", - "name": "material_mass_unit", - "description": "The unit of the material mass.", + "name": "material_density_unit", + "description": "The unit of the material density.", "schema": { - "$ref": "#/components/schemas/UnitMass" + "$ref": "#/components/schemas/UnitDensity" } }, { "in": "query", "name": "output_unit", - "description": "The output unit for the density.", + "description": "The output unit for the mass.", "schema": { - "$ref": "#/components/schemas/UnitDensity" + "$ref": "#/components/schemas/UnitMass" } }, { @@ -2415,7 +2440,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileDensity" + "$ref": "#/components/schemas/FileMass" } } } @@ -2434,7 +2459,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_density", + "operationId": "options_file_mass", "responses": { "204": { "description": "successful operation, no content", @@ -2482,31 +2507,30 @@ } } }, - "/file/execute/{lang}": { + "/file/surface-area": { "post": { "tags": [ - "executor", - "hidden" + "file" ], - "summary": "Execute a Zoo program in a specific language.", - "operationId": "create_file_execution", + "summary": "Get CAD file surface area.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the square measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_surface_area", "parameters": [ { - "in": "path", - "name": "lang", - "description": "The language of the code.", - "required": true, + "in": "query", + "name": "output_unit", + "description": "The output unit for the surface area.", "schema": { - "$ref": "#/components/schemas/CodeLanguage" + "$ref": "#/components/schemas/UnitArea" } }, { "in": "query", - "name": "output", - "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", + "name": "src_format", + "description": "The format of the file.", + "required": true, "schema": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/FileImportFormat" } } ], @@ -2561,7 +2585,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CodeOutput" + "$ref": "#/components/schemas/FileSurfaceArea" } } } @@ -2580,18 +2604,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_execution", - "parameters": [ - { - "in": "path", - "name": "lang", - "description": "The language of the code.", - "required": true, - "schema": { - "$ref": "#/components/schemas/CodeLanguage" - } - } - ], + "operationId": "options_file_surface_area", "responses": { "204": { "description": "successful operation, no content", @@ -2639,39 +2652,21 @@ } } }, - "/file/mass": { + "/file/volume": { "post": { "tags": [ "file" ], - "summary": "Get CAD file mass.", - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_mass", + "summary": "Get CAD file volume.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cubic measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_volume", "parameters": [ - { - "in": "query", - "name": "material_density", - "description": "The material density.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - }, - { - "in": "query", - "name": "material_density_unit", - "description": "The unit of the material density.", - "schema": { - "$ref": "#/components/schemas/UnitDensity" - } - }, { "in": "query", "name": "output_unit", - "description": "The output unit for the mass.", + "description": "The output unit for the volume.", "schema": { - "$ref": "#/components/schemas/UnitMass" + "$ref": "#/components/schemas/UnitVolume" } }, { @@ -2735,7 +2730,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileMass" + "$ref": "#/components/schemas/FileVolume" } } } @@ -2754,7 +2749,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_mass", + "operationId": "options_file_volume", "responses": { "204": { "description": "successful operation, no content", @@ -2802,47 +2797,29 @@ } } }, - "/file/surface-area": { - "post": { + "/internal/discord/api-token/{discord_id}": { + "get": { "tags": [ - "file" + "meta", + "hidden" ], - "summary": "Get CAD file surface area.", - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the square measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_surface_area", + "summary": "Get an API token for a user by their discord id.", + "description": "This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\nYou must be a Zoo employee to use this endpoint.", + "operationId": "internal_get_api_token_for_discord_user", "parameters": [ { - "in": "query", - "name": "output_unit", - "description": "The output unit for the surface area.", - "schema": { - "$ref": "#/components/schemas/UnitArea" - } - }, - { - "in": "query", - "name": "src_format", - "description": "The format of the file.", + "in": "path", + "name": "discord_id", + "description": "The user's discord ID.", "required": true, "schema": { - "$ref": "#/components/schemas/FileImportFormat" + "type": "string" } } ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -2880,7 +2857,70 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileSurfaceArea" + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/logout": { + "post": { + "tags": [ + "hidden" + ], + "summary": "This endpoint removes the session cookie for a user.", + "description": "This is used in logout scenarios.", + "operationId": "logout", + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" } } } @@ -2899,7 +2939,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_surface_area", + "operationId": "options_logout", "responses": { "204": { "description": "successful operation, no content", @@ -2947,47 +2987,125 @@ } } }, - "/file/volume": { - "post": { + "/ml-prompts": { + "get": { "tags": [ - "file" + "ml", + "hidden" ], - "summary": "Get CAD file volume.", - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cubic measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_volume", + "summary": "List all ML prompts.", + "description": "For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a Zoo employee.\nThe ML prompts are returned in order of creation, with the most recently created ML prompts first.", + "operationId": "list_ml_prompts", "parameters": [ { "in": "query", - "name": "output_unit", - "description": "The output unit for the volume.", + "name": "limit", + "description": "Maximum number of items returned by a single call", "schema": { - "$ref": "#/components/schemas/UnitVolume" + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 } }, { "in": "query", - "name": "src_format", - "description": "The format of the file.", - "required": true, + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", "schema": { - "$ref": "#/components/schemas/FileImportFormat" + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" } } ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MlPromptResultsPage" + } } } }, - "required": true + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/ml-prompts/{id}": { + "get": { + "tags": [ + "ml", + "hidden" + ], + "summary": "Get a ML prompt.", + "description": "This endpoint requires authentication by a Zoo employee.", + "operationId": "get_ml_prompt", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The id of the model to give feedback to.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3025,7 +3143,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileVolume" + "$ref": "#/components/schemas/MlPrompt" } } } @@ -3037,17 +3155,29 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/ml/kcl/completions": { + "post": { "tags": [ - "hidden" + "ml", + "beta" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_file_volume", + "summary": "Generate code completions for KCL.", + "operationId": "create_kcl_code_completions", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KclCodeCompletionRequest" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "successful operation, no content", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3081,6 +3211,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KclCodeCompletionResponse" + } + } } }, "4XX": { @@ -3090,31 +3227,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/internal/discord/api-token/{discord_id}": { - "get": { + }, + "options": { "tags": [ - "meta", "hidden" ], - "summary": "Get an API token for a user by their discord id.", - "description": "This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\nYou must be a Zoo employee to use this endpoint.", - "operationId": "internal_get_api_token_for_discord_user", - "parameters": [ - { - "in": "path", - "name": "discord_id", - "description": "The user's discord ID.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_kcl_code_completions", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3148,13 +3271,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } } }, "4XX": { @@ -3166,17 +3282,27 @@ } } }, - "/logout": { + "/ml/text-to-cad/iteration": { "post": { "tags": [ - "hidden" + "ml" ], - "summary": "This endpoint removes the session cookie for a user.", - "description": "This is used in logout scenarios.", - "operationId": "logout", + "summary": "Iterate on a CAD model with a prompt.", + "description": "This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_text_to_cad_iteration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TextToCadIterationBody" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "resource updated", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3209,13 +3335,12 @@ "schema": { "type": "string" } - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "style": "simple", - "required": true, + } + }, + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/TextToCadIteration" } } } @@ -3234,7 +3359,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_logout", + "operationId": "options_text_to_cad_iteration", "responses": { "204": { "description": "successful operation, no content", @@ -11523,7 +11648,7 @@ "description": "The feedback.", "required": true, "schema": { - "$ref": "#/components/schemas/AiFeedback" + "$ref": "#/components/schemas/MlFeedback" } } ], @@ -12440,306 +12565,112 @@ { "description": "The Apple account provider.", "type": "string", - "enum": [ - "apple" - ] - }, - { - "description": "The Discord account provider.", - "type": "string", - "enum": [ - "discord" - ] - }, - { - "description": "The Google account provider.", - "type": "string", - "enum": [ - "google" - ] - }, - { - "description": "The GitHub account provider.", - "type": "string", - "enum": [ - "github" - ] - }, - { - "description": "The Microsoft account provider.", - "type": "string", - "enum": [ - "microsoft" - ] - }, - { - "description": "The SAML account provider.", - "type": "string", - "enum": [ - "saml" - ] - }, - { - "description": "The Tencent QQ account provider.", - "type": "string", - "enum": [ - "tencent" - ] - } - ] - }, - "AddOrgMember": { - "description": "Data for adding a member to an org.", - "type": "object", - "properties": { - "email": { - "description": "The email address of the user to add to the org.", - "type": "string", - "format": "email" - }, - "role": { - "description": "The organization role to give the user.", - "allOf": [ - { - "$ref": "#/components/schemas/UserOrgRole" - } - ] - } - }, - "required": [ - "email", - "role" - ] - }, - "AddressDetails": { - "description": "Address details.", - "type": "object", - "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component. This is a two-letter ISO country code.", - "allOf": [ - { - "$ref": "#/components/schemas/CountryCode" - } - ] - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" - }, - "street2": { - "description": "The second street component.", - "type": "string" - }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "required": [ - "country" - ] - }, - "AiFeedback": { - "description": "Human feedback on an AI response.", - "oneOf": [ - { - "description": "Thumbs up.", - "type": "string", - "enum": [ - "thumbs_up" - ] - }, - { - "description": "Thumbs down.", - "type": "string", - "enum": [ - "thumbs_down" - ] - }, - { - "description": "Accepted.", - "type": "string", - "enum": [ - "accepted" - ] - }, - { - "description": "Rejected.", - "type": "string", - "enum": [ - "rejected" - ] - } - ] - }, - "AiPrompt": { - "description": "An AI prompt.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "title": "DateTime", - "description": "When the prompt was completed.", - "type": "string", - "format": "date-time" - }, - "created_at": { - "title": "DateTime", - "description": "The date and time the AI prompt was created.", - "type": "string", - "format": "date-time" - }, - "error": { - "nullable": true, - "description": "The error message if the prompt failed.", - "type": "string" - }, - "feedback": { - "nullable": true, - "description": "Feedback from the user, if any.", - "allOf": [ - { - "$ref": "#/components/schemas/AiFeedback" - } - ] - }, - "id": { - "description": "The unique identifier for the AI Prompt.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "metadata": { - "nullable": true, - "description": "The metadata for the prompt.", - "allOf": [ - { - "$ref": "#/components/schemas/AiPromptMetadata" - } - ] - }, - "model_version": { - "description": "The version of the model.", - "type": "string" + "enum": [ + "apple" + ] }, - "output_file": { - "nullable": true, - "description": "The output file. In the case of TextToCad this is a link to a file in a GCP bucket.", - "type": "string" + { + "description": "The Discord account provider.", + "type": "string", + "enum": [ + "discord" + ] }, - "prompt": { - "description": "The prompt.", - "type": "string" + { + "description": "The Google account provider.", + "type": "string", + "enum": [ + "google" + ] }, - "started_at": { - "nullable": true, - "title": "DateTime", - "description": "When the prompt was started.", + { + "description": "The GitHub account provider.", "type": "string", - "format": "date-time" + "enum": [ + "github" + ] }, - "status": { - "description": "The status of the prompt.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } + { + "description": "The Microsoft account provider.", + "type": "string", + "enum": [ + "microsoft" ] }, - "type": { - "description": "The type of prompt.", - "allOf": [ - { - "$ref": "#/components/schemas/AiPromptType" - } + { + "description": "The SAML account provider.", + "type": "string", + "enum": [ + "saml" ] }, - "updated_at": { - "title": "DateTime", - "description": "The date and time the AI prompt was last updated.", + { + "description": "The Tencent QQ account provider.", "type": "string", - "format": "date-time" + "enum": [ + "tencent" + ] + } + ] + }, + "AddOrgMember": { + "description": "Data for adding a member to an org.", + "type": "object", + "properties": { + "email": { + "description": "The email address of the user to add to the org.", + "type": "string", + "format": "email" }, - "user_id": { - "description": "The user ID of the user who created the AI Prompt.", + "role": { + "description": "The organization role to give the user.", "allOf": [ { - "$ref": "#/components/schemas/Uuid" + "$ref": "#/components/schemas/UserOrgRole" } ] } }, "required": [ - "created_at", - "id", - "model_version", - "prompt", - "status", - "type", - "updated_at", - "user_id" + "email", + "role" ] }, - "AiPromptMetadata": { - "description": "Metadata for an AI prompt.", + "AddressDetails": { + "description": "Address details.", "type": "object", "properties": { - "code": { - "nullable": true, - "description": "Code for the model.", + "city": { + "description": "The city component.", "type": "string" - } - } - }, - "AiPromptResultsPage": { - "description": "A single page of results", - "type": "object", - "properties": { - "items": { - "description": "list of items on this page of results", - "type": "array", - "items": { - "$ref": "#/components/schemas/AiPrompt" - } }, - "next_page": { - "nullable": true, - "description": "token used to fetch the next page of results (if any)", + "country": { + "description": "The country component. This is a two-letter ISO country code.", + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ] + }, + "state": { + "description": "The state component.", + "type": "string" + }, + "street1": { + "description": "The first street component.", + "type": "string" + }, + "street2": { + "description": "The second street component.", + "type": "string" + }, + "zip": { + "description": "The zip component.", "type": "string" } }, "required": [ - "items" - ] - }, - "AiPromptType": { - "description": "A type of AI prompt.", - "oneOf": [ - { - "description": "Text to CAD.", - "type": "string", - "enum": [ - "text_to_cad" - ] - }, - { - "description": "Text to KCL.", - "type": "string", - "enum": [ - "text_to_kcl" - ] - } + "country" ] }, "Angle": { @@ -14086,7 +14017,7 @@ "description": "Feedback from the user, if any.", "allOf": [ { - "$ref": "#/components/schemas/AiFeedback" + "$ref": "#/components/schemas/MlFeedback" } ] }, @@ -14179,6 +14110,127 @@ "updated_at", "user_id" ] + }, + { + "description": "Text to CAD iteration.", + "type": "object", + "properties": { + "code": { + "description": "The code for the new model.", + "type": "string" + }, + "completed_at": { + "nullable": true, + "title": "DateTime", + "description": "The time and date the API call was completed.", + "type": "string", + "format": "date-time" + }, + "created_at": { + "title": "DateTime", + "description": "The time and date the API call was created.", + "type": "string", + "format": "date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "feedback": { + "nullable": true, + "description": "Feedback from the user, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/MlFeedback" + } + ] + }, + "id": { + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "model": { + "description": "The model being used.", + "allOf": [ + { + "$ref": "#/components/schemas/TextToCadModel" + } + ] + }, + "model_version": { + "description": "The version of the model.", + "type": "string" + }, + "original_source_code": { + "description": "The original source code for the model, previous to the changes.", + "type": "string" + }, + "prompt": { + "nullable": true, + "description": "The prompt for the overall changes. This is optional if you only want changes on specific source ranges.", + "type": "string" + }, + "source_ranges": { + "description": "The source ranges the user suggested to change.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceRangePrompt" + } + }, + "started_at": { + "nullable": true, + "title": "DateTime", + "description": "The time and date the API call was started.", + "type": "string", + "format": "date-time" + }, + "status": { + "description": "The status of the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "text_to_cad_iteration" + ] + }, + "updated_at": { + "title": "DateTime", + "description": "The time and date the API call was last updated.", + "type": "string", + "format": "date-time" + }, + "user_id": { + "description": "The user ID of the user who created the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + } + }, + "required": [ + "code", + "created_at", + "id", + "model", + "model_version", + "original_source_code", + "source_ranges", + "status", + "type", + "updated_at", + "user_id" + ] } ] }, @@ -14254,6 +14306,13 @@ "enum": [ "text_to_cad" ] + }, + { + "description": "Text to CAD iteration.", + "type": "string", + "enum": [ + "text_to_cad_iteration" + ] } ] }, @@ -18497,98 +18556,311 @@ } ] }, - "git_hash": { - "description": "The git hash of the server.", + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "description": "Metadata about our pub-sub connection.", + "allOf": [ + { + "$ref": "#/components/schemas/Connection" + } + ] + } + }, + "required": [ + "cache", + "environment", + "fs", + "git_hash", + "pubsub" + ] + }, + "Method": { + "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", + "oneOf": [ + { + "description": "The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1).", + "type": "string", + "enum": [ + "OPTIONS" + ] + }, + { + "description": "The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).", + "type": "string", + "enum": [ + "GET" + ] + }, + { + "description": "The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).", + "type": "string", + "enum": [ + "POST" + ] + }, + { + "description": "The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).", + "type": "string", + "enum": [ + "PUT" + ] + }, + { + "description": "The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5).", + "type": "string", + "enum": [ + "DELETE" + ] + }, + { + "description": "The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2).", + "type": "string", + "enum": [ + "HEAD" + ] + }, + { + "description": "The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3).", + "type": "string", + "enum": [ + "TRACE" + ] + }, + { + "description": "The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6).", + "type": "string", + "enum": [ + "CONNECT" + ] + }, + { + "description": "The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789).", + "type": "string", + "enum": [ + "PATCH" + ] + }, + { + "description": "A catch all.", + "type": "string", + "enum": [ + "EXTENSION" + ] + } + ] + }, + "MlFeedback": { + "description": "Human feedback on an ML response.", + "oneOf": [ + { + "description": "Thumbs up.", + "type": "string", + "enum": [ + "thumbs_up" + ] + }, + { + "description": "Thumbs down.", + "type": "string", + "enum": [ + "thumbs_down" + ] + }, + { + "description": "Accepted.", + "type": "string", + "enum": [ + "accepted" + ] + }, + { + "description": "Rejected.", + "type": "string", + "enum": [ + "rejected" + ] + } + ] + }, + "MlPrompt": { + "description": "A ML prompt.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "title": "DateTime", + "description": "When the prompt was completed.", + "type": "string", + "format": "date-time" + }, + "created_at": { + "title": "DateTime", + "description": "The date and time the ML prompt was created.", + "type": "string", + "format": "date-time" + }, + "error": { + "nullable": true, + "description": "The error message if the prompt failed.", + "type": "string" + }, + "feedback": { + "nullable": true, + "description": "Feedback from the user, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/MlFeedback" + } + ] + }, + "id": { + "description": "The unique identifier for the ML prompt.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "metadata": { + "nullable": true, + "description": "The metadata for the prompt.", + "allOf": [ + { + "$ref": "#/components/schemas/MlPromptMetadata" + } + ] + }, + "model_version": { + "description": "The version of the model.", + "type": "string" + }, + "output_file": { + "nullable": true, + "description": "The output file. In the case of TextToCad this is a link to a file in a GCP bucket.", + "type": "string" + }, + "prompt": { + "description": "The prompt.", + "type": "string" + }, + "started_at": { + "nullable": true, + "title": "DateTime", + "description": "When the prompt was started.", + "type": "string", + "format": "date-time" + }, + "status": { + "description": "The status of the prompt.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ] + }, + "type": { + "description": "The type of prompt.", + "allOf": [ + { + "$ref": "#/components/schemas/MlPromptType" + } + ] + }, + "updated_at": { + "title": "DateTime", + "description": "The date and time the ML prompt was last updated.", + "type": "string", + "format": "date-time" + }, + "user_id": { + "description": "The user ID of the user who created the ML prompt.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + } + }, + "required": [ + "created_at", + "id", + "model_version", + "prompt", + "status", + "type", + "updated_at", + "user_id" + ] + }, + "MlPromptMetadata": { + "description": "Metadata for a ML prompt.", + "type": "object", + "properties": { + "code": { + "nullable": true, + "description": "Code for the model.", + "type": "string" + }, + "original_source_code": { + "nullable": true, + "description": "The original source code for the model.", + "type": "string" + }, + "source_ranges": { + "description": "The source ranges the user suggested to change.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceRangePrompt" + } + } + } + }, + "MlPromptResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/MlPrompt" + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", "type": "string" - }, - "pubsub": { - "description": "Metadata about our pub-sub connection.", - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ] } }, "required": [ - "cache", - "environment", - "fs", - "git_hash", - "pubsub" + "items" ] }, - "Method": { - "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", + "MlPromptType": { + "description": "A type of ML prompt.", "oneOf": [ { - "description": "The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1).", - "type": "string", - "enum": [ - "OPTIONS" - ] - }, - { - "description": "The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).", - "type": "string", - "enum": [ - "GET" - ] - }, - { - "description": "The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).", - "type": "string", - "enum": [ - "POST" - ] - }, - { - "description": "The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).", - "type": "string", - "enum": [ - "PUT" - ] - }, - { - "description": "The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5).", - "type": "string", - "enum": [ - "DELETE" - ] - }, - { - "description": "The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2).", - "type": "string", - "enum": [ - "HEAD" - ] - }, - { - "description": "The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3).", - "type": "string", - "enum": [ - "TRACE" - ] - }, - { - "description": "The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6).", + "description": "Text to CAD.", "type": "string", "enum": [ - "CONNECT" + "text_to_cad" ] }, { - "description": "The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789).", + "description": "Text to KCL.", "type": "string", "enum": [ - "PATCH" + "text_to_kcl" ] }, { - "description": "A catch all.", + "description": "Text to Kcl iteration,", "type": "string", "enum": [ - "EXTENSION" + "text_to_kcl_iteration" ] } ] @@ -25023,6 +25295,76 @@ } } }, + "SourcePosition": { + "description": "A position in the source code.", + "type": "object", + "properties": { + "column": { + "description": "The column number.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "line": { + "description": "The line number.", + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + "required": [ + "column", + "line" + ] + }, + "SourceRange": { + "description": "A source range of code.", + "type": "object", + "properties": { + "end": { + "description": "The end of the range.", + "allOf": [ + { + "$ref": "#/components/schemas/SourcePosition" + } + ] + }, + "start": { + "description": "The start of the range.", + "allOf": [ + { + "$ref": "#/components/schemas/SourcePosition" + } + ] + } + }, + "required": [ + "end", + "start" + ] + }, + "SourceRangePrompt": { + "description": "A source range and prompt for a text to CAD iteration.", + "type": "object", + "properties": { + "prompt": { + "description": "The prompt for the changes.", + "type": "string" + }, + "range": { + "description": "The range of the source code to change.", + "allOf": [ + { + "$ref": "#/components/schemas/SourceRange" + } + ] + } + }, + "required": [ + "prompt", + "range" + ] + }, "StlStorage": { "description": "Export storage.", "oneOf": [ @@ -25381,7 +25723,7 @@ "description": "Feedback from the user, if any.", "allOf": [ { - "$ref": "#/components/schemas/AiFeedback" + "$ref": "#/components/schemas/MlFeedback" } ] }, @@ -25481,6 +25823,146 @@ "prompt" ] }, + "TextToCadIteration": { + "description": "A response from a text to CAD iteration.", + "type": "object", + "properties": { + "code": { + "description": "The code for the new model.", + "type": "string" + }, + "completed_at": { + "nullable": true, + "title": "DateTime", + "description": "The time and date the API call was completed.", + "type": "string", + "format": "date-time" + }, + "created_at": { + "title": "DateTime", + "description": "The time and date the API call was created.", + "type": "string", + "format": "date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "feedback": { + "nullable": true, + "description": "Feedback from the user, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/MlFeedback" + } + ] + }, + "id": { + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "model": { + "description": "The model being used.", + "allOf": [ + { + "$ref": "#/components/schemas/TextToCadModel" + } + ] + }, + "model_version": { + "description": "The version of the model.", + "type": "string" + }, + "original_source_code": { + "description": "The original source code for the model, previous to the changes.", + "type": "string" + }, + "prompt": { + "nullable": true, + "description": "The prompt for the overall changes. This is optional if you only want changes on specific source ranges.", + "type": "string" + }, + "source_ranges": { + "description": "The source ranges the user suggested to change.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceRangePrompt" + } + }, + "started_at": { + "nullable": true, + "title": "DateTime", + "description": "The time and date the API call was started.", + "type": "string", + "format": "date-time" + }, + "status": { + "description": "The status of the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus" + } + ] + }, + "updated_at": { + "title": "DateTime", + "description": "The time and date the API call was last updated.", + "type": "string", + "format": "date-time" + }, + "user_id": { + "description": "The user ID of the user who created the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + } + }, + "required": [ + "code", + "created_at", + "id", + "model", + "model_version", + "original_source_code", + "source_ranges", + "status", + "updated_at", + "user_id" + ] + }, + "TextToCadIterationBody": { + "description": "Body for generating models from text.", + "type": "object", + "properties": { + "original_source_code": { + "description": "The source code for the model (in kcl) that is to be edited.", + "type": "string" + }, + "prompt": { + "nullable": true, + "description": "The prompt for the model, if not using source ranges.", + "type": "string" + }, + "source_ranges": { + "description": "The source ranges the user suggested to change. If empty, the prompt will be used and is required.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SourceRangePrompt" + } + } + }, + "required": [ + "original_source_code", + "source_ranges" + ] + }, "TextToCadModel": { "description": "A type of Text-to-CAD model.", "oneOf": [ @@ -25497,6 +25979,13 @@ "enum": [ "kcl" ] + }, + { + "description": "KCL iteration.", + "type": "string", + "enum": [ + "kcl_iteration" + ] } ] },