Update api spec (#182)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,10 +1,50 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
|
"path": "/paths/~1user~1payment~1balance/get/x-python",
|
||||||
"value": {
|
"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 == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1apps~1github~1callback/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1methods/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1mass/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -25,74 +65,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1center-of-mass/post/x-python",
|
"path": "/paths/~1file~1density/post/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n",
|
"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 == 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_center_of_mass.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.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[\n Union[ApiToken, Error]\n ] = internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.internal_get_api_token_for_discord_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1methods/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ai-prompts~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-calls/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ws~1modeling~1commands/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.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 unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n ) as websocket:\n # Send a message.\n websocket.send(\n WebSocketRequest(\n sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"<string>\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n )\n )\n )\n\n # Get a message.\n message = websocket.recv()\n print(message)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1users-extended~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -103,6 +79,14 @@
|
|||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1users-extended~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1apps~1github~1webhook/post/x-python",
|
"path": "/paths/~1apps~1github~1webhook/post/x-python",
|
||||||
@ -111,294 +95,6 @@
|
|||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1invoices/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1users~1{id}~1api-calls/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1session~1{token}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1async~1operations/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1api-call-metrics/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ai-prompts/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPromptResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1auth~1email~1callback/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"<string>\",\n token=\"<string>\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1text-to-cad/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n 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 )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1async~1operations~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n 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=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n ] = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1file~1density/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-tokens/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1api-tokens/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1balance/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1users~1{id}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ping/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1onboarding/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1.well-known~1ai-plugin.json/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1auth~1email/post/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user/delete/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user/put/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1apps~1github~1callback/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1user~1payment~1tax/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1apps~1github~1consent/get/x-python",
|
"path": "/paths/~1apps~1github~1consent/get/x-python",
|
||||||
@ -409,50 +105,66 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1api-calls/get/x-python",
|
"path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1logout/post/x-python",
|
"path": "/paths/~1/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
"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.hidden.logout.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1execute~1{lang}/post/x-python",
|
"path": "/paths/~1user~1text-to-cad/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n 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 if isinstance(result, Error) or result == 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.executor.create_file_execution.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1volume/post/x-python",
|
"path": "/paths/~1ping/get/x-python",
|
||||||
"value": {
|
"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 == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1_meta~1info/get/x-python",
|
"path": "/paths/~1async~1operations/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1openai~1openapi.json/get/x-python",
|
"path": "/paths/~1user/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user/put/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user/delete/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -463,30 +175,6 @@
|
|||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1ws~1executor~1term/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n with create_executor_term.sync(\n client=client,\n ) as websocket:\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"op": "add",
|
|
||||||
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
|
|
||||||
"value": {
|
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n",
|
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1payment/post/x-python",
|
"path": "/paths/~1user~1payment/post/x-python",
|
||||||
@ -521,42 +209,42 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1api-calls~1{id}/get/x-python",
|
"path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
"value": {
|
"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=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1mass/post/x-python",
|
"path": "/paths/~1file~1execute~1{lang}/post/x-python",
|
||||||
"value": {
|
"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 == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1payment~1intent/post/x-python",
|
"path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == 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.payments.create_payment_intent_for_user.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1file~1surface-area/post/x-python",
|
"path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
"value": {
|
"value": {
|
||||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1user~1api-tokens~1{token}/delete/x-python",
|
"path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
"value": {
|
"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=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n",
|
||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -567,6 +255,286 @@
|
|||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens~1{token}/delete/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ai-prompts/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPromptResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~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[\n Union[ApiToken, Error]\n ] = internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.internal_get_api_token_for_discord_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1invoices/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1intent/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1async~1operations~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n 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=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n ] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1onboarding/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1center-of-mass/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-tokens/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1users~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1auth~1email~1callback/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"<string>\",\n token=\"<string>\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1users~1{id}~1api-calls/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ws~1executor~1term/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n with create_executor_term.sync(\n client=client,\n ) as websocket:\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1api-call-metrics/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1logout/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ws~1modeling~1commands/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.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 unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n ) as websocket:\n # Send a message.\n websocket.send(\n WebSocketRequest(\n sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"<string>\",\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/~1user~1api-calls/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1tax/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import 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 == 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/~1_meta~1info/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1ai-prompts~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1api-calls~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1surface-area/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1api-calls/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1file~1volume/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1auth~1email/post/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/paths/~1users-extended/get/x-python",
|
"path": "/paths/~1users-extended/get/x-python",
|
||||||
@ -575,6 +543,22 @@
|
|||||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1user~1session~1{token}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
||||||
|
"value": {
|
||||||
|
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n",
|
||||||
|
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"op": "add",
|
"op": "add",
|
||||||
"path": "/info/x-python",
|
"path": "/info/x-python",
|
||||||
|
@ -1 +1 @@
|
|||||||
""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501
|
""" Contains methods for accessing the ai API paths: AI uses machine learning to generate CAD models. """ # noqa: E501
|
||||||
|
@ -15,6 +15,7 @@ def _get_kwargs(
|
|||||||
client: Client,
|
client: Client,
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
no_models: Optional[bool] = None,
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/user/text-to-cad".format(
|
url = "{}/user/text-to-cad".format(
|
||||||
client.base_url,
|
client.base_url,
|
||||||
@ -38,6 +39,12 @@ def _get_kwargs(
|
|||||||
else:
|
else:
|
||||||
url = url + "?sort_by=" + str(sort_by)
|
url = url + "?sort_by=" + str(sort_by)
|
||||||
|
|
||||||
|
if no_models is not None:
|
||||||
|
if "?" in url:
|
||||||
|
url = url + "&no_models=" + str(no_models)
|
||||||
|
else:
|
||||||
|
url = url + "?no_models=" + str(no_models)
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
|
|
||||||
@ -81,11 +88,13 @@ def sync_detailed(
|
|||||||
client: Client,
|
client: Client,
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
no_models: Optional[bool] = None,
|
||||||
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
|
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
limit=limit,
|
limit=limit,
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
no_models=no_models,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -103,6 +112,7 @@ def sync(
|
|||||||
client: Client,
|
client: Client,
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
no_models: Optional[bool] = None,
|
||||||
) -> Optional[Union[TextToCadResultsPage, Error]]:
|
) -> Optional[Union[TextToCadResultsPage, Error]]:
|
||||||
"""This will always return the STEP file contents as well as the format the user originally requested.
|
"""This will always return the STEP file contents as well as the format the user originally requested.
|
||||||
This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
|
This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
|
||||||
@ -113,6 +123,7 @@ def sync(
|
|||||||
limit=limit,
|
limit=limit,
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
no_models=no_models,
|
||||||
client=client,
|
client=client,
|
||||||
).parsed
|
).parsed
|
||||||
|
|
||||||
@ -123,11 +134,13 @@ async def asyncio_detailed(
|
|||||||
client: Client,
|
client: Client,
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
no_models: Optional[bool] = None,
|
||||||
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
|
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
limit=limit,
|
limit=limit,
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
no_models=no_models,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -143,6 +156,7 @@ async def asyncio(
|
|||||||
client: Client,
|
client: Client,
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
page_token: Optional[str] = None,
|
page_token: Optional[str] = None,
|
||||||
|
no_models: Optional[bool] = None,
|
||||||
) -> Optional[Union[TextToCadResultsPage, Error]]:
|
) -> Optional[Union[TextToCadResultsPage, Error]]:
|
||||||
"""This will always return the STEP file contents as well as the format the user originally requested.
|
"""This will always return the STEP file contents as well as the format the user originally requested.
|
||||||
This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
|
This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
|
||||||
@ -154,6 +168,7 @@ async def asyncio(
|
|||||||
limit=limit,
|
limit=limit,
|
||||||
page_token=page_token,
|
page_token=page_token,
|
||||||
sort_by=sort_by,
|
sort_by=sort_by,
|
||||||
|
no_models=no_models,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
).parsed
|
).parsed
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.ai_plugin_manifest import AiPluginManifest
|
|
||||||
from ...models.error import Error
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/.well-known/ai-plugin.json".format(
|
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(
|
|
||||||
*, response: httpx.Response
|
|
||||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = AiPluginManifest(**response.json())
|
|
||||||
return response_200
|
|
||||||
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[AiPluginManifest, Error]]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.get(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.get(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[AiPluginManifest, Error]]:
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -1,104 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.error import Error
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/openai/openapi.json".format(
|
|
||||||
client.base_url,
|
|
||||||
) # noqa: E501
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = response.json()
|
|
||||||
return response_200
|
|
||||||
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[dict, Error]]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.get(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[dict, Error]]:
|
|
||||||
"""This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Optional[Union[dict, Error]]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.get(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[dict, Error]]:
|
|
||||||
"""This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -42,9 +42,7 @@ from kittycad.api.file import (
|
|||||||
)
|
)
|
||||||
from kittycad.api.hidden import auth_email, auth_email_callback, logout
|
from kittycad.api.hidden import auth_email, auth_email_callback, logout
|
||||||
from kittycad.api.meta import (
|
from kittycad.api.meta import (
|
||||||
get_ai_plugin_manifest,
|
|
||||||
get_metadata,
|
get_metadata,
|
||||||
get_openai_schema,
|
|
||||||
get_schema,
|
get_schema,
|
||||||
internal_get_api_token_for_discord_user,
|
internal_get_api_token_for_discord_user,
|
||||||
ping,
|
ping,
|
||||||
@ -91,7 +89,6 @@ from kittycad.api.users import (
|
|||||||
)
|
)
|
||||||
from kittycad.client import ClientFromEnv
|
from kittycad.client import ClientFromEnv
|
||||||
from kittycad.models import (
|
from kittycad.models import (
|
||||||
AiPluginManifest,
|
|
||||||
AiPrompt,
|
AiPrompt,
|
||||||
AiPromptResultsPage,
|
AiPromptResultsPage,
|
||||||
ApiCallQueryGroup,
|
ApiCallQueryGroup,
|
||||||
@ -203,51 +200,6 @@ async def test_get_schema_async():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
|
||||||
def test_get_ai_plugin_manifest():
|
|
||||||
# Create our client.
|
|
||||||
client = ClientFromEnv()
|
|
||||||
|
|
||||||
result: Optional[Union[AiPluginManifest, Error]] = get_ai_plugin_manifest.sync(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
if isinstance(result, Error) or result is None:
|
|
||||||
print(result)
|
|
||||||
raise Exception("Error in response")
|
|
||||||
|
|
||||||
body: AiPluginManifest = result
|
|
||||||
print(body)
|
|
||||||
|
|
||||||
# OR if you need more info (e.g. status_code)
|
|
||||||
response: Response[
|
|
||||||
Optional[Union[AiPluginManifest, Error]]
|
|
||||||
] = get_ai_plugin_manifest.sync_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# OR run async
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.skip
|
|
||||||
async def test_get_ai_plugin_manifest_async():
|
|
||||||
# Create our client.
|
|
||||||
client = ClientFromEnv()
|
|
||||||
|
|
||||||
result: Optional[
|
|
||||||
Union[AiPluginManifest, Error]
|
|
||||||
] = await get_ai_plugin_manifest.asyncio(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
# OR run async with more info
|
|
||||||
response: Response[
|
|
||||||
Optional[Union[AiPluginManifest, Error]]
|
|
||||||
] = await get_ai_plugin_manifest.asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
@pytest.mark.skip
|
||||||
def test_get_metadata():
|
def test_get_metadata():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -1491,38 +1443,6 @@ async def test_logout_async():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
|
||||||
def test_get_openai_schema():
|
|
||||||
# Create our client.
|
|
||||||
client = ClientFromEnv()
|
|
||||||
|
|
||||||
get_openai_schema.sync(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
# OR if you need more info (e.g. status_code)
|
|
||||||
get_openai_schema.sync_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# OR run async
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.skip
|
|
||||||
async def test_get_openai_schema_async():
|
|
||||||
# Create our client.
|
|
||||||
client = ClientFromEnv()
|
|
||||||
|
|
||||||
await get_openai_schema.asyncio(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
# OR run async with more info
|
|
||||||
await get_openai_schema.asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
@pytest.mark.skip
|
||||||
def test_ping():
|
def test_ping():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -3403,6 +3323,7 @@ def test_list_text_to_cad_models_for_user():
|
|||||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||||
limit=None, # Optional[int]
|
limit=None, # Optional[int]
|
||||||
page_token=None, # Optional[str]
|
page_token=None, # Optional[str]
|
||||||
|
no_models=None, # Optional[bool]
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(result, Error) or result is None:
|
if isinstance(result, Error) or result is None:
|
||||||
@ -3420,6 +3341,7 @@ def test_list_text_to_cad_models_for_user():
|
|||||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||||
limit=None, # Optional[int]
|
limit=None, # Optional[int]
|
||||||
page_token=None, # Optional[str]
|
page_token=None, # Optional[str]
|
||||||
|
no_models=None, # Optional[bool]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -3437,6 +3359,7 @@ async def test_list_text_to_cad_models_for_user_async():
|
|||||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||||
limit=None, # Optional[int]
|
limit=None, # Optional[int]
|
||||||
page_token=None, # Optional[str]
|
page_token=None, # Optional[str]
|
||||||
|
no_models=None, # Optional[bool]
|
||||||
)
|
)
|
||||||
|
|
||||||
# OR run async with more info
|
# OR run async with more info
|
||||||
@ -3447,6 +3370,7 @@ async def test_list_text_to_cad_models_for_user_async():
|
|||||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||||
limit=None, # Optional[int]
|
limit=None, # Optional[int]
|
||||||
page_token=None, # Optional[str]
|
page_token=None, # Optional[str]
|
||||||
|
no_models=None, # Optional[bool]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
from .account_provider import AccountProvider
|
from .account_provider import AccountProvider
|
||||||
from .ai_feedback import AiFeedback
|
from .ai_feedback import AiFeedback
|
||||||
from .ai_plugin_api import AiPluginApi
|
|
||||||
from .ai_plugin_api_type import AiPluginApiType
|
|
||||||
from .ai_plugin_auth import AiPluginAuth
|
|
||||||
from .ai_plugin_auth_type import AiPluginAuthType
|
|
||||||
from .ai_plugin_http_auth_type import AiPluginHttpAuthType
|
|
||||||
from .ai_plugin_manifest import AiPluginManifest
|
|
||||||
from .ai_prompt import AiPrompt
|
from .ai_prompt import AiPrompt
|
||||||
from .ai_prompt_results_page import AiPromptResultsPage
|
from .ai_prompt_results_page import AiPromptResultsPage
|
||||||
from .ai_prompt_type import AiPromptType
|
from .ai_prompt_type import AiPromptType
|
||||||
@ -35,6 +29,7 @@ from .async_api_call_type import AsyncApiCallType
|
|||||||
from .axis import Axis
|
from .axis import Axis
|
||||||
from .axis_direction_pair import AxisDirectionPair
|
from .axis_direction_pair import AxisDirectionPair
|
||||||
from .billing_info import BillingInfo
|
from .billing_info import BillingInfo
|
||||||
|
from .block_reason import BlockReason
|
||||||
from .cache_metadata import CacheMetadata
|
from .cache_metadata import CacheMetadata
|
||||||
from .camera_drag_interaction_type import CameraDragInteractionType
|
from .camera_drag_interaction_type import CameraDragInteractionType
|
||||||
from .card_details import CardDetails
|
from .card_details import CardDetails
|
||||||
@ -137,6 +132,7 @@ from .payment_intent import PaymentIntent
|
|||||||
from .payment_method import PaymentMethod
|
from .payment_method import PaymentMethod
|
||||||
from .payment_method_card_checks import PaymentMethodCardChecks
|
from .payment_method_card_checks import PaymentMethodCardChecks
|
||||||
from .payment_method_type import PaymentMethodType
|
from .payment_method_type import PaymentMethodType
|
||||||
|
from .perspective_camera_parameters import PerspectiveCameraParameters
|
||||||
from .plane_intersect_and_project import PlaneIntersectAndProject
|
from .plane_intersect_and_project import PlaneIntersectAndProject
|
||||||
from .ply_storage import PlyStorage
|
from .ply_storage import PlyStorage
|
||||||
from .point2d import Point2d
|
from .point2d import Point2d
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
from typing import Optional
|
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
|
|
||||||
from ..models.ai_plugin_api_type import AiPluginApiType
|
|
||||||
|
|
||||||
|
|
||||||
class AiPluginApi(BaseModel):
|
|
||||||
"""AI plugin api information."""
|
|
||||||
|
|
||||||
is_user_authenticated: Optional[bool] = None
|
|
||||||
|
|
||||||
type: Optional[AiPluginApiType] = None
|
|
||||||
|
|
||||||
url: str
|
|
@ -1,11 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class AiPluginApiType(str, Enum):
|
|
||||||
"""AI plugin api type.""" # noqa: E501
|
|
||||||
|
|
||||||
"""# An OpenAPI specification. """ # noqa: E501
|
|
||||||
OPENAPI = "openapi"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -1,14 +0,0 @@
|
|||||||
from typing import Optional
|
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
|
|
||||||
from ..models.ai_plugin_auth_type import AiPluginAuthType
|
|
||||||
from ..models.ai_plugin_http_auth_type import AiPluginHttpAuthType
|
|
||||||
|
|
||||||
|
|
||||||
class AiPluginAuth(BaseModel):
|
|
||||||
"""AI plugin auth information."""
|
|
||||||
|
|
||||||
authorization_type: Optional[AiPluginHttpAuthType] = None
|
|
||||||
|
|
||||||
type: Optional[AiPluginAuthType] = None
|
|
@ -1,17 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class AiPluginAuthType(str, Enum):
|
|
||||||
"""AI plugin auth type.""" # noqa: E501
|
|
||||||
|
|
||||||
"""# None. """ # noqa: E501
|
|
||||||
NONE = "none"
|
|
||||||
"""# User http. """ # noqa: E501
|
|
||||||
USER_HTTP = "user_http"
|
|
||||||
"""# Service http. """ # noqa: E501
|
|
||||||
SERVICE_HTTP = "service_http"
|
|
||||||
"""# OAuth. """ # noqa: E501
|
|
||||||
OAUTH = "oauth"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -1,13 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class AiPluginHttpAuthType(str, Enum):
|
|
||||||
"""AI plugin http auth type.""" # noqa: E501
|
|
||||||
|
|
||||||
"""# Basic. """ # noqa: E501
|
|
||||||
BASIC = "basic"
|
|
||||||
"""# Bearer. """ # noqa: E501
|
|
||||||
BEARER = "bearer"
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -1,33 +0,0 @@
|
|||||||
from typing import Optional
|
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
|
|
||||||
from ..models.ai_plugin_api import AiPluginApi
|
|
||||||
from ..models.ai_plugin_auth import AiPluginAuth
|
|
||||||
|
|
||||||
|
|
||||||
class AiPluginManifest(BaseModel):
|
|
||||||
"""AI plugin manifest.
|
|
||||||
|
|
||||||
This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).
|
|
||||||
"""
|
|
||||||
|
|
||||||
api: AiPluginApi
|
|
||||||
|
|
||||||
auth: AiPluginAuth
|
|
||||||
|
|
||||||
contact_email: Optional[str] = None
|
|
||||||
|
|
||||||
description_for_human: Optional[str] = None
|
|
||||||
|
|
||||||
description_for_model: Optional[str] = None
|
|
||||||
|
|
||||||
legal_info_url: str
|
|
||||||
|
|
||||||
logo_url: str
|
|
||||||
|
|
||||||
name_for_human: Optional[str] = None
|
|
||||||
|
|
||||||
name_for_model: Optional[str] = None
|
|
||||||
|
|
||||||
schema_version: Optional[str] = None
|
|
13
kittycad/models/block_reason.py
Normal file
13
kittycad/models/block_reason.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class BlockReason(str, Enum):
|
||||||
|
"""The reason for blocking a user.""" # noqa: E501
|
||||||
|
|
||||||
|
"""# The user is missing a payment method and has exceeded their free API call credits for the month. """ # noqa: E501
|
||||||
|
MISSING_PAYMENT_METHOD = "missing_payment_method"
|
||||||
|
"""# The users payment method has failed. """ # noqa: E501
|
||||||
|
PAYMENT_METHOD_FAILED = "payment_method_failed"
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
@ -1,4 +1,4 @@
|
|||||||
from typing import Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
@ -13,4 +13,8 @@ class Coupon(BaseModel):
|
|||||||
|
|
||||||
id: Optional[str] = None
|
id: Optional[str] = None
|
||||||
|
|
||||||
|
metadata: Optional[Dict[str, str]] = None
|
||||||
|
|
||||||
|
name: Optional[str] = None
|
||||||
|
|
||||||
percent_off: Optional[float] = None
|
percent_off: Optional[float] = None
|
||||||
|
@ -13,6 +13,7 @@ class EntityType(str, Enum):
|
|||||||
EDGE = "edge"
|
EDGE = "edge"
|
||||||
FACE = "face"
|
FACE = "face"
|
||||||
PLANE = "plane"
|
PLANE = "plane"
|
||||||
|
VERTEX = "vertex"
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -3,15 +3,18 @@ from typing import Optional
|
|||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
from ..models.block_reason import BlockReason
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
|
|
||||||
|
|
||||||
class ExtendedUser(BaseModel):
|
class ExtendedUser(BaseModel):
|
||||||
"""Extended user information.
|
"""Extended user information.
|
||||||
|
|
||||||
This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front
|
This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp | Stripe
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
block: Optional[BlockReason] = None
|
||||||
|
|
||||||
company: Optional[str] = None
|
company: Optional[str] = None
|
||||||
|
|
||||||
created_at: datetime.datetime
|
created_at: datetime.datetime
|
||||||
|
@ -4,8 +4,6 @@ from enum import Enum
|
|||||||
class InvoiceStatus(str, Enum):
|
class InvoiceStatus(str, Enum):
|
||||||
"""An enum representing the possible values of an `Invoice`'s `status` field.""" # noqa: E501
|
"""An enum representing the possible values of an `Invoice`'s `status` field.""" # noqa: E501
|
||||||
|
|
||||||
"""# Deleted. """ # noqa: E501
|
|
||||||
DELETED = "deleted"
|
|
||||||
"""# Draft. """ # noqa: E501
|
"""# Draft. """ # noqa: E501
|
||||||
DRAFT = "draft"
|
DRAFT = "draft"
|
||||||
"""# Open. """ # noqa: E501
|
"""# Open. """ # noqa: E501
|
||||||
|
@ -8,6 +8,7 @@ from ..models.annotation_type import AnnotationType
|
|||||||
from ..models.camera_drag_interaction_type import CameraDragInteractionType
|
from ..models.camera_drag_interaction_type import CameraDragInteractionType
|
||||||
from ..models.color import Color
|
from ..models.color import Color
|
||||||
from ..models.distance_type import DistanceType
|
from ..models.distance_type import DistanceType
|
||||||
|
from ..models.entity_type import EntityType
|
||||||
from ..models.image_format import ImageFormat
|
from ..models.image_format import ImageFormat
|
||||||
from ..models.import_file import ImportFile
|
from ..models.import_file import ImportFile
|
||||||
from ..models.input_format import InputFormat
|
from ..models.input_format import InputFormat
|
||||||
@ -16,6 +17,7 @@ from ..models.output_format import OutputFormat
|
|||||||
from ..models.path_component_constraint_bound import PathComponentConstraintBound
|
from ..models.path_component_constraint_bound import PathComponentConstraintBound
|
||||||
from ..models.path_component_constraint_type import PathComponentConstraintType
|
from ..models.path_component_constraint_type import PathComponentConstraintType
|
||||||
from ..models.path_segment import PathSegment
|
from ..models.path_segment import PathSegment
|
||||||
|
from ..models.perspective_camera_parameters import PerspectiveCameraParameters
|
||||||
from ..models.point2d import Point2d
|
from ..models.point2d import Point2d
|
||||||
from ..models.point3d import Point3d
|
from ..models.point3d import Point3d
|
||||||
from ..models.scene_selection_type import SceneSelectionType
|
from ..models.scene_selection_type import SceneSelectionType
|
||||||
@ -783,6 +785,36 @@ class entity_linear_pattern(BaseModel):
|
|||||||
type: Literal["entity_linear_pattern"] = "entity_linear_pattern"
|
type: Literal["entity_linear_pattern"] = "entity_linear_pattern"
|
||||||
|
|
||||||
|
|
||||||
|
class set_selection_type(BaseModel):
|
||||||
|
"""When you select some entity with the current tool, what should happen to the entity?"""
|
||||||
|
|
||||||
|
selection_type: SceneSelectionType
|
||||||
|
|
||||||
|
type: Literal["set_selection_type"] = "set_selection_type"
|
||||||
|
|
||||||
|
|
||||||
|
class set_selection_filter(BaseModel):
|
||||||
|
"""What kind of entities can be selected?"""
|
||||||
|
|
||||||
|
filter: List[EntityType]
|
||||||
|
|
||||||
|
type: Literal["set_selection_filter"] = "set_selection_filter"
|
||||||
|
|
||||||
|
|
||||||
|
class default_camera_set_orthographic(BaseModel):
|
||||||
|
"""Use orthographic projection."""
|
||||||
|
|
||||||
|
type: Literal["default_camera_set_orthographic"] = "default_camera_set_orthographic"
|
||||||
|
|
||||||
|
|
||||||
|
class default_camera_set_perspective(BaseModel):
|
||||||
|
"""Use perspective projection."""
|
||||||
|
|
||||||
|
parameters: Optional[PerspectiveCameraParameters] = None
|
||||||
|
|
||||||
|
type: Literal["default_camera_set_perspective"] = "default_camera_set_perspective"
|
||||||
|
|
||||||
|
|
||||||
ModelingCmd = RootModel[
|
ModelingCmd = RootModel[
|
||||||
Annotated[
|
Annotated[
|
||||||
Union[
|
Union[
|
||||||
@ -861,6 +893,10 @@ ModelingCmd = RootModel[
|
|||||||
object_set_material_params_pbr,
|
object_set_material_params_pbr,
|
||||||
entity_get_distance,
|
entity_get_distance,
|
||||||
entity_linear_pattern,
|
entity_linear_pattern,
|
||||||
|
set_selection_type,
|
||||||
|
set_selection_filter,
|
||||||
|
default_camera_set_orthographic,
|
||||||
|
default_camera_set_perspective,
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
Field(discriminator="type"),
|
||||||
]
|
]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import datetime
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
@ -7,12 +8,8 @@ from pydantic import BaseModel
|
|||||||
class Onboarding(BaseModel):
|
class Onboarding(BaseModel):
|
||||||
"""Onboarding details"""
|
"""Onboarding details"""
|
||||||
|
|
||||||
first_call_from_modeling_app_date: Optional[str] = None
|
first_call_from_modeling_app_date: Optional[datetime.datetime] = None
|
||||||
|
|
||||||
first_call_from_text_to_cad_date: Optional[str] = None
|
first_call_from_text_to_cad_date: Optional[datetime.datetime] = None
|
||||||
|
|
||||||
first_call_from_their_machine_date: Optional[str] = None
|
first_token_date: Optional[datetime.datetime] = None
|
||||||
|
|
||||||
first_litterbox_execute_date: Optional[str] = None
|
|
||||||
|
|
||||||
first_token_date: Optional[str] = None
|
|
||||||
|
13
kittycad/models/perspective_camera_parameters.py
Normal file
13
kittycad/models/perspective_camera_parameters.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class PerspectiveCameraParameters(BaseModel):
|
||||||
|
"""Defines a perspective view."""
|
||||||
|
|
||||||
|
fov_y: float
|
||||||
|
|
||||||
|
z_far: float
|
||||||
|
|
||||||
|
z_near: float
|
@ -3,12 +3,15 @@ from typing import Optional
|
|||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
from ..models.block_reason import BlockReason
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
|
|
||||||
|
|
||||||
class User(BaseModel):
|
class User(BaseModel):
|
||||||
"""A user."""
|
"""A user."""
|
||||||
|
|
||||||
|
block: Optional[BlockReason] = None
|
||||||
|
|
||||||
company: Optional[str] = None
|
company: Optional[str] = None
|
||||||
|
|
||||||
created_at: datetime.datetime
|
created_at: datetime.datetime
|
||||||
|
531
spec.json
531
spec.json
@ -69,68 +69,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/.well-known/ai-plugin.json": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"meta",
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"summary": "Get AI plugin manifest.",
|
|
||||||
"operationId": "get_ai_plugin_manifest",
|
|
||||||
"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/AiPluginManifest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"4XX": {
|
|
||||||
"$ref": "#/components/responses/Error"
|
|
||||||
},
|
|
||||||
"5XX": {
|
|
||||||
"$ref": "#/components/responses/Error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/_meta/info": {
|
"/_meta/info": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -1403,8 +1341,7 @@
|
|||||||
"/file/center-of-mass": {
|
"/file/center-of-mass": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"file",
|
"file"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "Get CAD file center of mass.",
|
"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.",
|
"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.",
|
||||||
@ -1715,8 +1652,7 @@
|
|||||||
"/file/density": {
|
"/file/density": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"file",
|
"file"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "Get CAD file density.",
|
"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.",
|
"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.",
|
||||||
@ -2036,8 +1972,7 @@
|
|||||||
"/file/mass": {
|
"/file/mass": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"file",
|
"file"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "Get CAD file mass.",
|
"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.",
|
"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.",
|
||||||
@ -2200,8 +2135,7 @@
|
|||||||
"/file/surface-area": {
|
"/file/surface-area": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"file",
|
"file"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "Get CAD file surface area.",
|
"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.",
|
"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.",
|
||||||
@ -2346,8 +2280,7 @@
|
|||||||
"/file/volume": {
|
"/file/volume": {
|
||||||
"post": {
|
"post": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"file",
|
"file"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "Get CAD file volume.",
|
"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.",
|
"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.",
|
||||||
@ -3276,67 +3209,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/openai/openapi.json": {
|
|
||||||
"get": {
|
|
||||||
"tags": [
|
|
||||||
"meta",
|
|
||||||
"hidden"
|
|
||||||
],
|
|
||||||
"summary": "Get AI plugin OpenAPI schema.",
|
|
||||||
"description": "This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.",
|
|
||||||
"operationId": "get_openai_schema",
|
|
||||||
"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": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"4XX": {
|
|
||||||
"$ref": "#/components/responses/Error"
|
|
||||||
},
|
|
||||||
"5XX": {
|
|
||||||
"$ref": "#/components/responses/Error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/ping": {
|
"/ping": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -6418,8 +6290,7 @@
|
|||||||
"/user/text-to-cad": {
|
"/user/text-to-cad": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"ai",
|
"ai"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "List text-to-CAD models you've generated.",
|
"summary": "List text-to-CAD models you've generated.",
|
||||||
"description": "This will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.",
|
"description": "This will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.",
|
||||||
@ -6451,6 +6322,15 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/CreatedAtSortMode"
|
"$ref": "#/components/schemas/CreatedAtSortMode"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"in": "query",
|
||||||
|
"name": "no_models",
|
||||||
|
"description": "If we should return the model file contents or just the metadata.",
|
||||||
|
"schema": {
|
||||||
|
"nullable": true,
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@ -6513,8 +6393,7 @@
|
|||||||
"/user/text-to-cad/{id}": {
|
"/user/text-to-cad/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"ai",
|
"ai"
|
||||||
"beta"
|
|
||||||
],
|
],
|
||||||
"summary": "Get a text-to-CAD response.",
|
"summary": "Get a text-to-CAD response.",
|
||||||
"description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.",
|
"description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.",
|
||||||
@ -7332,185 +7211,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"AiPluginApi": {
|
|
||||||
"description": "AI plugin api information.",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"is_user_authenticated": {
|
|
||||||
"description": "If the API is authenticated.",
|
|
||||||
"default": false,
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"description": "The type of API.",
|
|
||||||
"default": "openapi",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AiPluginApiType"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"url": {
|
|
||||||
"description": "The url to the API's schema.",
|
|
||||||
"type": "string",
|
|
||||||
"format": "uri"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"url"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AiPluginApiType": {
|
|
||||||
"description": "AI plugin api type.",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"description": "An OpenAPI specification.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"openapi"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AiPluginAuth": {
|
|
||||||
"description": "AI plugin auth information.",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"authorization_type": {
|
|
||||||
"nullable": true,
|
|
||||||
"description": "The type of http authorization.",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AiPluginHttpAuthType"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"description": "The type of authentication.",
|
|
||||||
"default": "none",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AiPluginAuthType"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AiPluginAuthType": {
|
|
||||||
"description": "AI plugin auth type.",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"description": "None.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"none"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "User http.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"user_http"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Service http.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"service_http"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "OAuth.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"oauth"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AiPluginHttpAuthType": {
|
|
||||||
"description": "AI plugin http auth type.",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"description": "Basic.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"basic"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Bearer.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"bearer"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AiPluginManifest": {
|
|
||||||
"description": "AI plugin manifest.\n\nThis is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).",
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"api": {
|
|
||||||
"description": "API specification.",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AiPluginApi"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"auth": {
|
|
||||||
"description": "Authentication schema.",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/schemas/AiPluginAuth"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"contact_email": {
|
|
||||||
"description": "Email contact for safety/moderation reachout, support, and deactivation.",
|
|
||||||
"type": "string",
|
|
||||||
"format": "email"
|
|
||||||
},
|
|
||||||
"description_for_human": {
|
|
||||||
"description": "Human-readable description of the plugin.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"description_for_model": {
|
|
||||||
"description": "Description better tailored to the model, such as token context length considerations or keyword usage for improved plugin prompting.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"legal_info_url": {
|
|
||||||
"description": "Redirect URL for users to view plugin information.",
|
|
||||||
"type": "string",
|
|
||||||
"format": "uri"
|
|
||||||
},
|
|
||||||
"logo_url": {
|
|
||||||
"description": "URL used to fetch the plugin's logo.",
|
|
||||||
"type": "string",
|
|
||||||
"format": "uri"
|
|
||||||
},
|
|
||||||
"name_for_human": {
|
|
||||||
"description": "Human-readable name, such as the full company name.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"name_for_model": {
|
|
||||||
"description": "Name the model will used to target the plugin.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"schema_version": {
|
|
||||||
"description": "Manifest schema version.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"api",
|
|
||||||
"auth",
|
|
||||||
"legal_info_url",
|
|
||||||
"logo_url"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"AiPrompt": {
|
"AiPrompt": {
|
||||||
"description": "An AI prompt.",
|
"description": "An AI prompt.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -9207,6 +8907,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"BlockReason": {
|
||||||
|
"description": "The reason for blocking a user.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "The user is missing a payment method and has exceeded their free API call credits for the month.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"missing_payment_method"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The users payment method has failed.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"payment_method_failed"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"CacheMetadata": {
|
"CacheMetadata": {
|
||||||
"description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.",
|
"description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -9861,6 +9580,19 @@
|
|||||||
"description": "Unique identifier for the object.",
|
"description": "Unique identifier for the object.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"metadata": {
|
||||||
|
"description": "Set of key-value pairs.",
|
||||||
|
"default": {},
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Name of the coupon displayed to customers on, for instance invoices, or receipts.\n\nBy default the `id` is shown if `name` is not set.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"percent_off": {
|
"percent_off": {
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
"description": "Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.\n\nFor example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.",
|
"description": "Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.\n\nFor example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.",
|
||||||
@ -10388,7 +10120,8 @@
|
|||||||
"solid3d",
|
"solid3d",
|
||||||
"edge",
|
"edge",
|
||||||
"face",
|
"face",
|
||||||
"plane"
|
"plane",
|
||||||
|
"vertex"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Environment": {
|
"Environment": {
|
||||||
@ -10541,9 +10274,18 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ExtendedUser": {
|
"ExtendedUser": {
|
||||||
"description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front",
|
"description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp | Stripe",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"block": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "If the user should be blocked and the reason why.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/BlockReason"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"company": {
|
"company": {
|
||||||
"description": "The user's company.",
|
"description": "The user's company.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -12055,13 +11797,6 @@
|
|||||||
"InvoiceStatus": {
|
"InvoiceStatus": {
|
||||||
"description": "An enum representing the possible values of an `Invoice`'s `status` field.",
|
"description": "An enum representing the possible values of an `Invoice`'s `status` field.",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
|
||||||
"description": "Deleted.",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"deleted"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Draft.",
|
"description": "Draft.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -14689,6 +14424,92 @@
|
|||||||
"spacing",
|
"spacing",
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "When you select some entity with the current tool, what should happen to the entity?",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"selection_type": {
|
||||||
|
"description": "What type of selection should occur when you select something?",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/SceneSelectionType"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"set_selection_type"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"selection_type",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "What kind of entities can be selected?",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"filter": {
|
||||||
|
"description": "If vector is empty, clear all filters. If vector is non-empty, only the given entity types will be selectable.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/EntityType"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"set_selection_filter"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"filter",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Use orthographic projection.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_set_orthographic"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Use perspective projection.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"parameters": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "If this is not given, use the same parameters as last time the perspective camera was used.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/PerspectiveCameraParameters"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_set_perspective"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -15641,24 +15462,25 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"first_call_from_modeling_app_date": {
|
"first_call_from_modeling_app_date": {
|
||||||
|
"nullable": true,
|
||||||
|
"title": "DateTime",
|
||||||
"description": "When the user first used the modeling app.",
|
"description": "When the user first used the modeling app.",
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
},
|
},
|
||||||
"first_call_from_text_to_cad_date": {
|
"first_call_from_text_to_cad_date": {
|
||||||
|
"nullable": true,
|
||||||
|
"title": "DateTime",
|
||||||
"description": "When the user first used text-to-CAD.",
|
"description": "When the user first used text-to-CAD.",
|
||||||
"type": "string"
|
"type": "string",
|
||||||
},
|
"format": "date-time"
|
||||||
"first_call_from_their_machine_date": {
|
|
||||||
"description": "When the user first called an endpoint from their machine (i.e. not a litterbox execution).",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"first_litterbox_execute_date": {
|
|
||||||
"description": "When the user first used the litterbox.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
},
|
||||||
"first_token_date": {
|
"first_token_date": {
|
||||||
|
"nullable": true,
|
||||||
|
"title": "DateTime",
|
||||||
"description": "When the user created their first token.",
|
"description": "When the user created their first token.",
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -16305,6 +16127,32 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"PerspectiveCameraParameters": {
|
||||||
|
"description": "Defines a perspective view.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"fov_y": {
|
||||||
|
"description": "Camera frustum vertical field of view.",
|
||||||
|
"type": "number",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"z_far": {
|
||||||
|
"description": "Camera frustum far plane.",
|
||||||
|
"type": "number",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"z_near": {
|
||||||
|
"description": "Camera frustum near plane.",
|
||||||
|
"type": "number",
|
||||||
|
"format": "float"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"fov_y",
|
||||||
|
"z_far",
|
||||||
|
"z_near"
|
||||||
|
]
|
||||||
|
},
|
||||||
"PlaneIntersectAndProject": {
|
"PlaneIntersectAndProject": {
|
||||||
"description": "Corresponding coordinates of given window coordinates, intersected on given plane.",
|
"description": "Corresponding coordinates of given window coordinates, intersected on given plane.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -18971,6 +18819,15 @@
|
|||||||
"description": "A user.",
|
"description": "A user.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"block": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "If the user should be blocked and the reason why.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/BlockReason"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"company": {
|
"company": {
|
||||||
"description": "The user's company.",
|
"description": "The user's company.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@ -19313,7 +19170,7 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"name": "ai",
|
"name": "ai",
|
||||||
"description": "AI uses machine learning to generate 3D meshes.",
|
"description": "AI uses machine learning to generate CAD models.",
|
||||||
"externalDocs": {
|
"externalDocs": {
|
||||||
"url": "https://docs.kittycad.io/api/ai"
|
"url": "https://docs.kittycad.io/api/ai"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user