diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 6097407da..eb774344e 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -31,6 +31,14 @@ "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.ml" } }, + { + "op": "add", + "path": "/paths/~1announcements/get/x-python", + "value": { + "example": "from kittycad.models import AnnouncementList\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_get_announcements():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: AnnouncementList = client.meta.get_announcements()\n\n\n body: AnnouncementList = result\n print(body)\n\n", + "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.meta" + } + }, { "op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", @@ -139,7 +147,7 @@ "op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": { - "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.models import FileCenterOfMass\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_center_of_mass():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileCenterOfMass = client.file.create_file_center_of_mass(src_format=FileImportFormat.FBX,\n output_unit=UnitLength.CM,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileCenterOfMass = result\n print(body)\n\n", + "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.models import FileCenterOfMass\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_center_of_mass():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileCenterOfMass = client.file.create_file_center_of_mass(src_format=FileImportFormat.ACIS,\n output_unit=UnitLength.CM,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileCenterOfMass = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -147,7 +155,7 @@ "op": "add", "path": "/paths/~1file~1conversion/post/x-python", "value": { - "example": "from kittycad.models.conversion_params import ConversionParams\nfrom kittycad.models.output_format3d import OptionStep\nfrom kittycad.models.system import System\nfrom kittycad.models.axis_direction_pair import AxisDirectionPair\nfrom kittycad.models.axis import Axis\nfrom kittycad.models.direction import Direction\nfrom kittycad.models.axis_direction_pair import AxisDirectionPair\nfrom kittycad.models.axis import Axis\nfrom kittycad.models.direction import Direction\nfrom kittycad.models.step_presentation import StepPresentation\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.models.output_format3d import OutputFormat3d\nfrom kittycad.models.input_format3d import OptionGltf\nfrom kittycad.models.input_format3d import InputFormat3d\nfrom pathlib import Path\nfrom typing import Dict\nfrom kittycad._io_types import SyncUpload\nfrom kittycad.models import FileConversion\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_conversion_options():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileConversion = client.file.create_file_conversion_options(body=ConversionParams(\n output_format=OutputFormat3d(OptionStep(\n coords=System(\n forward=AxisDirectionPair(\n axis=Axis.Y,\n direction=Direction.POSITIVE,\n ),\n up=AxisDirectionPair(\n axis=Axis.Y,\n direction=Direction.POSITIVE,\n ),\n ),\n presentation=StepPresentation.COMPACT,\n units=UnitLength.CM,\n )),\n src_format=InputFormat3d(OptionGltf()),\n ),\n file_attachments={\n \"main.kcl\": Path(\"path/to/main.kcl\"),\n \"helper.kcl\": Path(\"path/to/helper.kcl\"),\n })\n\n\n body: FileConversion = result\n print(body)\n\n", + "example": "from kittycad.models.conversion_params import ConversionParams\nfrom kittycad.models.output_format3d import OptionPly\nfrom kittycad.models.system import System\nfrom kittycad.models.axis_direction_pair import AxisDirectionPair\nfrom kittycad.models.axis import Axis\nfrom kittycad.models.direction import Direction\nfrom kittycad.models.axis_direction_pair import AxisDirectionPair\nfrom kittycad.models.axis import Axis\nfrom kittycad.models.direction import Direction\nfrom kittycad.models.selection import OptionDefaultScene\nfrom kittycad.models.selection import Selection\nfrom kittycad.models.ply_storage import PlyStorage\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.models.output_format3d import OutputFormat3d\nfrom kittycad.models.input_format3d import OptionCreo\nfrom kittycad.models.system import System\nfrom kittycad.models.axis_direction_pair import AxisDirectionPair\nfrom kittycad.models.axis import Axis\nfrom kittycad.models.direction import Direction\nfrom kittycad.models.axis_direction_pair import AxisDirectionPair\nfrom kittycad.models.axis import Axis\nfrom kittycad.models.direction import Direction\nfrom kittycad.models.input_format3d import InputFormat3d\nfrom pathlib import Path\nfrom typing import Dict\nfrom kittycad._io_types import SyncUpload\nfrom kittycad.models import FileConversion\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_conversion_options():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileConversion = client.file.create_file_conversion_options(body=ConversionParams(\n output_format=OutputFormat3d(OptionPly(\n coords=System(\n forward=AxisDirectionPair(\n axis=Axis.Y,\n direction=Direction.POSITIVE,\n ),\n up=AxisDirectionPair(\n axis=Axis.Y,\n direction=Direction.POSITIVE,\n ),\n ),\n selection=Selection(OptionDefaultScene()),\n storage=PlyStorage.ASCII,\n units=UnitLength.CM,\n )),\n src_format=InputFormat3d(OptionCreo(\n coords=System(\n forward=AxisDirectionPair(\n axis=Axis.Y,\n direction=Direction.POSITIVE,\n ),\n up=AxisDirectionPair(\n axis=Axis.Y,\n direction=Direction.POSITIVE,\n ),\n ),\n split_closed_faces=False,\n )),\n ),\n file_attachments={\n \"main.kcl\": Path(\"path/to/main.kcl\"),\n \"helper.kcl\": Path(\"path/to/helper.kcl\"),\n })\n\n\n body: FileConversion = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -155,7 +163,7 @@ "op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": { - "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models import FileConversion\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_conversion():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileConversion = client.file.create_file_conversion(src_format=FileImportFormat.FBX,\n output_format=FileExportFormat.FBX,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileConversion = result\n print(body)\n\n", + "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models import FileConversion\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_conversion():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileConversion = client.file.create_file_conversion(src_format=FileImportFormat.ACIS,\n output_format=FileExportFormat.FBX,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileConversion = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -163,7 +171,7 @@ "op": "add", "path": "/paths/~1file~1density/post/x-python", "value": { - "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models import FileDensity\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_density():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileDensity = client.file.create_file_density(src_format=FileImportFormat.FBX,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileDensity = result\n print(body)\n\n", + "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models import FileDensity\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_density():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileDensity = client.file.create_file_density(src_format=FileImportFormat.ACIS,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileDensity = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -179,7 +187,7 @@ "op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": { - "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.models import FileMass\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_mass():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileMass = client.file.create_file_mass(src_format=FileImportFormat.FBX,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileMass = result\n print(body)\n\n", + "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.models import FileMass\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_mass():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileMass = client.file.create_file_mass(src_format=FileImportFormat.ACIS,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileMass = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -187,7 +195,7 @@ "op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": { - "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.models import FileSurfaceArea\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_surface_area():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileSurfaceArea = client.file.create_file_surface_area(src_format=FileImportFormat.FBX,\n output_unit=UnitArea.CM2,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileSurfaceArea = result\n print(body)\n\n", + "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.models import FileSurfaceArea\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_surface_area():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileSurfaceArea = client.file.create_file_surface_area(src_format=FileImportFormat.ACIS,\n output_unit=UnitArea.CM2,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileSurfaceArea = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -195,7 +203,7 @@ "op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": { - "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.models import FileVolume\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_volume():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileVolume = client.file.create_file_volume(src_format=FileImportFormat.FBX,\n output_unit=UnitVolume.MM3,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileVolume = result\n print(body)\n\n", + "example": "from kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.models import FileVolume\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_file_volume():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: FileVolume = client.file.create_file_volume(src_format=FileImportFormat.ACIS,\n output_unit=UnitVolume.MM3,\n body=bytes('some bytes', 'utf-8'))\n\n\n body: FileVolume = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.file" } }, @@ -319,14 +327,6 @@ "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" } }, - { - "op": "add", - "path": "/paths/~1orgs~1{id}~1admin~1details/get/x-python", - "value": { - "example": "from kittycad.models.uuid import Uuid\nfrom kittycad.models.uuid import Uuid\nfrom kittycad.models import OrgAdminDetails\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_org_admin_details_get():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: OrgAdminDetails = client.orgs.org_admin_details_get(id=Uuid(\"\"))\n\n\n body: OrgAdminDetails = result\n print(body)\n\n", - "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" - } - }, { "op": "add", "path": "/paths/~1orgs~1{id}~1billing~1contract/get/x-python", @@ -403,7 +403,7 @@ "op": "add", "path": "/paths/~1org~1datasets/post/x-python", "value": { - "example": "from kittycad.models.create_org_dataset import CreateOrgDataset\nfrom kittycad.models.org_dataset_source import OrgDatasetSource\nfrom kittycad.models.storage_provider import StorageProvider\nfrom kittycad.models import OrgDataset\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_org_dataset():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: OrgDataset = client.orgs.create_org_dataset(body=CreateOrgDataset(\n name=\"\",\n source=OrgDatasetSource(\n provider=StorageProvider.S3,\n ),\n ))\n\n\n body: OrgDataset = result\n print(body)\n\n", + "example": "from kittycad.models.create_org_dataset import CreateOrgDataset\nfrom kittycad.models.org_dataset_source import OrgDatasetSource\nfrom kittycad.models.storage_provider import StorageProvider\nfrom kittycad.models import OrgDataset\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_org_dataset():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: OrgDataset = client.orgs.create_org_dataset(body=CreateOrgDataset(\n name=\"\",\n require_raw_kcl_similarity_score_for_success=False,\n source=OrgDatasetSource(\n provider=StorageProvider.S3,\n ),\n ))\n\n\n body: OrgDataset = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" } }, @@ -747,7 +747,7 @@ "op": "add", "path": "/paths/~1org~1saml~1idp/post/x-python", "value": { - "example": "from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate\nfrom kittycad.models.idp_metadata_source import OptionUrl\nfrom kittycad.models.idp_metadata_source import IdpMetadataSource\nfrom kittycad.models import SamlIdentityProvider\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_org_saml_idp():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: SamlIdentityProvider = client.orgs.create_org_saml_idp(body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=IdpMetadataSource(OptionUrl(\n url=\"\",\n )),\n technical_contact_email=\"\",\n ))\n\n\n body: SamlIdentityProvider = result\n print(body)\n\n", + "example": "from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate\nfrom kittycad.models.idp_metadata_source import OptionBase64EncodedXml\nfrom kittycad.models.base64data import Base64Data\nfrom kittycad.models.idp_metadata_source import IdpMetadataSource\nfrom kittycad.models import SamlIdentityProvider\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_org_saml_idp():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: SamlIdentityProvider = client.orgs.create_org_saml_idp(body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=IdpMetadataSource(OptionBase64EncodedXml(\n data=Base64Data(b\"\"),\n )),\n technical_contact_email=\"\",\n ))\n\n\n body: SamlIdentityProvider = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" } }, @@ -755,7 +755,7 @@ "op": "add", "path": "/paths/~1org~1saml~1idp/put/x-python", "value": { - "example": "from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate\nfrom kittycad.models.idp_metadata_source import OptionBase64EncodedXml\nfrom kittycad.models.base64data import Base64Data\nfrom kittycad.models.idp_metadata_source import IdpMetadataSource\nfrom kittycad.models import SamlIdentityProvider\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_update_org_saml_idp():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: SamlIdentityProvider = client.orgs.update_org_saml_idp(body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=IdpMetadataSource(OptionBase64EncodedXml(\n data=Base64Data(b\"\"),\n )),\n technical_contact_email=\"\",\n ))\n\n\n body: SamlIdentityProvider = result\n print(body)\n\n", + "example": "from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate\nfrom kittycad.models.idp_metadata_source import OptionUrl\nfrom kittycad.models.idp_metadata_source import IdpMetadataSource\nfrom kittycad.models import SamlIdentityProvider\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_update_org_saml_idp():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: SamlIdentityProvider = client.orgs.update_org_saml_idp(body=SamlIdentityProviderCreate(\n idp_entity_id=\"\",\n idp_metadata_source=IdpMetadataSource(OptionUrl(\n url=\"\",\n )),\n technical_contact_email=\"\",\n ))\n\n\n body: SamlIdentityProvider = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" } }, @@ -779,7 +779,7 @@ "op": "add", "path": "/paths/~1org~1service-accounts~1{token}/delete/x-python", "value": { - "example": "from kittycad.models.service_account_uuid import ServiceAccountUuid\ndef example_delete_service_account_for_org():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n client.service_accounts.delete_service_account_for_org(token=ServiceAccountUuid(\"\"))\n\n", + "example": "\n\ndef example_delete_service_account_for_org():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n client.service_accounts.delete_service_account_for_org(token=\"\")\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.service_accounts" } }, @@ -799,6 +799,14 @@ "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" } }, + { + "op": "add", + "path": "/paths/~1org~1skills/get/x-python", + "value": { + "example": "from kittycad.models import OrgSkillResponse\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_list_org_skills():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: List[OrgSkillResponse] = client.orgs.list_org_skills()\n\n\n body: List[OrgSkillResponse] = result\n print(body)\n\n", + "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.orgs" + } + }, { "op": "add", "path": "/paths/~1ping/get/x-python", @@ -1115,7 +1123,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": { - "example": "from kittycad.models import ApiToken\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_api_token_for_user():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: ApiToken = client.api_tokens.create_api_token_for_user(label=None)\n\n\n body: ApiToken = result\n print(body)\n\n", + "example": "from kittycad.models import ApiTokenWithFullToken\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_create_api_token_for_user():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n result: ApiTokenWithFullToken = client.api_tokens.create_api_token_for_user(label=None)\n\n\n body: ApiTokenWithFullToken = result\n print(body)\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.api_tokens" } }, @@ -1123,7 +1131,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": { - "example": "from kittycad.models.api_token_uuid import ApiTokenUuid\ndef example_delete_api_token_for_user():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n client.api_tokens.delete_api_token_for_user(token=ApiTokenUuid(\"\"))\n\n", + "example": "\n\ndef example_delete_api_token_for_user():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n client.api_tokens.delete_api_token_for_user(token=\"\")\n\n", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.api_tokens" } }, @@ -1611,7 +1619,7 @@ "op": "add", "path": "/paths/~1ws~1ml~1copilot/get/x-python", "value": { - "example": "from kittycad.models import MlCopilotClientMessage\nfrom kittycad.models.ml_copilot_client_message import OptionSystem\nfrom kittycad.models.ml_copilot_system_command import MlCopilotSystemCommand\nfrom kittycad.models import MlCopilotServerMessage\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_ml_copilot_ws():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n # Connect to the websocket.\n with client.ml.ml_copilot_ws(replay=None,\n conversation_id=None,\n pr=None) as websocket:\n\n # Send a message.\n websocket.send(MlCopilotClientMessage(OptionSystem(\ncommand=MlCopilotSystemCommand.NEW,\n)))\n\n # Get a message.\n message = websocket.recv()\n print(message)\n\n ", + "example": "from kittycad.models import MlCopilotClientMessage\nfrom kittycad.models.ml_copilot_client_message import OptionPing\nfrom kittycad.models import MlCopilotServerMessage\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_ml_copilot_ws():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n # Connect to the websocket.\n with client.ml.ml_copilot_ws(replay=None,\n conversation_id=None,\n pr=None) as websocket:\n\n # Send a message.\n websocket.send(MlCopilotClientMessage(OptionPing()))\n\n # Get a message.\n message = websocket.recv()\n print(message)\n\n ", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.ml" } }, @@ -1619,7 +1627,7 @@ "op": "add", "path": "/paths/~1ws~1ml~1reasoning~1{id}/get/x-python", "value": { - "example": "from kittycad.models import MlCopilotClientMessage\nfrom kittycad.models.ml_copilot_client_message import OptionSystem\nfrom kittycad.models.ml_copilot_system_command import MlCopilotSystemCommand\nfrom kittycad.models import MlCopilotServerMessage\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_ml_reasoning_ws():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n # Connect to the websocket.\n with client.ml.ml_reasoning_ws(id=\"\") as websocket:\n\n # Send a message.\n websocket.send(MlCopilotClientMessage(OptionSystem(\ncommand=MlCopilotSystemCommand.NEW,\n)))\n\n # Get a message.\n message = websocket.recv()\n print(message)\n\n ", + "example": "from kittycad.models import MlCopilotClientMessage\nfrom kittycad.models.ml_copilot_client_message import OptionPing\nfrom kittycad.models import MlCopilotServerMessage\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_ml_reasoning_ws():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n # Connect to the websocket.\n with client.ml.ml_reasoning_ws(id=\"\") as websocket:\n\n # Send a message.\n websocket.send(MlCopilotClientMessage(OptionPing()))\n\n # Get a message.\n message = websocket.recv()\n print(message)\n\n ", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.ml" } }, @@ -1627,7 +1635,7 @@ "op": "add", "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": { - "example": "from kittycad.models.post_effect_type import PostEffectType\nfrom kittycad.models import WebSocketRequest\nfrom kittycad.models.web_socket_request import OptionModelingCmdReq\nfrom kittycad.models.modeling_cmd import OptionObjectBringToFront\nfrom kittycad.models.modeling_cmd import ModelingCmd\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models import WebSocketResponse\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_modeling_commands_ws():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n # Connect to the websocket.\n with client.modeling.modeling_commands_ws(video_res_width=10,\n video_res_height=10,\n fps=10,\n unlocked_framerate=False,\n post_effect=PostEffectType.PHOSPHOR,\n webrtc=False,\n show_grid=False,\n order_independent_transparency=False,\n pool=None,\n replay=None,\n api_call_id=None,\n pr=None) as websocket:\n\n # Send a message.\n websocket.send(WebSocketRequest(OptionModelingCmdReq(\ncmd=ModelingCmd(OptionObjectBringToFront(\nobject_id=\"\",\n)),\n\ncmd_id=ModelingCmdId(\"\"),\n)))\n\n # Get a message.\n message = websocket.recv()\n print(message)\n\n ", + "example": "from kittycad.models.post_effect_type import PostEffectType\nfrom kittycad.models import WebSocketRequest\nfrom kittycad.models.web_socket_request import OptionTrickleIce\nfrom kittycad.models.rtc_ice_candidate_init import RtcIceCandidateInit\nfrom kittycad.models import WebSocketResponse\nfrom typing import Union, Any, Optional, List, Tuple\nfrom kittycad.types import Response\ndef example_modeling_commands_ws():\n client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable\n\n # Connect to the websocket.\n with client.modeling.modeling_commands_ws(video_res_width=10,\n video_res_height=10,\n fps=10,\n unlocked_framerate=False,\n post_effect=PostEffectType.PHOSPHOR,\n webrtc=False,\n show_grid=False,\n order_independent_transparency=False,\n pool=None,\n replay=None,\n api_call_id=None,\n pr=None) as websocket:\n\n # Send a message.\n websocket.send(WebSocketRequest(OptionTrickleIce(\ncandidate=RtcIceCandidateInit(\ncandidate=\"\",\n),\n)))\n\n # Get a message.\n message = websocket.recv()\n print(message)\n\n ", "libDocsLink": "https://python.api.docs.zoo.dev/_autosummary/kittycad.KittyCAD.html#kittycad.KittyCAD.modeling" } } diff --git a/kittycad/__init__.py b/kittycad/__init__.py index d0fddb2bd..8ac1f7c34 100644 --- a/kittycad/__init__.py +++ b/kittycad/__init__.py @@ -36,11 +36,13 @@ ) from .models.account_provider import AccountProvider from .models.add_org_member import AddOrgMember +from .models.announcement_list import AnnouncementList from .models.api_call_with_price import ApiCallWithPrice from .models.api_call_with_price_results_page import ApiCallWithPriceResultsPage from .models.api_token import ApiToken from .models.api_token_results_page import ApiTokenResultsPage from .models.api_token_uuid import ApiTokenUuid +from .models.api_token_with_full_token import ApiTokenWithFullToken from .models.app_client_info import AppClientInfo from .models.async_api_call_output import AsyncApiCallOutput from .models.auth_api_key_response import AuthApiKeyResponse @@ -106,7 +108,6 @@ from .models.o_auth2_token_request_form import OAuth2TokenRequestForm from .models.oauth2_client_info import OAuth2ClientInfo from .models.org import Org -from .models.org_admin_details import OrgAdminDetails from .models.org_dataset import OrgDataset from .models.org_dataset_conversion_stats_response import ( OrgDatasetConversionStatsResponse, @@ -120,6 +121,7 @@ from .models.org_details import OrgDetails from .models.org_member import OrgMember from .models.org_member_results_page import OrgMemberResultsPage +from .models.org_skill_response import OrgSkillResponse from .models.payment_intent import PaymentIntent from .models.payment_method import PaymentMethod from .models.pong import Pong @@ -284,6 +286,33 @@ def get_ipinfo( # Validate into a Pydantic model (works for BaseModel and RootModel) return IpAddrInfo.model_validate(json_data, extra="ignore") + def get_announcements( + self, + ) -> AnnouncementList: + """No authentication is required.""" + + url = "{}/announcements".format(self.client.base_url) + + _client = self.client.get_http_client() + + response = _client.get( + url=url, + headers=self.client.get_headers(), + ) + + if not response.is_success: + from kittycad.response_helpers import raise_for_status + + raise_for_status(response) + + if not response.content: + return None # type: ignore + + json_data = response.json() + + # Validate into a Pydantic model (works for BaseModel and RootModel) + return AnnouncementList.model_validate(json_data, extra="ignore") + def community_sso( self, sso: str, @@ -470,6 +499,33 @@ async def get_ipinfo( # Validate into a Pydantic model (works for BaseModel and RootModel) return IpAddrInfo.model_validate(json_data, extra="ignore") + async def get_announcements( + self, + ) -> AnnouncementList: + """No authentication is required.""" + + url = "{}/announcements".format(self.client.base_url) + + _client = self.client.get_http_client() + + response = await _client.get( + url=url, + headers=self.client.get_headers(), + ) + + if not response.is_success: + from kittycad.response_helpers import raise_for_status + + raise_for_status(response) + + if not response.content: + return None # type: ignore + + json_data = response.json() + + # Validate into a Pydantic model (works for BaseModel and RootModel) + return AnnouncementList.model_validate(json_data, extra="ignore") + async def community_sso( self, sso: str, @@ -7927,13 +7983,12 @@ def _fetch_page_get_org_shortlinks(self, **kwargs) -> ShortlinkResultsPage: # Validate into a Pydantic model (supports BaseModel/RootModel) return ShortlinkResultsPage.model_validate(json_data, extra="ignore") - def org_admin_details_get( + def list_org_skills( self, - id: Uuid, - ) -> OrgAdminDetails: - """Zoo admins can retrieve extended information about any organization, while non-admins receive a 404 to avoid leaking existence.""" + ) -> List[OrgSkillResponse]: + """List every skill that belongs to the caller's organization.""" - url = "{}/orgs/{id}/admin/details".format(self.client.base_url, id=id) + url = "{}/org/skills".format(self.client.base_url) _client = self.client.get_http_client() @@ -7952,8 +8007,12 @@ def org_admin_details_get( json_data = response.json() - # Validate into a Pydantic model (works for BaseModel and RootModel) - return OrgAdminDetails.model_validate(json_data, extra="ignore") + # Validate into annotated/collection/union types using TypeAdapter + from pydantic import TypeAdapter + + return TypeAdapter(List[OrgSkillResponse]).validate_python( + json_data, extra="ignore" + ) def get_billing_contract_for_any_org( self, @@ -9316,13 +9375,12 @@ async def _fetch_page_get_org_shortlinks(self, **kwargs) -> ShortlinkResultsPage # Validate into a Pydantic model (supports BaseModel/RootModel) return ShortlinkResultsPage.model_validate(json_data, extra="ignore") - async def org_admin_details_get( + async def list_org_skills( self, - id: Uuid, - ) -> OrgAdminDetails: - """Zoo admins can retrieve extended information about any organization, while non-admins receive a 404 to avoid leaking existence.""" + ) -> List[OrgSkillResponse]: + """List every skill that belongs to the caller's organization.""" - url = "{}/orgs/{id}/admin/details".format(self.client.base_url, id=id) + url = "{}/org/skills".format(self.client.base_url) _client = self.client.get_http_client() @@ -9341,8 +9399,12 @@ async def org_admin_details_get( json_data = response.json() - # Validate into a Pydantic model (works for BaseModel and RootModel) - return OrgAdminDetails.model_validate(json_data, extra="ignore") + # Validate into annotated/collection/union types using TypeAdapter + from pydantic import TypeAdapter + + return TypeAdapter(List[OrgSkillResponse]).validate_python( + json_data, extra="ignore" + ) async def get_billing_contract_for_any_org( self, @@ -11843,11 +11905,13 @@ def get_service_account_for_org( def delete_service_account_for_org( self, - token: ServiceAccountUuid, + token: str, ): """This endpoint requires authentication by an org member. It deletes the requested service account for the organization. - This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.""" + This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes. + + The token path parameter can be either the full service account token (prefixed with `svc-`) or the token's unique ID (a UUID).""" url = "{}/org/service-accounts/{token}".format( self.client.base_url, token=token @@ -12033,11 +12097,13 @@ async def get_service_account_for_org( async def delete_service_account_for_org( self, - token: ServiceAccountUuid, + token: str, ): """This endpoint requires authentication by an org member. It deletes the requested service account for the organization. - This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.""" + This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes. + + The token path parameter can be either the full service account token (prefixed with `svc-`) or the token's unique ID (a UUID).""" url = "{}/org/service-accounts/{token}".format( self.client.base_url, token=token @@ -15916,7 +15982,7 @@ def create_api_token_for_user( self, *, label: Optional[str] = None, - ) -> ApiToken: + ) -> ApiTokenWithFullToken: """This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.""" url = "{}/user/api-tokens".format(self.client.base_url) @@ -15945,7 +16011,7 @@ def create_api_token_for_user( json_data = response.json() # Validate into a Pydantic model (works for BaseModel and RootModel) - return ApiToken.model_validate(json_data, extra="ignore") + return ApiTokenWithFullToken.model_validate(json_data, extra="ignore") def get_api_token_for_user( self, @@ -15977,11 +16043,13 @@ def get_api_token_for_user( def delete_api_token_for_user( self, - token: ApiTokenUuid, + token: str, ): """This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user. - This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" + This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. + + The token path parameter can be either the full API token (prefixed with `api-`) or the token's unique ID (a UUID).""" url = "{}/user/api-tokens/{token}".format(self.client.base_url, token=token) @@ -16102,7 +16170,7 @@ async def create_api_token_for_user( self, *, label: Optional[str] = None, - ) -> ApiToken: + ) -> ApiTokenWithFullToken: """This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.""" url = "{}/user/api-tokens".format(self.client.base_url) @@ -16131,7 +16199,7 @@ async def create_api_token_for_user( json_data = response.json() # Validate into a Pydantic model (works for BaseModel and RootModel) - return ApiToken.model_validate(json_data, extra="ignore") + return ApiTokenWithFullToken.model_validate(json_data, extra="ignore") async def get_api_token_for_user( self, @@ -16163,11 +16231,13 @@ async def get_api_token_for_user( async def delete_api_token_for_user( self, - token: ApiTokenUuid, + token: str, ): """This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user. - This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" + This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. + + The token path parameter can be either the full API token (prefixed with `api-`) or the token's unique ID (a UUID).""" url = "{}/user/api-tokens/{token}".format(self.client.base_url, token=token) diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 022e0a69f..0b59de3d0 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -19,6 +19,8 @@ from .annotation_text_alignment_y import AnnotationTextAlignmentY from .annotation_text_options import AnnotationTextOptions from .annotation_type import AnnotationType +from .announcement import Announcement +from .announcement_list import AnnouncementList from .api_call_status import ApiCallStatus from .api_call_with_price import ApiCallWithPrice from .api_call_with_price_results_page import ApiCallWithPriceResultsPage @@ -27,6 +29,7 @@ from .api_token import ApiToken from .api_token_results_page import ApiTokenResultsPage from .api_token_uuid import ApiTokenUuid +from .api_token_with_full_token import ApiTokenWithFullToken from .app_client_info import AppClientInfo from .async_api_call_output import AsyncApiCallOutput from .auth_api_key_response import AuthApiKeyResponse @@ -140,11 +143,14 @@ from .device_auth_confirm_params import DeviceAuthConfirmParams from .device_auth_request_form import DeviceAuthRequestForm from .direction import Direction +from .direction_type import DirectionType from .disable_dry_run import DisableDryRun from .discount import Discount from .discount_code import DiscountCode from .distance_type import DistanceType from .dxf_storage import DxfStorage +from .edge_cut_version import EdgeCutVersion +from .edge_get_length import EdgeGetLength from .edge_info import EdgeInfo from .edge_lines_visible import EdgeLinesVisible from .edge_specifier import EdgeSpecifier @@ -292,6 +298,7 @@ from .oauth2_grant_type import OAuth2GrantType from .object_bring_to_front import ObjectBringToFront from .object_set_material_params_pbr import ObjectSetMaterialParamsPbr +from .object_set_name import ObjectSetName from .object_visible import ObjectVisible from .offset_surface import OffsetSurface from .ok_modeling_cmd_response import OkModelingCmdResponse @@ -299,8 +306,6 @@ from .opposite_for_angle import OppositeForAngle from .opposite_for_length_unit import OppositeForLengthUnit from .org import Org -from .org_address import OrgAddress -from .org_admin_details import OrgAdminDetails from .org_dataset import OrgDataset from .org_dataset_conversion_stats_response import OrgDatasetConversionStatsResponse from .org_dataset_file_conversion_details import OrgDatasetFileConversionDetails @@ -319,6 +324,7 @@ from .org_member import OrgMember from .org_member_results_page import OrgMemberResultsPage from .org_role import OrgRole +from .org_skill_response import OrgSkillResponse from .orient_to_face import OrientToFace from .origin_type import OriginType from .output_file import OutputFile @@ -372,6 +378,7 @@ from .reasoning_message import ReasoningMessage from .reconfigure_stream import ReconfigureStream from .region_get_query_point import RegionGetQueryPoint +from .region_get_resolvable_intersection_info import RegionGetResolvableIntersectionInfo from .region_version import RegionVersion from .relative_to import RelativeTo from .remove_scene_objects import RemoveSceneObjects @@ -541,4 +548,7 @@ from .zoo_product_subscriptions_org_request import ZooProductSubscriptionsOrgRequest from .zoo_product_subscriptions_user_request import ZooProductSubscriptionsUserRequest from .zoo_tool import ZooTool +from .zookeeper_auto_router_metadata import ZookeeperAutoRouterMetadata +from .zookeeper_edit_patch import ZookeeperEditPatch +from .zookeeper_edit_patch_file import ZookeeperEditPatchFile from .zoom_to_fit import ZoomToFit diff --git a/kittycad/models/annotation_basic_dimension.py b/kittycad/models/annotation_basic_dimension.py index 2275f17a0..3beaad6fc 100644 --- a/kittycad/models/annotation_basic_dimension.py +++ b/kittycad/models/annotation_basic_dimension.py @@ -1,6 +1,7 @@ from typing import Optional from ..models.annotation_mbd_basic_dimension import AnnotationMbdBasicDimension +from ..models.edge_specifier import EdgeSpecifier from ..models.point2d import Point2d from .base import KittyCadBaseModel @@ -16,7 +17,9 @@ class AnnotationBasicDimension(KittyCadBaseModel): font_scale: float - from_entity_id: str + from_edge_reference: Optional[EdgeSpecifier] = None + + from_entity_id: Optional[str] = None from_entity_pos: Point2d @@ -26,6 +29,8 @@ class AnnotationBasicDimension(KittyCadBaseModel): precision: int - to_entity_id: str + to_edge_reference: Optional[EdgeSpecifier] = None + + to_entity_id: Optional[str] = None to_entity_pos: Point2d diff --git a/kittycad/models/annotation_feature_control.py b/kittycad/models/annotation_feature_control.py index 5dc4a1664..c6ecbf311 100644 --- a/kittycad/models/annotation_feature_control.py +++ b/kittycad/models/annotation_feature_control.py @@ -3,6 +3,7 @@ from ..models.annotation_line_end import AnnotationLineEnd from ..models.annotation_mbd_basic_dimension import AnnotationMbdBasicDimension from ..models.annotation_mbd_control_frame import AnnotationMbdControlFrame +from ..models.edge_specifier import EdgeSpecifier from ..models.point2d import Point2d from .base import KittyCadBaseModel @@ -16,7 +17,9 @@ class AnnotationFeatureControl(KittyCadBaseModel): dimension: Optional[AnnotationMbdBasicDimension] = None - entity_id: str + edge_reference: Optional[EdgeSpecifier] = None + + entity_id: Optional[str] = None entity_pos: Point2d diff --git a/kittycad/models/annotation_feature_tag.py b/kittycad/models/annotation_feature_tag.py index 791ca93c5..64c199851 100644 --- a/kittycad/models/annotation_feature_tag.py +++ b/kittycad/models/annotation_feature_tag.py @@ -1,6 +1,7 @@ from typing import Optional from ..models.annotation_line_end import AnnotationLineEnd +from ..models.edge_specifier import EdgeSpecifier from ..models.point2d import Point2d from .base import KittyCadBaseModel @@ -8,7 +9,9 @@ class AnnotationFeatureTag(KittyCadBaseModel): """Parameters for defining an MBD Feature Tag Annotation state""" - entity_id: str + edge_reference: Optional[EdgeSpecifier] = None + + entity_id: Optional[str] = None entity_pos: Point2d diff --git a/kittycad/models/annotation_options.py b/kittycad/models/annotation_options.py index a47c1ba76..6e0f98c33 100644 --- a/kittycad/models/annotation_options.py +++ b/kittycad/models/annotation_options.py @@ -7,6 +7,7 @@ from ..models.annotation_text_options import AnnotationTextOptions from ..models.color import Color from ..models.point3d import Point3d +from ..models.unit_length import UnitLength from .base import KittyCadBaseModel @@ -28,3 +29,5 @@ class AnnotationOptions(KittyCadBaseModel): position: Optional[Point3d] = None text: Optional[AnnotationTextOptions] = None + + units: Optional[UnitLength] = None diff --git a/kittycad/models/announcement.py b/kittycad/models/announcement.py new file mode 100644 index 000000000..e71e370ff --- /dev/null +++ b/kittycad/models/announcement.py @@ -0,0 +1,23 @@ +import datetime +from typing import Optional + +from ..models.uuid import Uuid +from .base import KittyCadBaseModel + + +class Announcement(KittyCadBaseModel): + """An announcement broadcast to all clients.""" + + active: bool + + body: Optional[str] = None + + created_at: datetime.datetime + + id: Uuid + + tag: Optional[str] = None + + title: str + + updated_at: datetime.datetime diff --git a/kittycad/models/announcement_list.py b/kittycad/models/announcement_list.py new file mode 100644 index 000000000..105fbad61 --- /dev/null +++ b/kittycad/models/announcement_list.py @@ -0,0 +1,10 @@ +from typing import List + +from ..models.announcement import Announcement +from .base import KittyCadBaseModel + + +class AnnouncementList(KittyCadBaseModel): + """Response containing active announcements.""" + + announcements: List[Announcement] diff --git a/kittycad/models/api_token_with_full_token.py b/kittycad/models/api_token_with_full_token.py new file mode 100644 index 000000000..13d33197c --- /dev/null +++ b/kittycad/models/api_token_with_full_token.py @@ -0,0 +1,26 @@ +import datetime +from typing import Optional + +from ..models.api_token_uuid import ApiTokenUuid +from ..models.uuid import Uuid +from .base import KittyCadBaseModel + + +class ApiTokenWithFullToken(KittyCadBaseModel): + """An API token with the full, unobfuscated token value. + + This is used specifically for the creation endpoint response, where the user needs to see the full token exactly once. All other endpoints return the obfuscated version via the `ApiToken` struct.""" + + created_at: datetime.datetime + + id: Uuid + + is_valid: bool + + label: Optional[str] = None + + token: ApiTokenUuid + + updated_at: datetime.datetime + + user_id: Uuid diff --git a/kittycad/models/create_org_dataset.py b/kittycad/models/create_org_dataset.py index 8ad74e223..15cab7e63 100644 --- a/kittycad/models/create_org_dataset.py +++ b/kittycad/models/create_org_dataset.py @@ -11,4 +11,6 @@ class CreateOrgDataset(KittyCadBaseModel): name: str + require_raw_kcl_similarity_score_for_success: Optional[bool] = False + source: OrgDatasetSource diff --git a/kittycad/models/direction_type.py b/kittycad/models/direction_type.py new file mode 100644 index 000000000..28249c514 --- /dev/null +++ b/kittycad/models/direction_type.py @@ -0,0 +1,54 @@ +from typing import Union + +from pydantic import RootModel, model_serializer, model_validator + +from ..models.point3d import Point3d +from .base import KittyCadBaseModel + + +class Edge(KittyCadBaseModel): + """Uses the direction of an edge, if linear""" + + id: str + + @model_validator(mode="before") + @classmethod + def _unwrap(cls, data): + if isinstance(data, dict) and "edge" in data and isinstance(data["edge"], dict): + return data["edge"] + + return data + + @model_serializer(mode="wrap") + def _wrap(self, handler, info): + payload = handler(self, info) + + return {"edge": payload} + + +class Axis(KittyCadBaseModel): + """Uses the provided vector as the direction.""" + + direction: Point3d + + @model_validator(mode="before") + @classmethod + def _unwrap(cls, data): + if isinstance(data, dict) and "axis" in data and isinstance(data["axis"], dict): + return data["axis"] + + return data + + @model_serializer(mode="wrap") + def _wrap(self, handler, info): + payload = handler(self, info) + + return {"axis": payload} + + +DirectionType = RootModel[ + Union[ + Edge, + Axis, + ] +] diff --git a/kittycad/models/edge_cut_version.py b/kittycad/models/edge_cut_version.py new file mode 100644 index 000000000..76e29cc24 --- /dev/null +++ b/kittycad/models/edge_cut_version.py @@ -0,0 +1,20 @@ +from enum import Enum + + +class EdgeCutVersion(str, Enum): + """Edge cut algorithm version.""" # noqa: E501 + + """# Let the engine choose whichever version it wants.""" # noqa: E501 + + V0 = "v0" + + """# The original fillet algorithm Zoo 1.0 shipped with. Limitations: doesn't support rolling ball fillets, has several bugs that will not be fixed.""" # noqa: E501 + + V1 = "v1" + + """# Adds support for rolling ball fillets. Fixes bugs from V1. Still experimental.""" # noqa: E501 + + V2 = "v2" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/edge_get_length.py b/kittycad/models/edge_get_length.py new file mode 100644 index 000000000..46d87a493 --- /dev/null +++ b/kittycad/models/edge_get_length.py @@ -0,0 +1,8 @@ +from ..models.length_unit import LengthUnit +from .base import KittyCadBaseModel + + +class EdgeGetLength(KittyCadBaseModel): + """The response from the `EdgeGetLength` command.""" + + length: LengthUnit diff --git a/kittycad/models/file_import_format.py b/kittycad/models/file_import_format.py index cf03f17ee..509d48ed9 100644 --- a/kittycad/models/file_import_format.py +++ b/kittycad/models/file_import_format.py @@ -4,6 +4,18 @@ class FileImportFormat(str, Enum): """The valid types of source file formats.""" # noqa: E501 + """# ACIS part format.""" # noqa: E501 + + ACIS = "acis" + + """# CATIA part format.""" # noqa: E501 + + CATIA = "catia" + + """# PTC Creo part format.""" # noqa: E501 + + CREO = "creo" + """# Autodesk Filmbox (FBX) format. """ # noqa: E501 FBX = "fbx" @@ -12,10 +24,22 @@ class FileImportFormat(str, Enum): GLTF = "gltf" + """# Autodesk Inventor part format.""" # noqa: E501 + + INVENTOR = "inventor" + + """# Siemens NX part format.""" # noqa: E501 + + NX = "nx" + """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.""" # noqa: E501 OBJ = "obj" + """# Parasolid part format.""" # noqa: E501 + + PARASOLID = "parasolid" + """# The PLY file format. """ # noqa: E501 PLY = "ply" diff --git a/kittycad/models/input_format3d.py b/kittycad/models/input_format3d.py index 65f1908e9..854e2377a 100644 --- a/kittycad/models/input_format3d.py +++ b/kittycad/models/input_format3d.py @@ -8,6 +8,45 @@ from .base import KittyCadBaseModel +class OptionAcis(KittyCadBaseModel): + """ACIS part format.""" + + coords: Optional[System] = { + "forward": {"axis": "y", "direction": "negative"}, + "up": {"axis": "z", "direction": "positive"}, + } # type: ignore[assignment] + + split_closed_faces: Optional[bool] = False + + type: Literal["acis"] = "acis" + + +class OptionCatia(KittyCadBaseModel): + """CATIA part format.""" + + coords: Optional[System] = { + "forward": {"axis": "y", "direction": "negative"}, + "up": {"axis": "z", "direction": "positive"}, + } # type: ignore[assignment] + + split_closed_faces: Optional[bool] = False + + type: Literal["catia"] = "catia" + + +class OptionCreo(KittyCadBaseModel): + """PTC Creo part format.""" + + coords: Optional[System] = { + "forward": {"axis": "z", "direction": "positive"}, + "up": {"axis": "y", "direction": "positive"}, + } # type: ignore[assignment] + + split_closed_faces: Optional[bool] = False + + type: Literal["creo"] = "creo" + + class OptionFbx(KittyCadBaseModel): """Autodesk Filmbox (FBX) format.""" @@ -20,6 +59,32 @@ class OptionGltf(KittyCadBaseModel): type: Literal["gltf"] = "gltf" +class OptionInventor(KittyCadBaseModel): + """Autodesk Inventor part format.""" + + coords: Optional[System] = { + "forward": {"axis": "y", "direction": "negative"}, + "up": {"axis": "z", "direction": "positive"}, + } # type: ignore[assignment] + + split_closed_faces: Optional[bool] = False + + type: Literal["inventor"] = "inventor" + + +class OptionNx(KittyCadBaseModel): + """Siemens NX part format.""" + + coords: Optional[System] = { + "forward": {"axis": "y", "direction": "negative"}, + "up": {"axis": "z", "direction": "positive"}, + } # type: ignore[assignment] + + split_closed_faces: Optional[bool] = False + + type: Literal["nx"] = "nx" + + class OptionObj(KittyCadBaseModel): """Wavefront OBJ format.""" @@ -30,6 +95,19 @@ class OptionObj(KittyCadBaseModel): units: UnitLength +class OptionParasolid(KittyCadBaseModel): + """Parasolid part format.""" + + coords: Optional[System] = { + "forward": {"axis": "y", "direction": "negative"}, + "up": {"axis": "z", "direction": "positive"}, + } # type: ignore[assignment] + + split_closed_faces: Optional[bool] = False + + type: Literal["parasolid"] = "parasolid" + + class OptionPly(KittyCadBaseModel): """The PLY Polygon File Format.""" @@ -43,6 +121,11 @@ class OptionPly(KittyCadBaseModel): class OptionSldprt(KittyCadBaseModel): """SolidWorks part (SLDPRT) format.""" + coords: Optional[System] = { + "forward": {"axis": "z", "direction": "positive"}, + "up": {"axis": "y", "direction": "positive"}, + } # type: ignore[assignment] + split_closed_faces: Optional[bool] = False type: Literal["sldprt"] = "sldprt" @@ -74,9 +157,15 @@ class OptionStl(KittyCadBaseModel): InputFormat3d = RootModel[ Annotated[ Union[ + OptionAcis, + OptionCatia, + OptionCreo, OptionFbx, OptionGltf, + OptionInventor, + OptionNx, OptionObj, + OptionParasolid, OptionPly, OptionSldprt, OptionStep, diff --git a/kittycad/models/kcl_project_publication_status.py b/kittycad/models/kcl_project_publication_status.py index 82f3d3f28..c3de1464b 100644 --- a/kittycad/models/kcl_project_publication_status.py +++ b/kittycad/models/kcl_project_publication_status.py @@ -28,5 +28,9 @@ class KclProjectPublicationStatus(str, Enum): DELETED = "deleted" + """# The project was reviewed and changes were requested before it can be published.""" # noqa: E501 + + CHANGES_REQUESTED = "changes_requested" + def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/ml_copilot_mode.py b/kittycad/models/ml_copilot_mode.py index 2615fa44e..30fd5990b 100644 --- a/kittycad/models/ml_copilot_mode.py +++ b/kittycad/models/ml_copilot_mode.py @@ -12,5 +12,9 @@ class MlCopilotMode(str, Enum): THOUGHTFUL = "thoughtful" + """# Let the system automatically choose the model and reasoning effort.""" # noqa: E501 + + AUTO = "auto" + def __str__(self) -> str: return str(self.value) diff --git a/kittycad/models/ml_copilot_mode_option.py b/kittycad/models/ml_copilot_mode_option.py index 2bb77dd0f..ecc1cf546 100644 --- a/kittycad/models/ml_copilot_mode_option.py +++ b/kittycad/models/ml_copilot_mode_option.py @@ -1,3 +1,5 @@ +from typing import Optional + from .base import KittyCadBaseModel @@ -6,6 +8,8 @@ class MlCopilotModeOption(KittyCadBaseModel): description: str + disabled: Optional[bool] = False + icon: str id: str diff --git a/kittycad/models/ml_copilot_server_message.py b/kittycad/models/ml_copilot_server_message.py index 7f1c30369..abe998c7f 100644 --- a/kittycad/models/ml_copilot_server_message.py +++ b/kittycad/models/ml_copilot_server_message.py @@ -8,6 +8,9 @@ from ..models.ml_tool_result import MlToolResult from ..models.reasoning_message import ReasoningMessage from ..models.uuid import Uuid +from ..models.zookeeper_auto_router_metadata import ( + ZookeeperAutoRouterMetadata as ZookeeperAutoRouterMetadataModel, +) from .base import KittyCadBaseModel @@ -299,10 +302,18 @@ def _wrap(self, handler, info): return {"attachments_loaded": payload} +class ZookeeperAutoRouterMetadata(KittyCadBaseModel): + """Backend-only Zookeeper Auto-router metadata. + + API persists this on the active prompt and does not forward it to clients or replay it as a chat message.""" + + zookeeper_auto_router_metadata: ZookeeperAutoRouterMetadataModel + + class Replay(KittyCadBaseModel): """Replay containing raw bytes for previously-saved messages for a conversation. Includes server messages and client `User` messages. - Invariants: - Includes server messages: `Info`, `Error`, `Reasoning(..)`, `ToolOutput { .. }`, `Files { .. }`, `ProjectUpdated { .. }`, and `EndOfStream { .. }`. - Also includes client `User` messages. - The following are NEVER included: `SessionData`, `ConversationId`, `Delta`, or `BackendShutdown`. - Ordering is stable: messages are ordered by prompt creation time within the conversation, then by the per-prompt `seq` value (monotonically increasing as seen in the original stream). + Invariants: - Includes server messages: `Info`, `Error`, `Reasoning(..)`, `ToolOutput { .. }`, `Files { .. }`, `ProjectUpdated { .. }`, and `EndOfStream { .. }`. - Also includes client `User` messages. - The following are NEVER included: `SessionData`, `ConversationId`, `Delta`, `BackendShutdown`, or `ZookeeperAutoRouterMetadata`. - Ordering is stable: messages are ordered by prompt creation time within the conversation, then by the per-prompt `seq` value (monotonically increasing as seen in the original stream). Wire format: - Each element is canonical serialized bytes (typically JSON) for either a `MlCopilotServerMessage` or a `MlCopilotClientMessage::User`. - When delivered as an initial replay over the websocket (upon `?replay=true&conversation_id=`), the server sends a single WebSocket Binary frame containing a MsgPack-encoded document of this enum: `Replay { messages }`.""" @@ -398,6 +409,7 @@ def _wrap(self, handler, info): Reasoning, RequestAttachments, AttachmentsLoaded, + ZookeeperAutoRouterMetadata, Replay, EndOfStream, Files, diff --git a/kittycad/models/ml_tool_result.py b/kittycad/models/ml_tool_result.py index dbe5f6cf7..4ecf1654d 100644 --- a/kittycad/models/ml_tool_result.py +++ b/kittycad/models/ml_tool_result.py @@ -3,6 +3,7 @@ from pydantic import Field, RootModel from typing_extensions import Annotated +from ..models.zookeeper_edit_patch import ZookeeperEditPatch from .base import KittyCadBaseModel @@ -33,6 +34,8 @@ class OptionEditKclCode(KittyCadBaseModel): type: Literal["edit_kcl_code"] = "edit_kcl_code" + zookeeper_edit_patch: Optional[ZookeeperEditPatch] = None + class OptionMechanicalKnowledgeBase(KittyCadBaseModel): """Mechanical knowledge base response.""" diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index 88dc97dca..602d25ea4 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -16,7 +16,9 @@ from ..models.cut_strategy import CutStrategy from ..models.cut_type import CutType from ..models.cut_type_v2 import CutTypeV2 +from ..models.direction_type import DirectionType from ..models.distance_type import DistanceType +from ..models.edge_cut_version import EdgeCutVersion from ..models.edge_specifier import EdgeSpecifier from ..models.entity_reference import EntityReference from ..models.entity_type import EntityType @@ -96,8 +98,12 @@ class OptionExtrude(KittyCadBaseModel): body_type: Optional[BodyType] = "solid" # type: ignore[assignment] + direction: Optional[DirectionType] = None + distance: LengthUnit + draft_angle: Optional[Angle] = None + extrude_method: Optional[ExtrudeMethod] = "merge" # type: ignore[assignment] faces: Optional[ExtrudedFaceInfo] = None @@ -154,7 +160,9 @@ class OptionSweep(KittyCadBaseModel): body_type: Optional[BodyType] = "solid" # type: ignore[assignment] - relative_to: Optional[RelativeTo] = "sketch_plane" # type: ignore[assignment] + orient_profile_perpendicular: Optional[bool] = None + + relative_to: Optional[RelativeTo] = None sectional: bool @@ -164,6 +172,8 @@ class OptionSweep(KittyCadBaseModel): trajectory: ModelingCmdId + translate_profile_to_path: Optional[bool] = None + type: Literal["sweep"] = "sweep" version: Optional[int] = None @@ -513,6 +523,14 @@ class OptionEntityGetDistance(KittyCadBaseModel): type: Literal["entity_get_distance"] = "entity_get_distance" +class OptionEdgeGetLength(KittyCadBaseModel): + """What is the length of this edge?""" + + edge_id: str + + type: Literal["edge_get_length"] = "edge_get_length" + + class OptionEntityClone(KittyCadBaseModel): """Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.""" @@ -797,6 +815,16 @@ class OptionObjectSetMaterialParamsPbr(KittyCadBaseModel): type: Literal["object_set_material_params_pbr"] = "object_set_material_params_pbr" +class OptionObjectSetName(KittyCadBaseModel): + """Set the name of an object""" + + name: Optional[str] = None + + object_id: str + + type: Literal["object_set_name"] = "object_set_name" + + class OptionGetEntityType(KittyCadBaseModel): """What type of entity is this?""" @@ -926,6 +954,8 @@ class OptionSolid3dFilletEdge(KittyCadBaseModel): use_legacy: Optional[bool] = None + version: Optional[EdgeCutVersion] = None + class OptionSolid3dCutEdgeReferences(KittyCadBaseModel): """Cut the list of edge references with the given cut parameters""" @@ -946,6 +976,8 @@ class OptionSolid3dCutEdgeReferences(KittyCadBaseModel): use_legacy: Optional[bool] = None + version: Optional[EdgeCutVersion] = None + class OptionSolid3dCutEdges(KittyCadBaseModel): """Cut the list of given edges with the given cut parameters.""" @@ -966,6 +998,8 @@ class OptionSolid3dCutEdges(KittyCadBaseModel): use_legacy: Optional[bool] = None + version: Optional[EdgeCutVersion] = None + class OptionFaceIsPlanar(KittyCadBaseModel): """Determines whether a brep face is planar and returns its surface-local planar axes if so""" @@ -1354,7 +1388,7 @@ class OptionImportFiles(KittyCadBaseModel): class OptionSetSceneUnits(KittyCadBaseModel): - """Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in.""" + """Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in. If not set, engine units default to mm.""" type: Literal["set_scene_units"] = "set_scene_units" @@ -1713,6 +1747,16 @@ class OptionCreateRegion(KittyCadBaseModel): version: Optional[RegionVersion] = None +class OptionRegionGetResolvableIntersectionInfo(KittyCadBaseModel): + """Finds a suitable set of arguments that can be passed to CreateRegion to resolve this very region.""" + + region_id: str + + type: Literal["region_get_resolvable_intersection_info"] = ( + "region_get_resolvable_intersection_info" + ) + + class OptionCreateRegionFromQueryPoint(KittyCadBaseModel): """Create a region with a query point. The region should have an ID taken from the ID of the 'CreateRegionFromQueryPoint' modeling command.""" @@ -1816,6 +1860,7 @@ class OptionClosestEdge(KittyCadBaseModel): OptionEntityGetAllChildUuids, OptionEntityGetSketchPaths, OptionEntityGetDistance, + OptionEdgeGetLength, OptionEntityClone, OptionEntityLinearPatternTransform, OptionEntityLinearPattern, @@ -1841,6 +1886,7 @@ class OptionClosestEdge(KittyCadBaseModel): OptionObjectVisible, OptionObjectBringToFront, OptionObjectSetMaterialParamsPbr, + OptionObjectSetName, OptionGetEntityType, OptionSolid3dGetAllEdgeFaces, OptionSolid3dFlip, @@ -1929,6 +1975,7 @@ class OptionClosestEdge(KittyCadBaseModel): OptionSetGridAutoScale, OptionSetOrderIndependentTransparency, OptionCreateRegion, + OptionRegionGetResolvableIntersectionInfo, OptionCreateRegionFromQueryPoint, OptionRegionGetQueryPoint, OptionSelectRegionFromPoint, diff --git a/kittycad/models/object_set_name.py b/kittycad/models/object_set_name.py new file mode 100644 index 000000000..94d95ebc1 --- /dev/null +++ b/kittycad/models/object_set_name.py @@ -0,0 +1,5 @@ +from .base import KittyCadBaseModel + + +class ObjectSetName(KittyCadBaseModel): + """The response from the `ObjectSetName` endpoint.""" diff --git a/kittycad/models/ok_modeling_cmd_response.py b/kittycad/models/ok_modeling_cmd_response.py index c6655c27f..f6cd4d63f 100644 --- a/kittycad/models/ok_modeling_cmd_response.py +++ b/kittycad/models/ok_modeling_cmd_response.py @@ -38,6 +38,7 @@ from ..models.default_camera_zoom import DefaultCameraZoom from ..models.density import Density from ..models.disable_dry_run import DisableDryRun +from ..models.edge_get_length import EdgeGetLength from ..models.edge_info import EdgeInfo from ..models.edge_lines_visible import EdgeLinesVisible from ..models.enable_dry_run import EnableDryRun @@ -97,6 +98,7 @@ from ..models.new_annotation import NewAnnotation from ..models.object_bring_to_front import ObjectBringToFront from ..models.object_set_material_params_pbr import ObjectSetMaterialParamsPbr +from ..models.object_set_name import ObjectSetName from ..models.object_visible import ObjectVisible from ..models.offset_surface import OffsetSurface from ..models.orient_to_face import OrientToFace @@ -114,6 +116,9 @@ from ..models.query_entity_type_with_point import QueryEntityTypeWithPoint from ..models.reconfigure_stream import ReconfigureStream from ..models.region_get_query_point import RegionGetQueryPoint +from ..models.region_get_resolvable_intersection_info import ( + RegionGetResolvableIntersectionInfo, +) from ..models.remove_scene_objects import RemoveSceneObjects from ..models.revolve import Revolve from ..models.revolve_about_edge import RevolveAboutEdge @@ -430,6 +435,14 @@ class OptionObjectSetMaterialParamsPbr(KittyCadBaseModel): type: Literal["object_set_material_params_pbr"] = "object_set_material_params_pbr" +class OptionObjectSetName(KittyCadBaseModel): + """""" + + data: ObjectSetName + + type: Literal["object_set_name"] = "object_set_name" + + class OptionSolid2dAddHole(KittyCadBaseModel): """""" @@ -1266,6 +1279,14 @@ class OptionEntityGetDistance(KittyCadBaseModel): type: Literal["entity_get_distance"] = "entity_get_distance" +class OptionEdgeGetLength(KittyCadBaseModel): + """""" + + data: EdgeGetLength + + type: Literal["edge_get_length"] = "edge_get_length" + + class OptionFaceEdgeInfo(KittyCadBaseModel): """""" @@ -1468,6 +1489,16 @@ class OptionCreateRegion(KittyCadBaseModel): type: Literal["create_region"] = "create_region" +class OptionRegionGetResolvableIntersectionInfo(KittyCadBaseModel): + """""" + + data: RegionGetResolvableIntersectionInfo + + type: Literal["region_get_resolvable_intersection_info"] = ( + "region_get_resolvable_intersection_info" + ) + + class OptionCreateRegionFromQueryPoint(KittyCadBaseModel): """""" @@ -1551,6 +1582,7 @@ class OptionClosestEdge(KittyCadBaseModel): OptionObjectVisible, OptionObjectBringToFront, OptionObjectSetMaterialParamsPbr, + OptionObjectSetName, OptionSolid2dAddHole, OptionSolid3dFilletEdge, OptionSolid3dCutEdgeReferences, @@ -1655,6 +1687,7 @@ class OptionClosestEdge(KittyCadBaseModel): OptionCenterOfMass, OptionGetSketchModePlane, OptionEntityGetDistance, + OptionEdgeGetLength, OptionFaceEdgeInfo, OptionEdgeInfo, OptionEntityClone, @@ -1680,6 +1713,7 @@ class OptionClosestEdge(KittyCadBaseModel): OptionSetGridAutoScale, OptionSetOrderIndependentTransparency, OptionCreateRegion, + OptionRegionGetResolvableIntersectionInfo, OptionCreateRegionFromQueryPoint, OptionRegionGetQueryPoint, OptionSelectRegionFromPoint, diff --git a/kittycad/models/org_address.py b/kittycad/models/org_address.py deleted file mode 100644 index c0868cd97..000000000 --- a/kittycad/models/org_address.py +++ /dev/null @@ -1,30 +0,0 @@ -import datetime -from typing import Optional - -from ..models.country_code import CountryCode -from ..models.uuid import Uuid -from .base import KittyCadBaseModel - - -class OrgAddress(KittyCadBaseModel): - """An address for an organization.""" - - city: Optional[str] = None - - country: CountryCode - - created_at: datetime.datetime - - id: Uuid - - org_id: Uuid - - state: Optional[str] = None - - street1: Optional[str] = None - - street2: Optional[str] = None - - updated_at: datetime.datetime - - zip: Optional[str] = None diff --git a/kittycad/models/org_admin_details.py b/kittycad/models/org_admin_details.py deleted file mode 100644 index 90f5e2dc4..000000000 --- a/kittycad/models/org_admin_details.py +++ /dev/null @@ -1,28 +0,0 @@ -from typing import List, Optional - -from ..models.block_reason import BlockReason -from ..models.org_address import OrgAddress -from ..models.payment_method import PaymentMethod -from .base import KittyCadBaseModel - - -class OrgAdminDetails(KittyCadBaseModel): - """Extra admin-only details for an organization.""" - - address: Optional[OrgAddress] = None - - address_summary: Optional[str] = None - - block: Optional[BlockReason] = None - - block_message: Optional[str] = None - - never_block: bool - - payment_methods: List[PaymentMethod] - - payment_methods_summary: List[str] - - stripe_customer_id: Optional[str] = None - - stripe_dashboard_url: Optional[str] = None diff --git a/kittycad/models/org_dataset.py b/kittycad/models/org_dataset.py index 6ca9951cb..5f342d0df 100644 --- a/kittycad/models/org_dataset.py +++ b/kittycad/models/org_dataset.py @@ -26,6 +26,8 @@ class OrgDataset(KittyCadBaseModel): org_id: Uuid + require_raw_kcl_similarity_score_for_success: bool + source_uri: str status: OrgDatasetStatus diff --git a/kittycad/models/org_skill_response.py b/kittycad/models/org_skill_response.py new file mode 100644 index 000000000..23fe26bd2 --- /dev/null +++ b/kittycad/models/org_skill_response.py @@ -0,0 +1,14 @@ +from ..models.uuid import Uuid +from .base import KittyCadBaseModel + + +class OrgSkillResponse(KittyCadBaseModel): + """Public skill context available to the caller's organization.""" + + description: str + + id: Uuid + + markdown: str + + name: str diff --git a/kittycad/models/origin_type.py b/kittycad/models/origin_type.py index 018f39c46..f487dfb6f 100644 --- a/kittycad/models/origin_type.py +++ b/kittycad/models/origin_type.py @@ -8,19 +8,19 @@ class OptionLocal(KittyCadBaseModel): - """Local Origin (center of object bounding box).""" + """Local Origin ([0, 0, 0] in object space).""" type: Literal["local"] = "local" class OptionGlobal(KittyCadBaseModel): - """Global Origin (0, 0, 0).""" + """Global Origin ([0, 0, 0] in world space).""" type: Literal["global"] = "global" class OptionCustom(KittyCadBaseModel): - """Custom Origin (user specified point).""" + """Custom Origin (user specified point in world space).""" origin: Point3d diff --git a/kittycad/models/project_publication_info_response.py b/kittycad/models/project_publication_info_response.py index 3c47e18f6..66dd5815d 100644 --- a/kittycad/models/project_publication_info_response.py +++ b/kittycad/models/project_publication_info_response.py @@ -8,6 +8,8 @@ class ProjectPublicationInfoResponse(KittyCadBaseModel): """Owner-facing publication metadata for a project.""" + feedback: Optional[str] = None + has_unpublished_changes: bool last_published_at: Optional[datetime.datetime] = None diff --git a/kittycad/models/project_response.py b/kittycad/models/project_response.py index 22c04f42d..824648061 100644 --- a/kittycad/models/project_response.py +++ b/kittycad/models/project_response.py @@ -34,6 +34,8 @@ class ProjectResponse(KittyCadBaseModel): publication_status: KclProjectPublicationStatus + revision: str + title: str updated_at: datetime.datetime diff --git a/kittycad/models/project_summary_response.py b/kittycad/models/project_summary_response.py index 65cead132..b4e964c97 100644 --- a/kittycad/models/project_summary_response.py +++ b/kittycad/models/project_summary_response.py @@ -31,6 +31,8 @@ class ProjectSummaryResponse(KittyCadBaseModel): publication_status: KclProjectPublicationStatus + revision: str + title: str updated_at: datetime.datetime diff --git a/kittycad/models/region_get_resolvable_intersection_info.py b/kittycad/models/region_get_resolvable_intersection_info.py new file mode 100644 index 000000000..716259486 --- /dev/null +++ b/kittycad/models/region_get_resolvable_intersection_info.py @@ -0,0 +1,15 @@ +from .base import KittyCadBaseModel + + +class RegionGetResolvableIntersectionInfo(KittyCadBaseModel): + """The response from the 'RegionGetResolvableIntersectionInfo'.""" + + curve_clockwise: bool + + intersection_count: int + + intersection_index: int + + intersection_segment: str + + segment: str diff --git a/kittycad/models/update_org_dataset.py b/kittycad/models/update_org_dataset.py index bd9563f31..f72cc0ccd 100644 --- a/kittycad/models/update_org_dataset.py +++ b/kittycad/models/update_org_dataset.py @@ -11,4 +11,6 @@ class UpdateOrgDataset(KittyCadBaseModel): name: Optional[str] = None + require_raw_kcl_similarity_score_for_success: Optional[bool] = None + source: Optional[UpdateOrgDatasetSource] = None diff --git a/kittycad/models/user_feature.py b/kittycad/models/user_feature.py index 63fec7a80..d3aac76c1 100644 --- a/kittycad/models/user_feature.py +++ b/kittycad/models/user_feature.py @@ -2,12 +2,14 @@ class UserFeature(str, Enum): - AQUARIUM = "aquarium" - BODIES_PANE = "bodies_pane" ENABLE_Z0006_LINT = "enable_z0006_lint" + MODELING_DIALOGS = "modeling_dialogs" + + PLUGINS = "plugins" + PROPRIETARY_TO_KCL_CONVERSION_BETA = "proprietary_to_kcl_conversion_beta" SKETCH_EXPERIMENTAL_FEATURES = "sketch_experimental_features" diff --git a/kittycad/models/zookeeper_auto_router_metadata.py b/kittycad/models/zookeeper_auto_router_metadata.py new file mode 100644 index 000000000..c30f1b6cf --- /dev/null +++ b/kittycad/models/zookeeper_auto_router_metadata.py @@ -0,0 +1,15 @@ +from typing import List, Optional + +from .base import KittyCadBaseModel + + +class ZookeeperAutoRouterMetadata(KittyCadBaseModel): + """Zookeeper Auto-router decision metadata persisted on a copilot prompt.""" + + bucket: str + + prompt_template: Optional[str] = None + + reasons: Optional[List[str]] = None + + stage: Optional[str] = None diff --git a/kittycad/models/zookeeper_edit_patch.py b/kittycad/models/zookeeper_edit_patch.py new file mode 100644 index 000000000..edea7cd16 --- /dev/null +++ b/kittycad/models/zookeeper_edit_patch.py @@ -0,0 +1,12 @@ +from typing import List, Optional + +from ..models.zookeeper_edit_patch_file import ZookeeperEditPatchFile +from .base import KittyCadBaseModel + + +class ZookeeperEditPatch(KittyCadBaseModel): + """Local replay data for a single successful Zookeeper project edit.""" + + changed_files: Optional[List[ZookeeperEditPatchFile]] = None + + run_id: str diff --git a/kittycad/models/zookeeper_edit_patch_file.py b/kittycad/models/zookeeper_edit_patch_file.py new file mode 100644 index 000000000..5987c141c --- /dev/null +++ b/kittycad/models/zookeeper_edit_patch_file.py @@ -0,0 +1,48 @@ +from typing import Literal, Union + +from pydantic import Field, RootModel +from typing_extensions import Annotated + +from .base import KittyCadBaseModel + + +class OptionCreated(KittyCadBaseModel): + """The file was created by Zookeeper.""" + + contents: str + + path: str + + status: Literal["created"] = "created" + + +class OptionModified(KittyCadBaseModel): + """The file was modified by Zookeeper.""" + + diff: str + + path: str + + status: Literal["modified"] = "modified" + + +class OptionDeleted(KittyCadBaseModel): + """The file was deleted by Zookeeper.""" + + path: str + + previous_contents: str + + status: Literal["deleted"] = "deleted" + + +ZookeeperEditPatchFile = RootModel[ + Annotated[ + Union[ + OptionCreated, + OptionModified, + OptionDeleted, + ], + Field(discriminator="status"), + ] +] diff --git a/kittycad/tests/test_examples.py b/kittycad/tests/test_examples.py index 1fc48331b..05db8f514 100644 --- a/kittycad/tests/test_examples.py +++ b/kittycad/tests/test_examples.py @@ -7,8 +7,10 @@ from kittycad import AsyncKittyCAD, KittyCAD from kittycad.models import ( AccountProvider, + AnnouncementList, ApiCallWithPrice, ApiToken, + ApiTokenWithFullToken, AppClientInfo, AsyncApiCallOutput, AuthApiKeyResponse, @@ -37,13 +39,13 @@ MlCopilotClientMessage, OAuth2AppResponse, Org, - OrgAdminDetails, OrgDataset, OrgDatasetConversionStatsResponse, OrgDatasetFileConversionDetails, OrgDatasetFileConversionSummary, OrgDatasetSemanticSearchMatch, OrgMember, + OrgSkillResponse, PaymentIntent, PaymentMethod, Pong, @@ -131,23 +133,21 @@ OptionBase64EncodedXml, OptionUrl, ) -from kittycad.models.input_format3d import InputFormat3d, OptionGltf +from kittycad.models.input_format3d import InputFormat3d, OptionCreo from kittycad.models.kcl_code_completion_params import KclCodeCompletionParams from kittycad.models.kcl_code_completion_request import KclCodeCompletionRequest from kittycad.models.kcl_project_share_link_access_mode import ( KclProjectShareLinkAccessMode, ) from kittycad.models.lenient_url import LenientUrl -from kittycad.models.ml_copilot_client_message import OptionSystem -from kittycad.models.ml_copilot_system_command import MlCopilotSystemCommand +from kittycad.models.ml_copilot_client_message import OptionPing from kittycad.models.ml_feedback import MlFeedback -from kittycad.models.modeling_cmd import ModelingCmd, OptionObjectBringToFront -from kittycad.models.modeling_cmd_id import ModelingCmdId from kittycad.models.o_auth2_app_grant_type import OAuth2AppGrantType from kittycad.models.org_dataset_source import OrgDatasetSource from kittycad.models.org_details import OrgDetails -from kittycad.models.output_format3d import OptionStep, OutputFormat3d +from kittycad.models.output_format3d import OptionPly, OutputFormat3d from kittycad.models.plan_interval import PlanInterval +from kittycad.models.ply_storage import PlyStorage from kittycad.models.post_effect_type import PostEffectType from kittycad.models.price_upsert_request import PriceUpsertRequest from kittycad.models.privacy_settings import PrivacySettings @@ -158,14 +158,15 @@ from kittycad.models.public_mailing_list_membership_request import ( PublicMailingListMembershipRequest, ) +from kittycad.models.rtc_ice_candidate_init import RtcIceCandidateInit from kittycad.models.sales_inquiry_type import SalesInquiryType from kittycad.models.saml_identity_provider_create import SamlIdentityProviderCreate +from kittycad.models.selection import OptionDefaultScene, Selection from kittycad.models.service_account_uuid import ServiceAccountUuid from kittycad.models.session_uuid import SessionUuid from kittycad.models.source_position import SourcePosition from kittycad.models.source_range import SourceRange from kittycad.models.source_range_prompt import SourceRangePrompt -from kittycad.models.step_presentation import StepPresentation from kittycad.models.storage_provider import StorageProvider from kittycad.models.store_coupon_params import StoreCouponParams from kittycad.models.subscription_plan_billing_model import SubscriptionPlanBillingModel @@ -200,7 +201,7 @@ from kittycad.models.user_identifier import UserIdentifier from kittycad.models.user_org_role import UserOrgRole from kittycad.models.uuid import Uuid -from kittycad.models.web_socket_request import OptionModelingCmdReq +from kittycad.models.web_socket_request import OptionTrickleIce from kittycad.models.website_sales_form import WebsiteSalesForm from kittycad.models.website_support_form import WebsiteSupportForm from kittycad.models.zoo_product_subscriptions_org_request import ( @@ -279,6 +280,25 @@ async def test_create_text_to_cad_async(): ) +@pytest.mark.skip +def test_get_announcements(): + client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable + + result: AnnouncementList = client.meta.get_announcements() + + body: AnnouncementList = result + print(body) + + +# OR run async +@pytest.mark.asyncio +@pytest.mark.skip +async def test_get_announcements_async(): + client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable + + result: AnnouncementList = await client.meta.get_announcements() + + @pytest.mark.skip def test_get_api_call(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable @@ -541,7 +561,7 @@ def test_create_file_center_of_mass(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileCenterOfMass = client.file.create_file_center_of_mass( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_unit=UnitLength.CM, body=bytes("some bytes", "utf-8"), ) @@ -557,7 +577,7 @@ async def test_create_file_center_of_mass_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileCenterOfMass = await client.file.create_file_center_of_mass( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_unit=UnitLength.CM, body=bytes("some bytes", "utf-8"), ) @@ -570,7 +590,7 @@ def test_create_file_conversion_options(): result: FileConversion = client.file.create_file_conversion_options( body=ConversionParams( output_format=OutputFormat3d( - OptionStep( + OptionPly( coords=System( forward=AxisDirectionPair( axis=Axis.Y, @@ -581,11 +601,26 @@ def test_create_file_conversion_options(): direction=Direction.POSITIVE, ), ), - presentation=StepPresentation.COMPACT, + selection=Selection(OptionDefaultScene()), + storage=PlyStorage.ASCII, units=UnitLength.CM, ) ), - src_format=InputFormat3d(OptionGltf()), + src_format=InputFormat3d( + OptionCreo( + coords=System( + forward=AxisDirectionPair( + axis=Axis.Y, + direction=Direction.POSITIVE, + ), + up=AxisDirectionPair( + axis=Axis.Y, + direction=Direction.POSITIVE, + ), + ), + split_closed_faces=False, + ) + ), ), file_attachments={ "main.kcl": Path("path/to/main.kcl"), @@ -606,7 +641,7 @@ async def test_create_file_conversion_options_async(): result: FileConversion = await client.file.create_file_conversion_options( body=ConversionParams( output_format=OutputFormat3d( - OptionStep( + OptionPly( coords=System( forward=AxisDirectionPair( axis=Axis.Y, @@ -617,11 +652,26 @@ async def test_create_file_conversion_options_async(): direction=Direction.POSITIVE, ), ), - presentation=StepPresentation.COMPACT, + selection=Selection(OptionDefaultScene()), + storage=PlyStorage.ASCII, units=UnitLength.CM, ) ), - src_format=InputFormat3d(OptionGltf()), + src_format=InputFormat3d( + OptionCreo( + coords=System( + forward=AxisDirectionPair( + axis=Axis.Y, + direction=Direction.POSITIVE, + ), + up=AxisDirectionPair( + axis=Axis.Y, + direction=Direction.POSITIVE, + ), + ), + split_closed_faces=False, + ) + ), ), file_attachments={ "main.kcl": Path("path/to/main.kcl"), @@ -635,7 +685,7 @@ def test_create_file_conversion(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileConversion = client.file.create_file_conversion( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_format=FileExportFormat.FBX, body=bytes("some bytes", "utf-8"), ) @@ -651,7 +701,7 @@ async def test_create_file_conversion_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileConversion = await client.file.create_file_conversion( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_format=FileExportFormat.FBX, body=bytes("some bytes", "utf-8"), ) @@ -662,7 +712,7 @@ def test_create_file_density(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileDensity = client.file.create_file_density( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, material_mass=3.14, material_mass_unit=UnitMass.G, output_unit=UnitDensity.LB_FT3, @@ -680,7 +730,7 @@ async def test_create_file_density_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileDensity = await client.file.create_file_density( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, material_mass=3.14, material_mass_unit=UnitMass.G, output_unit=UnitDensity.LB_FT3, @@ -716,7 +766,7 @@ def test_create_file_mass(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileMass = client.file.create_file_mass( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, material_density=3.14, material_density_unit=UnitDensity.LB_FT3, output_unit=UnitMass.G, @@ -734,7 +784,7 @@ async def test_create_file_mass_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileMass = await client.file.create_file_mass( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, material_density=3.14, material_density_unit=UnitDensity.LB_FT3, output_unit=UnitMass.G, @@ -747,7 +797,7 @@ def test_create_file_surface_area(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileSurfaceArea = client.file.create_file_surface_area( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_unit=UnitArea.CM2, body=bytes("some bytes", "utf-8"), ) @@ -763,7 +813,7 @@ async def test_create_file_surface_area_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileSurfaceArea = await client.file.create_file_surface_area( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_unit=UnitArea.CM2, body=bytes("some bytes", "utf-8"), ) @@ -774,7 +824,7 @@ def test_create_file_volume(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileVolume = client.file.create_file_volume( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_unit=UnitVolume.MM3, body=bytes("some bytes", "utf-8"), ) @@ -790,7 +840,7 @@ async def test_create_file_volume_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable result: FileVolume = await client.file.create_file_volume( - src_format=FileImportFormat.FBX, + src_format=FileImportFormat.ACIS, output_unit=UnitVolume.MM3, body=bytes("some bytes", "utf-8"), ) @@ -1344,6 +1394,7 @@ def test_create_org_dataset(): result: OrgDataset = client.orgs.create_org_dataset( body=CreateOrgDataset( name="", + require_raw_kcl_similarity_score_for_success=False, source=OrgDatasetSource( provider=StorageProvider.S3, ), @@ -1363,6 +1414,7 @@ async def test_create_org_dataset_async(): result: OrgDataset = await client.orgs.create_org_dataset( body=CreateOrgDataset( name="", + require_raw_kcl_similarity_score_for_success=False, source=OrgDatasetSource( provider=StorageProvider.S3, ), @@ -2301,8 +2353,8 @@ def test_create_org_saml_idp(): body=SamlIdentityProviderCreate( idp_entity_id="", idp_metadata_source=IdpMetadataSource( - OptionUrl( - url="", + OptionBase64EncodedXml( + data=Base64Data(b""), ) ), technical_contact_email="", @@ -2323,8 +2375,8 @@ async def test_create_org_saml_idp_async(): body=SamlIdentityProviderCreate( idp_entity_id="", idp_metadata_source=IdpMetadataSource( - OptionUrl( - url="", + OptionBase64EncodedXml( + data=Base64Data(b""), ) ), technical_contact_email="", @@ -2340,8 +2392,8 @@ def test_update_org_saml_idp(): body=SamlIdentityProviderCreate( idp_entity_id="", idp_metadata_source=IdpMetadataSource( - OptionBase64EncodedXml( - data=Base64Data(b""), + OptionUrl( + url="", ) ), technical_contact_email="", @@ -2362,8 +2414,8 @@ async def test_update_org_saml_idp_async(): body=SamlIdentityProviderCreate( idp_entity_id="", idp_metadata_source=IdpMetadataSource( - OptionBase64EncodedXml( - data=Base64Data(b""), + OptionUrl( + url="", ) ), technical_contact_email="", @@ -2425,9 +2477,7 @@ async def test_create_service_account_for_org_async(): def test_delete_service_account_for_org(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - client.service_accounts.delete_service_account_for_org( - token=ServiceAccountUuid("") - ) + client.service_accounts.delete_service_account_for_org(token="") # OR run async @@ -2436,9 +2486,7 @@ def test_delete_service_account_for_org(): async def test_delete_service_account_for_org_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - await client.service_accounts.delete_service_account_for_org( - token=ServiceAccountUuid("") - ) + await client.service_accounts.delete_service_account_for_org(token="") @pytest.mark.skip @@ -2492,24 +2540,22 @@ async def test_get_org_shortlinks_async(): @pytest.mark.skip -def test_org_admin_details_get(): +def test_list_org_skills(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - result: OrgAdminDetails = client.orgs.org_admin_details_get(id=Uuid("")) + result: List[OrgSkillResponse] = client.orgs.list_org_skills() - body: OrgAdminDetails = result + body: List[OrgSkillResponse] = result print(body) # OR run async @pytest.mark.asyncio @pytest.mark.skip -async def test_org_admin_details_get_async(): +async def test_list_org_skills_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - result: OrgAdminDetails = await client.orgs.org_admin_details_get( - id=Uuid("") - ) + result: List[OrgSkillResponse] = await client.orgs.list_org_skills() @pytest.mark.skip @@ -3485,9 +3531,11 @@ async def test_list_api_tokens_for_user_async(): def test_create_api_token_for_user(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - result: ApiToken = client.api_tokens.create_api_token_for_user(label=None) + result: ApiTokenWithFullToken = client.api_tokens.create_api_token_for_user( + label=None + ) - body: ApiToken = result + body: ApiTokenWithFullToken = result print(body) @@ -3497,14 +3545,16 @@ def test_create_api_token_for_user(): async def test_create_api_token_for_user_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - result: ApiToken = await client.api_tokens.create_api_token_for_user(label=None) + result: ApiTokenWithFullToken = await client.api_tokens.create_api_token_for_user( + label=None + ) @pytest.mark.skip def test_delete_api_token_for_user(): client = KittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - client.api_tokens.delete_api_token_for_user(token=ApiTokenUuid("")) + client.api_tokens.delete_api_token_for_user(token="") # OR run async @@ -3513,7 +3563,7 @@ def test_delete_api_token_for_user(): async def test_delete_api_token_for_user_async(): client = AsyncKittyCAD() # Uses KITTYCAD_API_TOKEN environment variable - await client.api_tokens.delete_api_token_for_user(token=ApiTokenUuid("")) + await client.api_tokens.delete_api_token_for_user(token="") @pytest.mark.skip @@ -5046,13 +5096,7 @@ def test_ml_copilot_ws(): replay=None, conversation_id=None, pr=None ) as websocket: # Send a message. - websocket.send( - MlCopilotClientMessage( - OptionSystem( - command=MlCopilotSystemCommand.NEW, - ) - ) - ) + websocket.send(MlCopilotClientMessage(OptionPing())) # Get a message. message = websocket.recv() @@ -5085,13 +5129,7 @@ def test_ml_reasoning_ws(): # Connect to the websocket. with client.ml.ml_reasoning_ws(id="") as websocket: # Send a message. - websocket.send( - MlCopilotClientMessage( - OptionSystem( - command=MlCopilotSystemCommand.NEW, - ) - ) - ) + websocket.send(MlCopilotClientMessage(OptionPing())) # Get a message. message = websocket.recv() @@ -5137,13 +5175,10 @@ def test_modeling_commands_ws(): # Send a message. websocket.send( WebSocketRequest( - OptionModelingCmdReq( - cmd=ModelingCmd( - OptionObjectBringToFront( - object_id="", - ) + OptionTrickleIce( + candidate=RtcIceCandidateInit( + candidate="", ), - cmd_id=ModelingCmdId(""), ) ) ) diff --git a/kittycad/tests/test_org_dataset_models.py b/kittycad/tests/test_org_dataset_models.py index 79257ab98..cd590cf81 100644 --- a/kittycad/tests/test_org_dataset_models.py +++ b/kittycad/tests/test_org_dataset_models.py @@ -44,6 +44,7 @@ def test_response_validation_can_ignore_future_fields(): "id": "550e8400-e29b-41d4-a716-446655440000", "name": "training-data", "org_id": "550e8400-e29b-41d4-a716-446655440001", + "require_raw_kcl_similarity_score_for_success": False, "source_uri": "zoo://bucket/test/datasets/550e8400-e29b-41d4-a716-446655440000", "status": OrgDatasetStatus.ACTIVE, "storage_provider": StorageProvider.ZOO_MANAGED, diff --git a/spec.json b/spec.json index b7d4fb62c..377a60fd1 100644 --- a/spec.json +++ b/spec.json @@ -415,6 +415,100 @@ } } }, + "/announcements": { + "get": { + "tags": [ + "meta" + ], + "summary": "List all active announcements.", + "description": "No authentication is required.", + "operationId": "get_announcements", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Content-Location": { + "description": "The Content-Location header for responses that are not the final destination. This is used to indicate where the resource can be found, when it is finished.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Location": { + "description": "The location header for redirects and letting users know if there is a websocket they can listen to for status updates on their operation.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnnouncementList" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, "/api-calls/{id}": { "get": { "tags": [ @@ -15391,16 +15485,16 @@ "service-accounts" ], "summary": "Delete an service account for your org.", - "description": "This endpoint requires authentication by an org member. It deletes the requested service account for the organization.\n\nThis endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.", + "description": "This endpoint requires authentication by an org member. It deletes the requested service account for the organization.\n\nThis endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.\n\nThe token path parameter can be either the full service account token (prefixed with `svc-`) or the token's unique ID (a UUID).", "operationId": "delete_service_account_for_org", "parameters": [ { "in": "path", "name": "token", - "description": "The service account.", + "description": "The service account token (prefixed with `svc-`) or the token's unique ID (a UUID).", "required": true, "schema": { - "$ref": "#/components/schemas/ServiceAccountUuid" + "type": "string" } } ], @@ -15706,26 +15800,13 @@ } } }, - "/orgs/{id}/admin/details": { + "/org/skills": { "get": { "tags": [ - "orgs", - "hidden" - ], - "summary": "Get admin-only details for an organization.", - "description": "Zoo admins can retrieve extended information about any organization, while non-admins receive a 404 to avoid leaking existence.", - "operationId": "org_admin_details_get", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The organization ID.", - "required": true, - "schema": { - "$ref": "#/components/schemas/Uuid" - } - } + "orgs" ], + "summary": "List every skill that belongs to the caller's organization.", + "operationId": "list_org_skills", "responses": { "200": { "description": "successful operation", @@ -15798,7 +15879,96 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgAdminDetails" + "title": "Array_of_OrgSkillResponse", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgSkillResponse" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_org_skills", + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Content-Location": { + "description": "The Content-Location header for responses that are not the final destination. This is used to indicate where the resource can be found, when it is finished.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Location": { + "description": "The location header for redirects and letting users know if there is a websocket they can listen to for status updates on their operation.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "schema": { + "nullable": true, + "type": "string" + } + }, + "X-Api-Call-Id": { + "description": "ID for this request. We return it so that users can report this to us and help us debug their problems.", + "style": "simple", + "required": true, + "schema": { + "type": "string" } } } @@ -20798,7 +20968,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiToken" + "$ref": "#/components/schemas/ApiTokenWithFullToken" } } } @@ -21006,16 +21176,16 @@ "api-tokens" ], "summary": "Delete an API token for your user.", - "description": "This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", + "description": "This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n\nThe token path parameter can be either the full API token (prefixed with `api-`) or the token's unique ID (a UUID).", "operationId": "delete_api_token_for_user", "parameters": [ { "in": "path", "name": "token", - "description": "The API token.", + "description": "The API token (prefixed with `api-`) or the token's unique ID (a UUID).", "required": true, "schema": { - "$ref": "#/components/schemas/ApiTokenUuid" + "type": "string" } } ], @@ -30801,13 +30971,14 @@ "description": "Attach to a docker container to create an interactive terminal.", "operationId": "create_executor_term", "responses": { - "default": { - "description": "", - "content": { - "*/*": { - "schema": {} - } - } + "101": { + "description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, "x-dropshot-websocket": {} @@ -30874,6 +31045,15 @@ } } } + }, + "101": { + "description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, "x-dropshot-websocket": {} @@ -30919,6 +31099,15 @@ } } } + }, + "101": { + "description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, "x-dropshot-websocket": {} @@ -31063,6 +31252,15 @@ } } } + }, + "101": { + "description": "Negotiating protocol upgrade from HTTP/1.1 to WebSocket" + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" } }, "x-dropshot-websocket": {} @@ -31363,7 +31561,17 @@ "type": "number", "format": "float" }, + "from_edge_reference": { + "nullable": true, + "description": "Edge reference to use to measure the dimension from If both `from_entity_id` and `from_edge_reference` are provided, `from_edge_reference` takes precedence.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeSpecifier" + } + ] + }, "from_entity_id": { + "nullable": true, "description": "Entity to measure the dimension from", "type": "string", "format": "uuid" @@ -31395,7 +31603,17 @@ "format": "uint32", "minimum": 0 }, + "to_edge_reference": { + "nullable": true, + "description": "Edge reference to use to measure the dimension from If both `to_entity_id` and `to_edge_reference` are provided, `to_edge_reference` takes precedence.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeSpecifier" + } + ] + }, "to_entity_id": { + "nullable": true, "description": "Entity to measure the dimension to", "type": "string", "format": "uuid" @@ -31413,12 +31631,10 @@ "dimension", "font_point_size", "font_scale", - "from_entity_id", "from_entity_pos", "offset", "plane_id", "precision", - "to_entity_id", "to_entity_pos" ] }, @@ -31451,7 +31667,17 @@ } ] }, + "edge_reference": { + "nullable": true, + "description": "Edge reference to use to place the annotation leader from If both `entity_id` and `edge_reference` are provided, `edge_reference` takes precedence.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeSpecifier" + } + ] + }, "entity_id": { + "nullable": true, "description": "Entity to place the annotation leader from", "type": "string", "format": "uuid" @@ -31520,7 +31746,6 @@ } }, "required": [ - "entity_id", "entity_pos", "font_point_size", "font_scale", @@ -31534,7 +31759,17 @@ "description": "Parameters for defining an MBD Feature Tag Annotation state", "type": "object", "properties": { + "edge_reference": { + "nullable": true, + "description": "Edge reference to use to place the annotation leader from If both `entity_id` and `edge_reference` are provided, `edge_reference` takes precedence.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeSpecifier" + } + ] + }, "entity_id": { + "nullable": true, "description": "Entity to place the annotation leader from", "type": "string", "format": "uuid" @@ -31599,7 +31834,6 @@ } }, "required": [ - "entity_id", "entity_pos", "font_point_size", "font_scale", @@ -31809,6 +32043,15 @@ "$ref": "#/components/schemas/AnnotationTextOptions" } ] + }, + "units": { + "nullable": true, + "description": "Length Units to use for this individual annotation. If not provided, the units set by SetSceneUnits will be used.", + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ] } } }, @@ -31887,6 +32130,60 @@ } ] }, + "Announcement": { + "description": "An announcement broadcast to all clients.", + "type": "object", + "properties": { + "active": { + "type": "boolean" + }, + "body": { + "type": "string" + }, + "created_at": { + "title": "DateTime", + "type": "string", + "format": "date-time" + }, + "id": { + "$ref": "#/components/schemas/Uuid" + }, + "tag": { + "type": "string" + }, + "title": { + "type": "string" + }, + "updated_at": { + "title": "DateTime", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "active", + "created_at", + "id", + "title", + "updated_at" + ] + }, + "AnnouncementList": { + "description": "Response containing active announcements.", + "type": "object", + "properties": { + "announcements": { + "description": "The list of active announcements.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Announcement" + } + } + }, + "required": [ + "announcements" + ] + }, "ApiCallStatus": { "description": "The status of an async API call.", "oneOf": [ @@ -32170,7 +32467,7 @@ "type": "string" }, "token": { - "description": "The API token itself.", + "description": "The API token itself. Note: This is partially obfuscated when serialized to JSON responses, as API tokens are too sensitive to return in full. Only the last 4 characters are shown to allow users to identify their tokens.", "allOf": [ { "$ref": "#/components/schemas/ApiTokenUuid" @@ -32226,6 +32523,65 @@ "description": "An auth token. A uuid with a prefix of api-", "type": "string" }, + "ApiTokenWithFullToken": { + "description": "An API token with the full, unobfuscated token value.\n\nThis is used specifically for the creation endpoint response, where the user needs to see the full token exactly once. All other endpoints return the obfuscated version via the `ApiToken` struct.", + "type": "object", + "properties": { + "created_at": { + "title": "DateTime", + "description": "The date and time the API token was created.", + "type": "string", + "format": "date-time" + }, + "id": { + "description": "The unique identifier for the API token.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "is_valid": { + "description": "If the token is valid.", + "type": "boolean" + }, + "label": { + "nullable": true, + "description": "An optional label for the API token.", + "type": "string" + }, + "token": { + "description": "The API token itself - unobfuscated.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiTokenUuid" + } + ] + }, + "updated_at": { + "title": "DateTime", + "description": "The date and time the API token was last updated.", + "type": "string", + "format": "date-time" + }, + "user_id": { + "description": "The ID of the user that owns the API token.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + } + }, + "required": [ + "created_at", + "id", + "is_valid", + "token", + "updated_at", + "user_id" + ] + }, "AppClientInfo": { "description": "Information about a third party app client.", "type": "object", @@ -35728,6 +36084,11 @@ "description": "The dataset's display name.", "type": "string" }, + "require_raw_kcl_similarity_score_for_success": { + "description": "Whether a low raw-KCL similarity score should block conversion success.", + "default": false, + "type": "boolean" + }, "source": { "description": "Details for accessing the dataset.", "allOf": [ @@ -36502,6 +36863,60 @@ } ] }, + "DirectionType": { + "description": "What to use as a direction when one is needed (e.g. for an extrusion).", + "oneOf": [ + { + "description": "Uses the direction of an edge, if linear", + "type": "object", + "properties": { + "edge": { + "type": "object", + "properties": { + "id": { + "description": "Edge ID.", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "id" + ] + } + }, + "required": [ + "edge" + ], + "additionalProperties": false + }, + { + "description": "Uses the provided vector as the direction.", + "type": "object", + "properties": { + "axis": { + "type": "object", + "properties": { + "direction": { + "description": "Direction.", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ] + } + }, + "required": [ + "direction" + ] + } + }, + "required": [ + "axis" + ], + "additionalProperties": false + } + ] + }, "DisableDryRun": { "description": "The response from the `DisableDryRun` endpoint.", "type": "object" @@ -36612,6 +37027,49 @@ } ] }, + "EdgeCutVersion": { + "description": "Edge cut algorithm version.", + "oneOf": [ + { + "description": "Let the engine choose whichever version it wants.", + "type": "string", + "enum": [ + "v0" + ] + }, + { + "description": "The original fillet algorithm Zoo 1.0 shipped with. Limitations: doesn't support rolling ball fillets, has several bugs that will not be fixed.", + "type": "string", + "enum": [ + "v1" + ] + }, + { + "description": "Adds support for rolling ball fillets. Fixes bugs from V1. Still experimental.", + "type": "string", + "enum": [ + "v2" + ] + } + ] + }, + "EdgeGetLength": { + "description": "The response from the `EdgeGetLength` command.", + "type": "object", + "properties": { + "length": { + "description": "The length of the edge.", + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] + } + }, + "required": [ + "length" + ] + }, "EdgeInfo": { "description": "A list of faces for a specific edge.", "type": "object", @@ -38515,6 +38973,27 @@ "FileImportFormat": { "description": "The valid types of source file formats.", "oneOf": [ + { + "description": "ACIS part format.", + "type": "string", + "enum": [ + "acis" + ] + }, + { + "description": "CATIA part format.", + "type": "string", + "enum": [ + "catia" + ] + }, + { + "description": "PTC Creo part format.", + "type": "string", + "enum": [ + "creo" + ] + }, { "description": "Autodesk Filmbox (FBX) format. ", "type": "string", @@ -38529,6 +39008,20 @@ "gltf" ] }, + { + "description": "Autodesk Inventor part format.", + "type": "string", + "enum": [ + "inventor" + ] + }, + { + "description": "Siemens NX part format.", + "type": "string", + "enum": [ + "nx" + ] + }, { "description": "The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.", "type": "string", @@ -38536,6 +39029,13 @@ "obj" ] }, + { + "description": "Parasolid part format.", + "type": "string", + "enum": [ + "parasolid" + ] + }, { "description": "The PLY file format. ", "type": "string", @@ -39232,6 +39732,120 @@ "InputFormat3d": { "description": "Input format specifier.", "oneOf": [ + { + "description": "ACIS part format.", + "type": "object", + "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "y", + "direction": "negative" + }, + "up": { + "axis": "z", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, + "split_closed_faces": { + "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "acis" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "CATIA part format.", + "type": "object", + "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "y", + "direction": "negative" + }, + "up": { + "axis": "z", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, + "split_closed_faces": { + "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "catia" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "PTC Creo part format.", + "type": "object", + "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "z", + "direction": "positive" + }, + "up": { + "axis": "y", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, + "split_closed_faces": { + "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "creo" + ] + } + }, + "required": [ + "type" + ] + }, { "description": "Autodesk Filmbox (FBX) format.", "type": "object", @@ -39262,6 +39876,82 @@ "type" ] }, + { + "description": "Autodesk Inventor part format.", + "type": "object", + "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "y", + "direction": "negative" + }, + "up": { + "axis": "z", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, + "split_closed_faces": { + "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "inventor" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "Siemens NX part format.", + "type": "object", + "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "y", + "direction": "negative" + }, + "up": { + "axis": "z", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, + "split_closed_faces": { + "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "nx" + ] + } + }, + "required": [ + "type" + ] + }, { "description": "Wavefront OBJ format.", "type": "object", @@ -39295,6 +39985,44 @@ "units" ] }, + { + "description": "Parasolid part format.", + "type": "object", + "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "y", + "direction": "negative" + }, + "up": { + "axis": "z", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, + "split_closed_faces": { + "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", + "default": false, + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "parasolid" + ] + } + }, + "required": [ + "type" + ] + }, { "description": "The PLY Polygon File Format.", "type": "object", @@ -39332,6 +40060,24 @@ "description": "SolidWorks part (SLDPRT) format.", "type": "object", "properties": { + "coords": { + "description": "Co-ordinate system of input data.", + "default": { + "forward": { + "axis": "z", + "direction": "positive" + }, + "up": { + "axis": "y", + "direction": "positive" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/System" + } + ] + }, "split_closed_faces": { "description": "Splits all closed faces into two open faces.\n\nDefaults to `false` but is implicitly `true` when importing into the engine.", "default": false, @@ -40072,6 +40818,13 @@ "enum": [ "deleted" ] + }, + { + "description": "The project was reviewed and changes were requested before it can be published.", + "type": "string", + "enum": [ + "changes_requested" + ] } ] }, @@ -40698,6 +41451,13 @@ "enum": [ "thoughtful" ] + }, + { + "description": "Let the system automatically choose the model and reasoning effort.", + "type": "string", + "enum": [ + "auto" + ] } ] }, @@ -40709,6 +41469,11 @@ "description": "Human-readable display description.", "type": "string" }, + "disabled": { + "description": "Whether this mode is unavailable for the user's current plan.", + "default": false, + "type": "boolean" + }, "icon": { "description": "Client icon identifier.", "type": "string" @@ -41046,7 +41811,20 @@ "additionalProperties": false }, { - "description": "Replay containing raw bytes for previously-saved messages for a conversation. Includes server messages and client `User` messages.\n\nInvariants: - Includes server messages: `Info`, `Error`, `Reasoning(..)`, `ToolOutput { .. }`, `Files { .. }`, `ProjectUpdated { .. }`, and `EndOfStream { .. }`. - Also includes client `User` messages. - The following are NEVER included: `SessionData`, `ConversationId`, `Delta`, or `BackendShutdown`. - Ordering is stable: messages are ordered by prompt creation time within the conversation, then by the per-prompt `seq` value (monotonically increasing as seen in the original stream).\n\nWire format: - Each element is canonical serialized bytes (typically JSON) for either a `MlCopilotServerMessage` or a `MlCopilotClientMessage::User`. - When delivered as an initial replay over the websocket (upon `?replay=true&conversation_id=`), the server sends a single WebSocket Binary frame containing a MsgPack-encoded document of this enum: `Replay { messages }`.", + "description": "Backend-only Zookeeper Auto-router metadata.\n\nAPI persists this on the active prompt and does not forward it to clients or replay it as a chat message.", + "type": "object", + "properties": { + "zookeeper_auto_router_metadata": { + "$ref": "#/components/schemas/ZookeeperAutoRouterMetadata" + } + }, + "required": [ + "zookeeper_auto_router_metadata" + ], + "additionalProperties": false + }, + { + "description": "Replay containing raw bytes for previously-saved messages for a conversation. Includes server messages and client `User` messages.\n\nInvariants: - Includes server messages: `Info`, `Error`, `Reasoning(..)`, `ToolOutput { .. }`, `Files { .. }`, `ProjectUpdated { .. }`, and `EndOfStream { .. }`. - Also includes client `User` messages. - The following are NEVER included: `SessionData`, `ConversationId`, `Delta`, `BackendShutdown`, or `ZookeeperAutoRouterMetadata`. - Ordering is stable: messages are ordered by prompt creation time within the conversation, then by the per-prompt `seq` value (monotonically increasing as seen in the original stream).\n\nWire format: - Each element is canonical serialized bytes (typically JSON) for either a `MlCopilotServerMessage` or a `MlCopilotClientMessage::User`. - When delivered as an initial replay over the websocket (upon `?replay=true&conversation_id=`), the server sends a single WebSocket Binary frame containing a MsgPack-encoded document of this enum: `Replay { messages }`.", "type": "object", "properties": { "replay": { @@ -41429,6 +42207,15 @@ "enum": [ "edit_kcl_code" ] + }, + "zookeeper_edit_patch": { + "nullable": true, + "description": "Optional reversible delta for undoing/redoing a Zookeeper project edit locally. The `outputs` map remains the resulting project state.", + "allOf": [ + { + "$ref": "#/components/schemas/ZookeeperEditPatch" + } + ] } }, "required": [ @@ -41742,6 +42529,15 @@ } ] }, + "direction": { + "nullable": true, + "description": "What direction to extrude in. If None, the engine will extrude in the direction normal of the target's plane.", + "allOf": [ + { + "$ref": "#/components/schemas/DirectionType" + } + ] + }, "distance": { "description": "How far off the plane to extrude", "allOf": [ @@ -41750,6 +42546,15 @@ } ] }, + "draft_angle": { + "nullable": true, + "description": "What draft angle should be used in this extrusion? Negative values indicate an outward draft, while positive values indicate an inward draft", + "allOf": [ + { + "$ref": "#/components/schemas/Angle" + } + ] + }, "extrude_method": { "description": "Should the extrusion create a new object or be part of the existing object.", "default": "merge", @@ -41969,9 +42774,14 @@ } ] }, + "orient_profile_perpendicular": { + "nullable": true, + "description": "If true, before the sweep starts, the profile will be re-oriented so that it is perpendicular to the path being swept along. If false, the profile is left in its current orientation. Defaults to false.", + "type": "boolean" + }, "relative_to": { - "description": "What is this sweep relative to?", - "default": "sketch_plane", + "nullable": true, + "description": "What is this sweep relative to? Deprecated; please use `translate_profile_to_path` and `orient_profile_perpendicular` instead.", "allOf": [ { "$ref": "#/components/schemas/RelativeTo" @@ -42006,6 +42816,11 @@ } ] }, + "translate_profile_to_path": { + "nullable": true, + "description": "If true, the profile being swept will be moved to the path being swept along, before the sweep starts. If false, the profile stays where it is, and the sweep starts from there. Defaults to false.", + "type": "boolean" + }, "type": { "type": "string", "enum": [ @@ -43094,6 +43909,27 @@ "type" ] }, + { + "description": "What is the length of this edge?", + "type": "object", + "properties": { + "edge_id": { + "description": "ID of the edge being queried.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "edge_get_length" + ] + } + }, + "required": [ + "edge_id", + "type" + ] + }, { "description": "Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.", "type": "object", @@ -43991,6 +44827,31 @@ "type" ] }, + { + "description": "Set the name of an object", + "type": "object", + "properties": { + "name": { + "description": "Name of the object. Using a zero-length name unsets the name.", + "type": "string" + }, + "object_id": { + "description": "Which object to change", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "object_set_name" + ] + } + }, + "required": [ + "object_id", + "type" + ] + }, { "description": "What type of entity is this?", "type": "object", @@ -44364,6 +45225,14 @@ "use_legacy": { "description": "If true, use the legacy CSG algorithm.", "type": "boolean" + }, + "version": { + "description": "Which version of the edge cut algorithm to use.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeCutVersion" + } + ] } }, "required": [ @@ -44433,6 +45302,14 @@ "use_legacy": { "description": "If true, use the legacy CSG algorithm.", "type": "boolean" + }, + "version": { + "description": "Which version of the edge cut algorithm to use.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeCutVersion" + } + ] } }, "required": [ @@ -44503,6 +45380,14 @@ "use_legacy": { "description": "If true, use the legacy CSG algorithm.", "type": "boolean" + }, + "version": { + "description": "Which version of the edge cut algorithm to use.", + "allOf": [ + { + "$ref": "#/components/schemas/EdgeCutVersion" + } + ] } }, "required": [ @@ -45630,7 +46515,7 @@ ] }, { - "description": "Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in.", + "description": "Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in. If not set, engine units default to mm.", "type": "object", "properties": { "type": { @@ -46681,6 +47566,27 @@ "type" ] }, + { + "description": "Finds a suitable set of arguments that can be passed to CreateRegion to resolve this very region.", + "type": "object", + "properties": { + "region_id": { + "description": "Which region to resolve", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "region_get_resolvable_intersection_info" + ] + } + }, + "required": [ + "region_id", + "type" + ] + }, { "description": "Create a region with a query point. The region should have an ID taken from the ID of the 'CreateRegionFromQueryPoint' modeling command.", "type": "object", @@ -47359,6 +48265,10 @@ "description": "The response from the `ObjectSetMaterialParamsPbr` endpoint.", "type": "object" }, + "ObjectSetName": { + "description": "The response from the `ObjectSetName` endpoint.", + "type": "object" + }, "ObjectVisible": { "description": "The response from the `ObjectVisible` endpoint.", "type": "object" @@ -47943,6 +48853,24 @@ "type" ] }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ObjectSetName" + }, + "type": { + "type": "string", + "enum": [ + "object_set_name" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "type": "object", "properties": { @@ -49815,6 +50743,24 @@ "type" ] }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EdgeGetLength" + }, + "type": { + "type": "string", + "enum": [ + "edge_get_length" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "type": "object", "properties": { @@ -50265,6 +51211,24 @@ "type" ] }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/RegionGetResolvableIntersectionInfo" + }, + "type": { + "type": "string", + "enum": [ + "region_get_resolvable_intersection_info" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "type": "object", "properties": { @@ -50773,142 +51737,6 @@ "updated_at" ] }, - "OrgAddress": { - "description": "An address for an organization.", - "type": "object", - "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component. This is a two-letter ISO country code.", - "allOf": [ - { - "$ref": "#/components/schemas/CountryCode" - } - ] - }, - "created_at": { - "title": "DateTime", - "description": "The time and date the address was created.", - "type": "string", - "format": "date-time" - }, - "id": { - "description": "The unique identifier of the address.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "org_id": { - "description": "The org ID that this address belongs to.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" - }, - "street2": { - "description": "The second street component.", - "type": "string" - }, - "updated_at": { - "title": "DateTime", - "description": "The time and date the address was last updated.", - "type": "string", - "format": "date-time" - }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "required": [ - "country", - "created_at", - "id", - "org_id", - "updated_at" - ] - }, - "OrgAdminDetails": { - "description": "Extra admin-only details for an organization.", - "type": "object", - "properties": { - "address": { - "nullable": true, - "description": "Latest billing address stored for the organization.", - "allOf": [ - { - "$ref": "#/components/schemas/OrgAddress" - } - ] - }, - "address_summary": { - "nullable": true, - "description": "Readable billing address summary.", - "type": "string" - }, - "block": { - "nullable": true, - "description": "Block reason when the org is blocked.", - "allOf": [ - { - "$ref": "#/components/schemas/BlockReason" - } - ] - }, - "block_message": { - "nullable": true, - "description": "Human-friendly block reason message.", - "type": "string" - }, - "never_block": { - "description": "Whether this organization is permanently exempt from blocking.", - "type": "boolean" - }, - "payment_methods": { - "description": "Known payment methods on file.", - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethod" - } - }, - "payment_methods_summary": { - "description": "Summaries of the known payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "stripe_customer_id": { - "nullable": true, - "description": "Stripe customer identifier if one exists.", - "type": "string" - }, - "stripe_dashboard_url": { - "nullable": true, - "description": "Direct link to the Stripe customer dashboard.", - "type": "string" - } - }, - "required": [ - "never_block", - "payment_methods", - "payment_methods_summary" - ] - }, "OrgDataset": { "description": "Dataset owned by an organization, reusable across multiple features.", "type": "object", @@ -50960,6 +51788,10 @@ } ] }, + "require_raw_kcl_similarity_score_for_success": { + "description": "Whether a low raw-KCL similarity score should block conversion success for this dataset.", + "type": "boolean" + }, "source_uri": { "description": "Fully-qualified URI to the dataset location (e.g. s3://bucket/prefix).", "type": "string" @@ -50993,6 +51825,7 @@ "id", "name", "org_id", + "require_raw_kcl_similarity_score_for_success", "source_uri", "status", "storage_provider", @@ -51819,6 +52652,38 @@ } ] }, + "OrgSkillResponse": { + "description": "Public skill context available to the caller's organization.", + "type": "object", + "properties": { + "description": { + "description": "Short description injected into Zookeeper's initial prompt.", + "type": "string" + }, + "id": { + "description": "Stable skill identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "markdown": { + "description": "Full markdown context loaded when the skill is activated.", + "type": "string" + }, + "name": { + "description": "Human-readable activation name.", + "type": "string" + } + }, + "required": [ + "description", + "id", + "markdown", + "name" + ] + }, "OrientToFace": { "description": "The response from the `OrientToFace` command.", "type": "object", @@ -51840,7 +52705,7 @@ "description": "The type of origin", "oneOf": [ { - "description": "Local Origin (center of object bounding box).", + "description": "Local Origin ([0, 0, 0] in object space).", "type": "object", "properties": { "type": { @@ -51855,7 +52720,7 @@ ] }, { - "description": "Global Origin (0, 0, 0).", + "description": "Global Origin ([0, 0, 0] in world space).", "type": "object", "properties": { "type": { @@ -51870,7 +52735,7 @@ ] }, { - "description": "Custom Origin (user specified point).", + "description": "Custom Origin (user specified point in world space).", "type": "object", "properties": { "origin": { @@ -53286,6 +54151,11 @@ "description": "Owner-facing publication metadata for a project.", "type": "object", "properties": { + "feedback": { + "nullable": true, + "description": "Moderator feedback when changes have been requested, if any.", + "type": "string" + }, "has_unpublished_changes": { "description": "Whether the current editable draft differs from the last live version.", "type": "boolean" @@ -53343,13 +54213,152 @@ "description": "Relative path to the entrypoint KCL file.", "type": "string" }, - "files": { - "description": "Project files currently stored for the owner-visible draft.", - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectFileResponse" - } - }, + "files": { + "description": "Project files currently stored for the owner-visible draft.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectFileResponse" + } + }, + "id": { + "description": "Unique project identifier.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "preview_status": { + "description": "Current preview generation state.", + "allOf": [ + { + "$ref": "#/components/schemas/KclProjectPreviewStatus" + } + ] + }, + "preview_url": { + "nullable": true, + "description": "Stable authenticated thumbnail URL, when one exists.", + "type": "string" + }, + "project_toml_path": { + "description": "Relative path to the project's manifest file.", + "type": "string" + }, + "publication": { + "description": "Owner-facing publication metadata for the current and last live version.", + "allOf": [ + { + "$ref": "#/components/schemas/ProjectPublicationInfoResponse" + } + ] + }, + "publication_status": { + "description": "Current publication workflow state.", + "allOf": [ + { + "$ref": "#/components/schemas/KclProjectPublicationStatus" + } + ] + }, + "revision": { + "description": "Opaque revision token for optimistic project mutations.", + "type": "string" + }, + "title": { + "description": "User-facing project title.", + "type": "string" + }, + "updated_at": { + "title": "DateTime", + "description": "When the project row was last updated.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "category_ids", + "created_at", + "description", + "entrypoint_path", + "files", + "id", + "preview_status", + "project_toml_path", + "publication", + "publication_status", + "revision", + "title", + "updated_at" + ] + }, + "ProjectShareLinkResponse": { + "description": "Owner-visible share-link metadata for project downloads.", + "type": "object", + "properties": { + "access_mode": { + "description": "Access policy for the share link.", + "allOf": [ + { + "$ref": "#/components/schemas/KclProjectShareLinkAccessMode" + } + ] + }, + "created_at": { + "title": "DateTime", + "description": "Share-link creation timestamp.", + "type": "string", + "format": "date-time" + }, + "key": { + "description": "Opaque identifier used in the public shared URL.", + "type": "string" + }, + "updated_at": { + "title": "DateTime", + "description": "Share-link last update timestamp.", + "type": "string", + "format": "date-time" + }, + "url": { + "description": "Fully-qualified URL that can be shared.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "access_mode", + "created_at", + "key", + "updated_at", + "url" + ] + }, + "ProjectSummaryResponse": { + "description": "Owner-visible project summary payload.", + "type": "object", + "properties": { + "category_ids": { + "description": "Selected category identifiers associated with the project.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Uuid" + } + }, + "created_at": { + "title": "DateTime", + "description": "When the project row was created.", + "type": "string", + "format": "date-time" + }, + "description": { + "description": "User-facing project description.", + "type": "string" + }, + "entrypoint_path": { + "description": "Relative path to the entrypoint KCL file.", + "type": "string" + }, "id": { "description": "Unique project identifier.", "allOf": [ @@ -53391,140 +54400,10 @@ } ] }, - "title": { - "description": "User-facing project title.", + "revision": { + "description": "Opaque revision token for optimistic project mutations.", "type": "string" }, - "updated_at": { - "title": "DateTime", - "description": "When the project row was last updated.", - "type": "string", - "format": "date-time" - } - }, - "required": [ - "category_ids", - "created_at", - "description", - "entrypoint_path", - "files", - "id", - "preview_status", - "project_toml_path", - "publication", - "publication_status", - "title", - "updated_at" - ] - }, - "ProjectShareLinkResponse": { - "description": "Owner-visible share-link metadata for project downloads.", - "type": "object", - "properties": { - "access_mode": { - "description": "Access policy for the share link.", - "allOf": [ - { - "$ref": "#/components/schemas/KclProjectShareLinkAccessMode" - } - ] - }, - "created_at": { - "title": "DateTime", - "description": "Share-link creation timestamp.", - "type": "string", - "format": "date-time" - }, - "key": { - "description": "Opaque identifier used in the public shared URL.", - "type": "string" - }, - "updated_at": { - "title": "DateTime", - "description": "Share-link last update timestamp.", - "type": "string", - "format": "date-time" - }, - "url": { - "description": "Fully-qualified URL that can be shared.", - "type": "string", - "format": "uri" - } - }, - "required": [ - "access_mode", - "created_at", - "key", - "updated_at", - "url" - ] - }, - "ProjectSummaryResponse": { - "description": "Owner-visible project summary payload.", - "type": "object", - "properties": { - "category_ids": { - "description": "Selected category identifiers associated with the project.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Uuid" - } - }, - "created_at": { - "title": "DateTime", - "description": "When the project row was created.", - "type": "string", - "format": "date-time" - }, - "description": { - "description": "User-facing project description.", - "type": "string" - }, - "entrypoint_path": { - "description": "Relative path to the entrypoint KCL file.", - "type": "string" - }, - "id": { - "description": "Unique project identifier.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "preview_status": { - "description": "Current preview generation state.", - "allOf": [ - { - "$ref": "#/components/schemas/KclProjectPreviewStatus" - } - ] - }, - "preview_url": { - "nullable": true, - "description": "Stable authenticated thumbnail URL, when one exists.", - "type": "string" - }, - "project_toml_path": { - "description": "Relative path to the project's manifest file.", - "type": "string" - }, - "publication": { - "description": "Owner-facing publication metadata for the current and last live version.", - "allOf": [ - { - "$ref": "#/components/schemas/ProjectPublicationInfoResponse" - } - ] - }, - "publication_status": { - "description": "Current publication workflow state.", - "allOf": [ - { - "$ref": "#/components/schemas/KclProjectPublicationStatus" - } - ] - }, "title": { "description": "User-facing project title.", "type": "string" @@ -53546,6 +54425,7 @@ "project_toml_path", "publication", "publication_status", + "revision", "title", "updated_at" ] @@ -53991,6 +54871,45 @@ "query_point" ] }, + "RegionGetResolvableIntersectionInfo": { + "description": "The response from the 'RegionGetResolvableIntersectionInfo'.", + "type": "object", + "properties": { + "curve_clockwise": { + "description": "True if the region lies within the clockwise interior of the two intersections (inside a \"right\" turn from the segment to the intersection segment)", + "type": "boolean" + }, + "intersection_count": { + "description": "The total number of intersections between the two curves.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "intersection_index": { + "description": "Disambiguator providing the index of the intersection. Can be non-zero if the two curves intersect multiple times", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "intersection_segment": { + "description": "The UUID of the curve that intersects the walking curve that also borders the queried region", + "type": "string", + "format": "uuid" + }, + "segment": { + "description": "The UUID of the walking curve that borders the queried region", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "curve_clockwise", + "intersection_count", + "intersection_index", + "intersection_segment", + "segment" + ] + }, "RegionVersion": { "description": "Region-creation algorithm version.", "oneOf": [ @@ -58903,6 +59822,11 @@ "description": "Optional new display name.", "type": "string" }, + "require_raw_kcl_similarity_score_for_success": { + "nullable": true, + "description": "Optional override for whether a low raw-KCL similarity score should block conversion success.", + "type": "boolean" + }, "source": { "nullable": true, "description": "Optional storage connection overrides.", @@ -59242,9 +60166,10 @@ "UserFeature": { "type": "string", "enum": [ - "aquarium", "bodies_pane", "enable_z0006_lint", + "modeling_dialogs", + "plugins", "proprietary_to_kcl_conversion_beta", "sketch_experimental_features", "web_app_file_browser" @@ -60277,6 +61202,136 @@ } ] }, + "ZookeeperAutoRouterMetadata": { + "description": "Zookeeper Auto-router decision metadata persisted on a copilot prompt.", + "type": "object", + "properties": { + "bucket": { + "description": "Auto-router classifier bucket, e.g. \"simple\", \"moderate\", or \"complex\".", + "type": "string" + }, + "prompt_template": { + "nullable": true, + "description": "Prompt template/config label used by the router.", + "type": "string" + }, + "reasons": { + "description": "Human-readable route reasons.", + "type": "array", + "items": { + "type": "string" + } + }, + "stage": { + "nullable": true, + "description": "Selection stage, e.g. \"classifier\" or \"replay\".", + "type": "string" + } + }, + "required": [ + "bucket" + ] + }, + "ZookeeperEditPatch": { + "description": "Local replay data for a single successful Zookeeper project edit.", + "type": "object", + "properties": { + "changed_files": { + "description": "Project files changed by this Zookeeper edit.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ZookeeperEditPatchFile" + } + }, + "run_id": { + "description": "Stable id for the Zookeeper run that produced this edit.", + "type": "string" + } + }, + "required": [ + "run_id" + ] + }, + "ZookeeperEditPatchFile": { + "description": "Replay data for one project file changed by a Zookeeper edit.", + "oneOf": [ + { + "description": "The file was created by Zookeeper.", + "type": "object", + "properties": { + "contents": { + "description": "File contents created by Zookeeper.", + "type": "string" + }, + "path": { + "description": "Project-relative path to the changed file.", + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "created" + ] + } + }, + "required": [ + "contents", + "path", + "status" + ] + }, + { + "description": "The file was modified by Zookeeper.", + "type": "object", + "properties": { + "diff": { + "description": "Machine-applicable unified diff from the previous contents to the new contents.", + "type": "string" + }, + "path": { + "description": "Project-relative path to the changed file.", + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "modified" + ] + } + }, + "required": [ + "diff", + "path", + "status" + ] + }, + { + "description": "The file was deleted by Zookeeper.", + "type": "object", + "properties": { + "path": { + "description": "Project-relative path to the changed file.", + "type": "string" + }, + "previous_contents": { + "description": "File contents before Zookeeper deleted the file.", + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "deleted" + ] + } + }, + "required": [ + "path", + "previous_contents", + "status" + ] + } + ] + }, "ZoomToFit": { "description": "The response from the `ZoomToFit` command.", "type": "object",