diff --git a/generate/generate.py b/generate/generate.py index c9a05ff90..900d45f17 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -131,7 +131,7 @@ def generatePaths(cwd: str, parser: dict) -> dict: def generateTypeAndExamplePython( - name: str, schema: dict, data: dict, import_path: Optional[str] + name: str, schema: dict, data: dict, import_path: Optional[str], tag: Optional[str] ) -> Tuple[str, str, str]: parameter_type = "" parameter_example = "" @@ -168,8 +168,11 @@ def generateTypeAndExamplePython( schema["type"] == "string" and "enum" in schema and len(schema["enum"]) > 0 ): if name == "": - logging.error("schema: %s", json.dumps(schema, indent=4)) - raise Exception("Unknown type name for enum") + if len(schema["enum"]) == 1: + name = schema["enum"][0] + else: + logging.error("schema: %s", json.dumps(schema, indent=4)) + raise Exception("Unknown type name for enum") parameter_type = name @@ -215,6 +218,9 @@ def generateTypeAndExamplePython( elif schema["type"] == "integer": parameter_type = "int" parameter_example = "10" + elif schema["type"] == "boolean": + parameter_type = "bool" + parameter_example = "False" elif ( schema["type"] == "number" and "format" in schema @@ -224,7 +230,7 @@ def generateTypeAndExamplePython( parameter_example = "3.14" elif schema["type"] == "array" and "items" in schema: items_type, items_example, items_imports = generateTypeAndExamplePython( - "", schema["items"], data, None + "", schema["items"], data, None, None ) example_imports = example_imports + items_imports parameter_type = "List[" + items_type + "]" @@ -262,12 +268,15 @@ def generateTypeAndExamplePython( if "nullable" in prop: # We don't care if it's nullable continue + elif property_name == tag: + # We don't care if it's the tag, since we already have it. + continue else: ( prop_type, prop_example, prop_imports, - ) = generateTypeAndExamplePython("", prop, data, None) + ) = generateTypeAndExamplePython("", prop, data, import_path, tag) example_imports = example_imports + prop_imports parameter_example = parameter_example + ( "\n" @@ -284,7 +293,7 @@ def generateTypeAndExamplePython( and schema["additionalProperties"] is not False ): items_type, items_example, items_imports = generateTypeAndExamplePython( - "", schema["additionalProperties"], data, None + "", schema["additionalProperties"], data, None, None ) example_imports = example_imports + items_imports parameter_type = "Dict[str, " + items_type + "]" @@ -294,40 +303,49 @@ def generateTypeAndExamplePython( raise Exception("Unknown parameter type") elif "oneOf" in schema and len(schema["oneOf"]) > 0: one_of = schema["oneOf"][0] - # Start Path is a weird one, let's skip it. - # Technically we should be able to handle it, but it's not worth the effort. - # We should also have a more algorithmic way of handling this for any other weird cases. - # But for now, let's just skip it. - if ( - "enum" in one_of - and len(one_of["enum"]) > 0 - and one_of["enum"][0] == "StartPath" - ): + if len(schema["oneOf"]) > 1: one_of = schema["oneOf"][1] - # Check if each of these only has a object w 1 property. + # Check if this is a nested object. if isNestedObjectOneOf(schema): if "properties" in one_of: properties = one_of["properties"] for prop in properties: return generateTypeAndExamplePython( - prop, properties[prop], data, camel_to_snake(name) + prop, properties[prop], data, camel_to_snake(name), None ) break elif "type" in one_of and one_of["type"] == "string": return generateTypeAndExamplePython( - name, one_of, data, camel_to_snake(name) + name, one_of, data, camel_to_snake(name), None ) - return generateTypeAndExamplePython(name, one_of, data, None) + tag = getTagOneOf(schema) + + if ( + "properties" in one_of + and "type" in one_of["properties"] + and "enum" in one_of["properties"]["type"] + ): + return generateTypeAndExamplePython( + one_of["properties"]["type"]["enum"][0], + one_of, + data, + camel_to_snake(name), + tag, + ) + else: + return generateTypeAndExamplePython(name, one_of, data, None, None) elif "allOf" in schema and len(schema["allOf"]) == 1: - return generateTypeAndExamplePython(name, schema["allOf"][0], data, None) + return generateTypeAndExamplePython(name, schema["allOf"][0], data, None, None) elif "$ref" in schema: parameter_type = schema["$ref"].replace("#/components/schemas/", "") # Get the schema for the reference. ref_schema = data["components"]["schemas"][parameter_type] - return generateTypeAndExamplePython(parameter_type, ref_schema, data, None) + return generateTypeAndExamplePython( + parameter_type, ref_schema, data, None, None + ) else: logging.error("schema: %s", json.dumps(schema, indent=4)) raise Exception("Unknown parameter type") @@ -396,7 +414,7 @@ from kittycad.types import Response parameter_type, parameter_example, more_example_imports, - ) = generateTypeAndExamplePython("", parameter["schema"], data, None) + ) = generateTypeAndExamplePython("", parameter["schema"], data, None, None) example_imports = example_imports + more_example_imports if "nullable" in parameter["schema"] and parameter["schema"]["nullable"]: @@ -430,7 +448,7 @@ from kittycad.types import Response body_type, body_example, more_example_imports, - ) = generateTypeAndExamplePython(request_body_type, rbs, data, None) + ) = generateTypeAndExamplePython(request_body_type, rbs, data, None, None) params_str += "body=" + body_example + ",\n" example_imports = example_imports + more_example_imports @@ -838,6 +856,7 @@ async def test_""" .replace("string", "str") .replace("integer", "int") .replace("number", "float") + .replace("boolean", "bool") ) elif "$ref" in parameter["schema"]: parameter_type = parameter["schema"]["$ref"].replace( @@ -1125,7 +1144,7 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict): all_options.append(prop_name) else: object_code = generateObjectTypeCode( - prop_name, nested_object, "object", data + prop_name, nested_object, "object", data, None ) f.write(object_code) f.write("\n") @@ -1139,36 +1158,16 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict): all_options.append(one_of["enum"][0]) # Check if each one_of has the same enum of one. - tag = None - for one_of in schema["oneOf"]: - has_tag = False - # Check if each are an object w 1 property in it. - if one_of["type"] == "object" and "properties" in one_of: - for prop_name in one_of["properties"]: - prop = one_of["properties"][prop_name] - if ( - "type" in prop - and prop["type"] == "string" - and "enum" in prop - and len(prop["enum"]) == 1 - ): - if tag is not None and tag != prop_name: - has_tag = False - break - else: - has_tag = True - tag = prop_name - - if has_tag is False: - tag = None - break + tag = getTagOneOf(schema) if tag is not None: # Generate each of the options from the tag. for one_of in schema["oneOf"]: # Get the value of the tag. object_name = one_of["properties"][tag]["enum"][0] - object_code = generateObjectTypeCode(object_name, one_of, "object", data) + object_code = generateObjectTypeCode( + object_name, one_of, "object", data, tag + ) f.write(object_code) f.write("\n") all_options.append(object_name) @@ -1186,7 +1185,9 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict): f.close() -def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) -> str: +def generateObjectTypeCode( + name: str, schema: dict, type_name: str, data: dict, tag: Optional[str] +) -> str: f = io.StringIO() has_date_time = hasDateTime(schema) @@ -1219,7 +1220,10 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) # Iterate over the properties. for property_name in schema["properties"]: property_schema = schema["properties"][property_name] - renderTypeInit(f, property_name, property_schema, data) + if property_name == tag: + f.write("\t" + property_name + ': str = "' + name + '"\n') + else: + renderTypeInit(f, property_name, property_schema, data) # Finish writing the class. f.write("\n") @@ -1233,7 +1237,10 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) # Iternate over the properties. for property_name in schema["properties"]: property_schema = schema["properties"][property_name] - renderTypeToDict(f, property_name, property_schema, data) + if property_name == tag: + renderTypeToDict(f, property_name, property_schema, data) + else: + renderTypeToDict(f, property_name, property_schema, data) # Finish writing the to_dict method. f.write("\n") @@ -1243,15 +1250,26 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) # Iternate over the properties. for property_name in schema["properties"]: - # Write the property. - f.write("\t\tif " + clean_parameter_name(property_name) + " is not UNSET:\n") - f.write( - "\t\t\tfield_dict['" - + property_name - + "'] = " - + clean_parameter_name(property_name) - + "\n" - ) + if property_name == tag: + f.write( + "\t\tfield_dict['" + + property_name + + "'] = " + + clean_parameter_name(property_name) + + "\n" + ) + else: + # Write the property. + f.write( + "\t\tif " + clean_parameter_name(property_name) + " is not UNSET:\n" + ) + f.write( + "\t\t\tfield_dict['" + + property_name + + "'] = " + + clean_parameter_name(property_name) + + "\n" + ) f.write("\n") f.write("\t\treturn field_dict\n") @@ -1328,7 +1346,7 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str, data: f = open(path, "w") - code = generateObjectTypeCode(name, schema, type_name, data) + code = generateObjectTypeCode(name, schema, type_name, data, None) f.write(code) # Close the file. @@ -2064,12 +2082,8 @@ def isNestedObjectOneOf(schema: dict) -> bool: is_nested_object = False for one_of in schema["oneOf"]: - # Check if each are an object w 1 property in it. - if ( - one_of["type"] == "object" - and "properties" in one_of - and len(one_of["properties"]) == 1 - ): + # Check if each are an object with properties. + if one_of["type"] == "object" and "properties" in one_of: for prop_name in one_of["properties"]: nested_object = one_of["properties"][prop_name] if "type" in nested_object and nested_object["type"] == "object": @@ -2088,6 +2102,34 @@ def isNestedObjectOneOf(schema: dict) -> bool: return is_nested_object +def getTagOneOf(schema: dict) -> Optional[str]: + tag = None + for one_of in schema["oneOf"]: + has_tag = False + # Check if each are an object w 1 property in it. + if one_of["type"] == "object" and "properties" in one_of: + for prop_name in one_of["properties"]: + prop = one_of["properties"][prop_name] + if ( + "type" in prop + and prop["type"] == "string" + and "enum" in prop + and len(prop["enum"]) == 1 + ): + if tag is not None and tag != prop_name: + has_tag = False + break + else: + has_tag = True + tag = prop_name + + if has_tag is False: + tag = None + break + + return tag + + def isEnumWithDocsOneOf(schema: dict) -> bool: if "oneOf" not in schema: return False diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index f6aef5ca8..6fa696ecc 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -1 +1 @@ -[{"op": "add", "path": "/components/schemas/Environment/enum", "value": ["DEVELOPMENT", "PREVIEW", "PRODUCTION"]}, {"op": "add", "path": "/components/schemas/Environment/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngle/enum", "value": ["degrees", "radians"]}, {"op": "add", "path": "/components/schemas/UnitAngle/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PhysicsConstantName/enum", "value": ["pi", "c", "speed_of_light", "G", "newtonian_gravitation", "h", "planck_const", "mu_0", "vacuum_permeability", "E_0", "vacuum_permitivity", "Z_0", "vacuum_impedance", "k_e", "coulomb_const", "e", "elementary_charge", "m_e", "electron_mass", "m_p", "proton_mass", "mu_B", "bohr_magneton", "NA", "avogadro_num", "R", "molar_gas_const", "K_B", "boltzmann_const", "F", "faraday_const", "sigma", "stefan_boltzmann_const"]}, {"op": "add", "path": "/components/schemas/PhysicsConstantName/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Direction/enum", "value": ["positive", "negative"]}, {"op": "add", "path": "/components/schemas/Direction/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForce/enum", "value": ["dynes", "kiloponds", "micronewtons", "millinewtons", "newtons", "poundals", "pounds"]}, {"op": "add", "path": "/components/schemas/UnitForce/type", "value": "string"}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/enum", "value": ["urn:ietf:params:oauth:grant-type:device_code"]}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperature/enum", "value": ["celsius", "fahrenheit", "kelvin", "rankine"]}, {"op": "add", "path": "/components/schemas/UnitTemperature/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressure/enum", "value": ["atmospheres", "bars", "hectopascals", "kilopascals", "millibars", "pascals", "psi"]}, {"op": "add", "path": "/components/schemas/UnitPressure/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CodeLanguage/enum", "value": ["go", "python", "node"]}, {"op": "add", "path": "/components/schemas/CodeLanguage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Method/enum", "value": ["OPTIONS", "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "CONNECT", "PATCH", "EXTENSION"]}, {"op": "add", "path": "/components/schemas/Method/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLength/enum", "value": ["cm", "ft", "in", "m", "mm", "yd"]}, {"op": "add", "path": "/components/schemas/UnitLength/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/enum", "value": ["created-at-ascending", "created-at-descending"]}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolume/enum", "value": ["cm3", "ft3", "in3", "m3", "yd3", "usfloz", "usgal", "l", "ml"]}, {"op": "add", "path": "/components/schemas/UnitVolume/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CountryCode/enum", "value": ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]}, {"op": "add", "path": "/components/schemas/CountryCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Axis/enum", "value": ["y", "z"]}, {"op": "add", "path": "/components/schemas/Axis/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTorque/enum", "value": ["newton_metres", "pound_foot"]}, {"op": "add", "path": "/components/schemas/UnitTorque/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPower/enum", "value": ["btu_per_minute", "horsepower", "kilowatts", "metric_horsepower", "microwatts", "milliwatts", "watts"]}, {"op": "add", "path": "/components/schemas/UnitPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["dae", "fbx", "gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMass/enum", "value": ["g", "kg", "lb"]}, {"op": "add", "path": "/components/schemas/UnitMass/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Currency/enum", "value": ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bif", "bmd", "bnd", "bob", "brl", "bsd", "bwp", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cve", "czk", "djf", "dkk", "dop", "dzd", "eek", "egp", "etb", "eur", "fjd", "fkp", "gbp", "gel", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "isk", "jmd", "jpy", "kes", "kgs", "khr", "kmf", "krw", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "mad", "mdl", "mga", "mkd", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sek", "sgd", "shp", "sll", "sos", "srd", "std", "svc", "szl", "thb", "tjs", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "vef", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw"]}, {"op": "add", "path": "/components/schemas/Currency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergy/enum", "value": ["btu", "electronvolts", "joules", "kilocalories", "kilowatt_hours", "watt_hours"]}, {"op": "add", "path": "/components/schemas/UnitEnergy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDensity/enum", "value": ["lb:ft3", "kg:m3"]}, {"op": "add", "path": "/components/schemas/UnitDensity/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/enum", "value": ["FileConversion", "FileVolume", "FileCenterOfMass", "FileMass", "FileDensity", "FileSurfaceArea"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/InvoiceStatus/enum", "value": ["deleted", "draft", "open", "paid", "uncollectible", "void"]}, {"op": "add", "path": "/components/schemas/InvoiceStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallStatus/enum", "value": ["Queued", "Uploaded", "In Progress", "Completed", "Failed"]}, {"op": "add", "path": "/components/schemas/ApiCallStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/enum", "value": ["email", "method", "endpoint", "user_id", "origin", "ip_address"]}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["dae", "fbx", "fbxb", "gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitFrequency/enum", "value": ["gigahertz", "hertz", "kilohertz", "megahertz", "microhertz", "millihertz", "nanohertz", "terahertz"]}, {"op": "add", "path": "/components/schemas/UnitFrequency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitArea/enum", "value": ["cm2", "dm2", "ft2", "in2", "km2", "m2", "mm2", "yd2"]}, {"op": "add", "path": "/components/schemas/UnitArea/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/enum", "value": ["none", "user_http", "service_http", "oauth"]}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Storage/enum", "value": ["binary", "standard", "embedded"]}, {"op": "add", "path": "/components/schemas/Storage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitCurrent/enum", "value": ["amperes", "microamperes", "milliamperes", "nanoamperes"]}, {"op": "add", "path": "/components/schemas/UnitCurrent/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/enum", "value": ["pan", "rotate", "zoom"]}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/type", "value": "string"}, {"op": "add", "path": "/info/x-python", "value": {"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", "install": "pip install kittycad"}}, {"op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"}}, {"op": "add", "path": "/paths/~1user~1session~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"}}, {"op": "add", "path": "/paths/~1users~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"}}, {"op": "add", "path": "/paths/~1user/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"}}, {"op": "add", "path": "/paths/~1user/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"}}, {"op": "add", "path": "/paths/~1user/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"}}, {"op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import (\n create_file_conversion,\n create_file_conversion_with_base64_helper,\n)\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion_with_base64_helper():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileConversion, Error]\n ] = create_file_conversion_with_base64_helper.sync(\n client=client,\n output_format=FileExportFormat.DAE,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion_with_base64_helper.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1front-hash/get/x-python", "value": {"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"}}, {"op": "add", "path": "/paths/~1user~1payment/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1users-extended~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"}}, {"op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1balance/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"}}, {"op": "add", "path": "/paths/~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"}}, {"op": "add", "path": "/paths/~1openai~1openapi.json/get/x-python", "value": {"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"}}, {"op": "add", "path": "/paths/~1constant~1physics~1{constant}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.constant import get_physics_constant\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PhysicsConstant\nfrom kittycad.models.physics_constant_name import PhysicsConstantName\nfrom kittycad.types import Response\n\n\ndef example_get_physics_constant():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[PhysicsConstant, Error]] = get_physics_constant.sync(\n client=client,\n constant=PhysicsConstantName.PI,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PhysicsConstant = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.constant.get_physics_constant.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.modeling_cmd import MovePathPen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n cmd.sync(\n client=client,\n body=ModelingCmdReq(\n cmd=MovePathPen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n file_id=\"\",\n ),\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"}}, {"op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1tax/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1intent/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1onboarding/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd_batch/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.modeling import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ModelingOutcomes\nfrom kittycad.models.modeling_cmd import MovePathPen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=ModelingCmdReqBatch(\n cmds={\n \"\": ModelingCmdReq(\n cmd=MovePathPen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n file_id=\"\",\n )\n },\n file_id=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ModelingOutcomes = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd_batch.html"}}, {"op": "add", "path": "/paths/~1file~1density/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"}}, {"op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1async~1operations/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"}}, {"op": "add", "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": {"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"}}, {"op": "add", "path": "/paths/~1ws~1executor~1term/get/x-python", "value": {"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1consent/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"}}, {"op": "add", "path": "/paths/~1logout/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1/get/x-python", "value": {"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"}}, {"op": "add", "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.DAE,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"}}, {"op": "add", "path": "/paths/~1users-extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"}}, {"op": "add", "path": "/paths/~1user~1extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"}}, {"op": "add", "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"}}, {"op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"}}, {"op": "add", "path": "/paths/~1auth~1email/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"}}, {"op": "add", "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"}}, {"op": "add", "path": "/paths/~1auth~1email~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"}}, {"op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.DAE,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"}}, {"op": "add", "path": "/paths/~1api-call-metrics/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"}}, {"op": "add", "path": "/paths/~1ping/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1_meta~1info/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"}}, {"op": "add", "path": "/paths/~1users/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"}}] \ No newline at end of file +[{"op": "add", "path": "/paths/~1_meta~1info/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"}}, {"op": "add", "path": "/paths/~1file~1surface-area/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html"}}, {"op": "add", "path": "/paths/~1logout/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"}}, {"op": "add", "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html"}}, {"op": "add", "path": "/paths/~1user~1payment/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1payment/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"}}, {"op": "add", "path": "/paths/~1ws~1executor~1term/get/x-python", "value": {"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html"}}, {"op": "add", "path": "/paths/~1file~1density/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"}}, {"op": "add", "path": "/paths/~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"}}, {"op": "add", "path": "/paths/~1users-extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"}}, {"op": "add", "path": "/paths/~1auth~1email~1callback/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"}}, {"op": "add", "path": "/paths/~1file~1volume/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import user_list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html"}}, {"op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"}}, {"op": "add", "path": "/paths/~1user~1onboarding/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1intent/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1extended/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html"}}, {"op": "add", "path": "/paths/~1async~1operations/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"}}, {"op": "add", "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": {"example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAngleConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1methods/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"}}, {"op": "add", "path": "/paths/~1/get/x-python", "value": {"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"}}, {"op": "add", "path": "/paths/~1user~1front-hash/get/x-python", "value": {"example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html"}}, {"op": "add", "path": "/paths/~1api-calls~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"}}, {"op": "add", "path": "/paths/~1user~1session~1{token}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"}}, {"op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import (\n create_file_conversion,\n create_file_conversion_with_base64_helper,\n)\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion_with_base64_helper():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileConversion, Error]\n ] = create_file_conversion_with_base64_helper.sync(\n client=client,\n output_format=FileExportFormat.GLTF,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion_with_base64_helper.html"}}, {"op": "add", "path": "/paths/~1file~1center-of-mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1consent/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AppClientInfo = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd/post/x-python", "value": {"example": "from kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n cmd.sync(\n client=client,\n body=ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n ),\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1tax/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html"}}, {"op": "add", "path": "/paths/~1openai~1openapi.json/get/x-python", "value": {"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html"}}, {"op": "add", "path": "/paths/~1auth~1email/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1user~1payment~1balance/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"}}, {"op": "add", "path": "/paths/~1api-call-metrics/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html"}}, {"op": "add", "path": "/paths/~1apps~1github~1webhook/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"}}, {"op": "add", "path": "/paths/~1ping/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users-extended~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"}}, {"op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"}}, {"op": "add", "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.GLTF,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1users~1{id}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"}}, {"op": "add", "path": "/paths/~1file~1mass/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.GLTF,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"}}, {"op": "add", "path": "/paths/~1user/delete/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"}}, {"op": "add", "path": "/paths/~1user/put/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"}}, {"op": "add", "path": "/paths/~1user/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"}}, {"op": "add", "path": "/paths/~1modeling~1cmd_batch/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.modeling import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ModelingOutcomes\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=ModelingCmdReqBatch(\n cmds={\n \"\": ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n )\n },\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ModelingOutcomes = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd_batch.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/get/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiTokenResultsPage = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html"}}, {"op": "add", "path": "/paths/~1user~1api-tokens/post/x-python", "value": {"example": "from typing import Any, List, Optional, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html"}}, {"op": "add", "path": "/components/schemas/Axis/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Axis/enum", "value": ["y", "z"]}, {"op": "add", "path": "/components/schemas/AccountProvider/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AccountProvider/enum", "value": ["google", "github"]}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginAuthType/enum", "value": ["none", "user_http", "service_http", "oauth"]}, {"op": "add", "path": "/components/schemas/FileExportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileExportFormat/enum", "value": ["gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/AiPluginApiType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginApiType/enum", "value": ["openapi"]}, {"op": "add", "path": "/components/schemas/UnitTemperature/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTemperature/enum", "value": ["celsius", "fahrenheit", "kelvin", "rankine"]}, {"op": "add", "path": "/components/schemas/FileImportFormat/type", "value": "string"}, {"op": "add", "path": "/components/schemas/FileImportFormat/enum", "value": ["gltf", "obj", "ply", "step", "stl"]}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallQueryGroupBy/enum", "value": ["email", "method", "endpoint", "user_id", "origin", "ip_address"]}, {"op": "add", "path": "/components/schemas/Environment/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Environment/enum", "value": ["DEVELOPMENT", "PREVIEW", "PRODUCTION"]}, {"op": "add", "path": "/components/schemas/UnitVolume/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitVolume/enum", "value": ["cm3", "ft3", "in3", "m3", "yd3", "usfloz", "usgal", "l", "ml"]}, {"op": "add", "path": "/components/schemas/UnitLength/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitLength/enum", "value": ["cm", "ft", "in", "m", "mm", "yd"]}, {"op": "add", "path": "/components/schemas/UnitEnergy/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitEnergy/enum", "value": ["btu", "electronvolts", "joules", "kilocalories", "kilowatt_hours", "watt_hours"]}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CameraDragInteractionType/enum", "value": ["pan", "rotate", "zoom"]}, {"op": "add", "path": "/components/schemas/UnitPressure/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPressure/enum", "value": ["atmospheres", "bars", "hectopascals", "kilopascals", "millibars", "pascals", "psi"]}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CreatedAtSortMode/enum", "value": ["created-at-ascending", "created-at-descending"]}, {"op": "add", "path": "/components/schemas/UnitTorque/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitTorque/enum", "value": ["newton_metres", "pound_foot"]}, {"op": "add", "path": "/components/schemas/Method/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Method/enum", "value": ["OPTIONS", "GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "CONNECT", "PATCH", "EXTENSION"]}, {"op": "add", "path": "/components/schemas/ApiCallStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/ApiCallStatus/enum", "value": ["Queued", "Uploaded", "In Progress", "Completed", "Failed"]}, {"op": "add", "path": "/components/schemas/AnnotationType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AnnotationType/enum", "value": ["t2d", "t3d"]}, {"op": "add", "path": "/components/schemas/Storage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Storage/enum", "value": ["binary", "standard", "embedded"]}, {"op": "add", "path": "/components/schemas/SceneSelectionType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/SceneSelectionType/enum", "value": ["replace", "add", "remove"]}, {"op": "add", "path": "/components/schemas/UnitAngle/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitAngle/enum", "value": ["degrees", "radians"]}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/OAuth2GrantType/enum", "value": ["urn:ietf:params:oauth:grant-type:device_code"]}, {"op": "add", "path": "/components/schemas/PaymentMethodType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/PaymentMethodType/enum", "value": ["card"]}, {"op": "add", "path": "/components/schemas/UnitPower/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitPower/enum", "value": ["btu_per_minute", "horsepower", "kilowatts", "metric_horsepower", "microwatts", "milliwatts", "watts"]}, {"op": "add", "path": "/components/schemas/UnitFrequency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitFrequency/enum", "value": ["gigahertz", "hertz", "kilohertz", "megahertz", "microhertz", "millihertz", "nanohertz", "terahertz"]}, {"op": "add", "path": "/components/schemas/Direction/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Direction/enum", "value": ["positive", "negative"]}, {"op": "add", "path": "/components/schemas/CodeLanguage/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CodeLanguage/enum", "value": ["go", "python", "node"]}, {"op": "add", "path": "/components/schemas/UnitDensity/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitDensity/enum", "value": ["lb:ft3", "kg:m3"]}, {"op": "add", "path": "/components/schemas/Currency/type", "value": "string"}, {"op": "add", "path": "/components/schemas/Currency/enum", "value": ["aed", "afn", "all", "amd", "ang", "aoa", "ars", "aud", "awg", "azn", "bam", "bbd", "bdt", "bgn", "bif", "bmd", "bnd", "bob", "brl", "bsd", "bwp", "bzd", "cad", "cdf", "chf", "clp", "cny", "cop", "crc", "cve", "czk", "djf", "dkk", "dop", "dzd", "eek", "egp", "etb", "eur", "fjd", "fkp", "gbp", "gel", "gip", "gmd", "gnf", "gtq", "gyd", "hkd", "hnl", "hrk", "htg", "huf", "idr", "ils", "inr", "isk", "jmd", "jpy", "kes", "kgs", "khr", "kmf", "krw", "kyd", "kzt", "lak", "lbp", "lkr", "lrd", "lsl", "ltl", "lvl", "mad", "mdl", "mga", "mkd", "mnt", "mop", "mro", "mur", "mvr", "mwk", "mxn", "myr", "mzn", "nad", "ngn", "nio", "nok", "npr", "nzd", "pab", "pen", "pgk", "php", "pkr", "pln", "pyg", "qar", "ron", "rsd", "rub", "rwf", "sar", "sbd", "scr", "sek", "sgd", "shp", "sll", "sos", "srd", "std", "svc", "szl", "thb", "tjs", "top", "try", "ttd", "twd", "tzs", "uah", "ugx", "usd", "uyu", "uzs", "vef", "vnd", "vuv", "wst", "xaf", "xcd", "xof", "xpf", "yer", "zar", "zmw"]}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AiPluginHttpAuthType/enum", "value": ["basic", "bearer"]}, {"op": "add", "path": "/components/schemas/CountryCode/type", "value": "string"}, {"op": "add", "path": "/components/schemas/CountryCode/enum", "value": ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "CV", "KH", "CM", "CA", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"]}, {"op": "add", "path": "/components/schemas/UnitForce/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitForce/enum", "value": ["dynes", "kiloponds", "micronewtons", "millinewtons", "newtons", "poundals", "pounds"]}, {"op": "add", "path": "/components/schemas/UnitArea/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitArea/enum", "value": ["cm2", "dm2", "ft2", "in2", "km2", "m2", "mm2", "yd2"]}, {"op": "add", "path": "/components/schemas/UnitCurrent/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitCurrent/enum", "value": ["amperes", "microamperes", "milliamperes", "nanoamperes"]}, {"op": "add", "path": "/components/schemas/UnitMass/type", "value": "string"}, {"op": "add", "path": "/components/schemas/UnitMass/enum", "value": ["g", "kg", "lb"]}, {"op": "add", "path": "/components/schemas/InvoiceStatus/type", "value": "string"}, {"op": "add", "path": "/components/schemas/InvoiceStatus/enum", "value": ["deleted", "draft", "open", "paid", "uncollectible", "void"]}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/type", "value": "string"}, {"op": "add", "path": "/components/schemas/AsyncApiCallType/enum", "value": ["FileConversion", "FileVolume", "FileCenterOfMass", "FileMass", "FileDensity", "FileSurfaceArea"]}, {"op": "add", "path": "/info/x-python", "value": {"client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", "install": "pip install kittycad"}}] \ No newline at end of file diff --git a/kittycad/api/constant/get_physics_constant.py b/kittycad/api/constant/get_physics_constant.py deleted file mode 100644 index b658ec8b8..000000000 --- a/kittycad/api/constant/get_physics_constant.py +++ /dev/null @@ -1,114 +0,0 @@ -from typing import Any, Dict, Optional, Union - -import httpx - -from ...client import Client -from ...models.error import Error -from ...models.physics_constant import PhysicsConstant -from ...models.physics_constant_name import PhysicsConstantName -from ...types import Response - - -def _get_kwargs( - constant: PhysicsConstantName, - *, - client: Client, -) -> Dict[str, Any]: - url = "{}/constant/physics/{constant}".format( - client.base_url, - constant=constant, - ) # noqa: E501 - - headers: Dict[str, Any] = client.get_headers() - cookies: Dict[str, Any] = client.get_cookies() - - return { - "url": url, - "headers": headers, - "cookies": cookies, - "timeout": client.get_timeout(), - } - - -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[PhysicsConstant, Error]]: - if response.status_code == 200: - response_200 = PhysicsConstant.from_dict(response.json()) - return response_200 - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) - - -def _build_response( - *, response: httpx.Response -) -> Response[Optional[Union[PhysicsConstant, Error]]]: - return Response( - status_code=response.status_code, - content=response.content, - headers=response.headers, - parsed=_parse_response(response=response), - ) - - -def sync_detailed( - constant: PhysicsConstantName, - *, - client: Client, -) -> Response[Optional[Union[PhysicsConstant, Error]]]: - kwargs = _get_kwargs( - constant=constant, - client=client, - ) - - response = httpx.get( - verify=client.verify_ssl, - **kwargs, - ) - - return _build_response(response=response) - - -def sync( - constant: PhysicsConstantName, - *, - client: Client, -) -> Optional[Union[PhysicsConstant, Error]]: - return sync_detailed( - constant=constant, - client=client, - ).parsed - - -async def asyncio_detailed( - constant: PhysicsConstantName, - *, - client: Client, -) -> Response[Optional[Union[PhysicsConstant, Error]]]: - kwargs = _get_kwargs( - constant=constant, - client=client, - ) - - async with httpx.AsyncClient(verify=client.verify_ssl) as _client: - response = await _client.get(**kwargs) - - return _build_response(response=response) - - -async def asyncio( - constant: PhysicsConstantName, - *, - client: Client, -) -> Optional[Union[PhysicsConstant, Error]]: - return ( - await asyncio_detailed( - constant=constant, - client=client, - ) - ).parsed diff --git a/kittycad/api/file/create_file_center_of_mass.py b/kittycad/api/file/create_file_center_of_mass.py index 2a71f1468..4787ac691 100644 --- a/kittycad/api/file/create_file_center_of_mass.py +++ b/kittycad/api/file/create_file_center_of_mass.py @@ -101,7 +101,7 @@ def sync( client: Client, ) -> Optional[Union[FileCenterOfMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint returns the cartesian co-ordinate in world space measure units. + This endpoint returns the cartesian co-ordinate in world space measure units. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -143,7 +143,7 @@ async def asyncio( client: Client, ) -> Optional[Union[FileCenterOfMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint returns the cartesian co-ordinate in world space measure units. + This endpoint returns the cartesian co-ordinate in world space measure units. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. diff --git a/kittycad/api/file/create_file_conversion_with_base64_helper.py b/kittycad/api/file/create_file_conversion_with_base64_helper.py index a4c411c0a..0a5ead532 100644 --- a/kittycad/api/file/create_file_conversion_with_base64_helper.py +++ b/kittycad/api/file/create_file_conversion_with_base64_helper.py @@ -26,7 +26,7 @@ def sync( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output) + b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) # decode the bytes to a string fc.output = b.decode("utf-8") @@ -53,7 +53,7 @@ async def asyncio( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output) + b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) # decode the bytes to a string fc.output = b.decode("utf-8") diff --git a/kittycad/api/file/create_file_density.py b/kittycad/api/file/create_file_density.py index 3a7d25df8..79e00a28a 100644 --- a/kittycad/api/file/create_file_density.py +++ b/kittycad/api/file/create_file_density.py @@ -120,7 +120,7 @@ def sync( client: Client, ) -> Optional[Union[FileDensity, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. + This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -170,7 +170,7 @@ async def asyncio( client: Client, ) -> Optional[Union[FileDensity, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. + This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. diff --git a/kittycad/api/file/create_file_mass.py b/kittycad/api/file/create_file_mass.py index 92769b933..d251c676f 100644 --- a/kittycad/api/file/create_file_mass.py +++ b/kittycad/api/file/create_file_mass.py @@ -120,7 +120,7 @@ def sync( client: Client, ) -> Optional[Union[FileMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. + This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -170,7 +170,7 @@ async def asyncio( client: Client, ) -> Optional[Union[FileMass, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. + This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. diff --git a/kittycad/api/file/create_file_surface_area.py b/kittycad/api/file/create_file_surface_area.py index 433bcf9ef..2399901b8 100644 --- a/kittycad/api/file/create_file_surface_area.py +++ b/kittycad/api/file/create_file_surface_area.py @@ -101,7 +101,7 @@ def sync( client: Client, ) -> Optional[Union[FileSurfaceArea, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint returns the square measure units. + This endpoint returns the square measure units. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -143,7 +143,7 @@ async def asyncio( client: Client, ) -> Optional[Union[FileSurfaceArea, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint returns the square measure units. + This endpoint returns the square measure units. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. diff --git a/kittycad/api/file/create_file_volume.py b/kittycad/api/file/create_file_volume.py index e497f6501..040c2f234 100644 --- a/kittycad/api/file/create_file_volume.py +++ b/kittycad/api/file/create_file_volume.py @@ -99,7 +99,7 @@ def sync( client: Client, ) -> Optional[Union[FileVolume, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint returns the cubic measure units. + This endpoint returns the cubic measure units. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -141,7 +141,7 @@ async def asyncio( client: Client, ) -> Optional[Union[FileVolume, Error]]: """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - Currently, this endpoint returns the cubic measure units. + This endpoint returns the cubic measure units. In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. diff --git a/kittycad/api/file/get_file_conversion_with_base64_helper.py b/kittycad/api/file/get_file_conversion_with_base64_helper.py index 0f14fcc25..af691e51e 100644 --- a/kittycad/api/file/get_file_conversion_with_base64_helper.py +++ b/kittycad/api/file/get_file_conversion_with_base64_helper.py @@ -21,7 +21,7 @@ def sync( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output) + b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) # decode the bytes to a string fc.output = b.decode("utf-8") @@ -42,7 +42,7 @@ async def asyncio( if isinstance(fc, FileConversion) and fc.output != "": if isinstance(fc.output, str): - b = base64.b64decode(fc.output) + b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4)) # decode the bytes to a string fc.output = b.decode("utf-8") diff --git a/kittycad/api/modeling/modeling_commands_ws.py b/kittycad/api/modeling/modeling_commands_ws.py index abd5a1601..2e7d6ded5 100644 --- a/kittycad/api/modeling/modeling_commands_ws.py +++ b/kittycad/api/modeling/modeling_commands_ws.py @@ -8,11 +8,39 @@ from ...models.error import Error def _get_kwargs( + fps: int, + unlocked_framerate: bool, + video_res_height: int, + video_res_width: int, *, client: Client, ) -> Dict[str, Any]: url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501 + if fps is not None: + if "?" in url: + url = url + "&fps=" + str(fps) + else: + url = url + "?fps=" + str(fps) + + if unlocked_framerate is not None: + if "?" in url: + url = url + "&unlocked_framerate=" + str(unlocked_framerate) + else: + url = url + "?unlocked_framerate=" + str(unlocked_framerate) + + if video_res_height is not None: + if "?" in url: + url = url + "&video_res_height=" + str(video_res_height) + else: + url = url + "?video_res_height=" + str(video_res_height) + + if video_res_width is not None: + if "?" in url: + url = url + "&video_res_width=" + str(video_res_width) + else: + url = url + "?video_res_width=" + str(video_res_width) + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,12 +53,20 @@ def _get_kwargs( def sync( + fps: int, + unlocked_framerate: bool, + video_res_height: int, + video_res_width: int, *, client: Client, ) -> ClientConnection: """Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501 kwargs = _get_kwargs( + fps=fps, + unlocked_framerate=unlocked_framerate, + video_res_height=video_res_height, + video_res_width=video_res_width, client=client, ) @@ -45,12 +81,20 @@ def sync( async def asyncio( + fps: int, + unlocked_framerate: bool, + video_res_height: int, + video_res_width: int, *, client: Client, ) -> WebSocketClientProtocol: """Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501 kwargs = _get_kwargs( + fps=fps, + unlocked_framerate=unlocked_framerate, + video_res_height=video_res_height, + video_res_width=video_res_width, client=client, ) diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index 6bde0e28a..a7964b3ce 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -24,7 +24,6 @@ from kittycad.api.apps import ( apps_github_consent, apps_github_webhook, ) -from kittycad.api.constant import get_physics_constant from kittycad.api.executor import create_executor_term, create_file_execution from kittycad.api.file import ( create_file_center_of_mass, @@ -113,7 +112,6 @@ from kittycad.models import ( Onboarding, PaymentIntent, PaymentMethod, - PhysicsConstant, Pong, Session, UnitAngleConversion, @@ -142,11 +140,10 @@ from kittycad.models.email_authentication_form import EmailAuthenticationForm from kittycad.models.file_export_format import FileExportFormat from kittycad.models.file_import_format import FileImportFormat from kittycad.models.image_type import ImageType -from kittycad.models.modeling_cmd import MovePathPen +from kittycad.models.modeling_cmd import move_path_pen from kittycad.models.modeling_cmd_id import ModelingCmdId from kittycad.models.modeling_cmd_req import ModelingCmdReq from kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch -from kittycad.models.physics_constant_name import PhysicsConstantName from kittycad.models.point3d import Point3d from kittycad.models.unit_angle import UnitAngle from kittycad.models.unit_area import UnitArea @@ -292,7 +289,7 @@ def test_create_image_to_3d(): result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync( client=client, input_format=ImageType.PNG, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -307,7 +304,7 @@ def test_create_image_to_3d(): response: Response[Optional[Union[Mesh, Error]]] = create_image_to_3d.sync_detailed( client=client, input_format=ImageType.PNG, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -322,7 +319,7 @@ async def test_create_image_to_3d_async(): result: Optional[Union[Mesh, Error]] = await create_image_to_3d.asyncio( client=client, input_format=ImageType.PNG, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -332,7 +329,7 @@ async def test_create_image_to_3d_async(): ] = await create_image_to_3d.asyncio_detailed( client=client, input_format=ImageType.PNG, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -344,7 +341,7 @@ def test_create_text_to_3d(): result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync( client=client, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, prompt="", ) @@ -358,7 +355,7 @@ def test_create_text_to_3d(): # OR if you need more info (e.g. status_code) response: Response[Optional[Union[Mesh, Error]]] = create_text_to_3d.sync_detailed( client=client, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, prompt="", ) @@ -372,7 +369,7 @@ async def test_create_text_to_3d_async(): result: Optional[Union[Mesh, Error]] = await create_text_to_3d.asyncio( client=client, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, prompt="", ) @@ -381,7 +378,7 @@ async def test_create_text_to_3d_async(): Optional[Union[Mesh, Error]] ] = await create_text_to_3d.asyncio_detailed( client=client, - output_format=FileExportFormat.DAE, + output_format=FileExportFormat.GLTF, prompt="", ) @@ -927,55 +924,6 @@ async def test_auth_email_callback_async(): ) -@pytest.mark.skip -def test_get_physics_constant(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[PhysicsConstant, Error]] = get_physics_constant.sync( - client=client, - constant=PhysicsConstantName.PI, - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: PhysicsConstant = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[ - Optional[Union[PhysicsConstant, Error]] - ] = get_physics_constant.sync_detailed( - client=client, - constant=PhysicsConstantName.PI, - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_get_physics_constant_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[ - Union[PhysicsConstant, Error] - ] = await get_physics_constant.asyncio( - client=client, - constant=PhysicsConstantName.PI, - ) - - # OR run async with more info - response: Response[ - Optional[Union[PhysicsConstant, Error]] - ] = await get_physics_constant.asyncio_detailed( - client=client, - constant=PhysicsConstantName.PI, - ) - - @pytest.mark.skip def test_create_file_center_of_mass(): # Create our client. @@ -984,7 +932,7 @@ def test_create_file_center_of_mass(): result: Optional[Union[FileCenterOfMass, Error]] = create_file_center_of_mass.sync( client=client, output_unit=UnitLength.CM, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1001,7 +949,7 @@ def test_create_file_center_of_mass(): ] = create_file_center_of_mass.sync_detailed( client=client, output_unit=UnitLength.CM, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1018,7 +966,7 @@ async def test_create_file_center_of_mass_async(): ] = await create_file_center_of_mass.asyncio( client=client, output_unit=UnitLength.CM, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1028,7 +976,7 @@ async def test_create_file_center_of_mass_async(): ] = await create_file_center_of_mass.asyncio_detailed( client=client, output_unit=UnitLength.CM, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1042,8 +990,8 @@ def test_create_file_conversion_with_base64_helper(): Union[FileConversion, Error] ] = create_file_conversion_with_base64_helper.sync( client=client, - output_format=FileExportFormat.DAE, - src_format=FileImportFormat.DAE, + output_format=FileExportFormat.GLTF, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1059,8 +1007,8 @@ def test_create_file_conversion_with_base64_helper(): Optional[Union[FileConversion, Error]] ] = create_file_conversion.sync_detailed( client=client, - output_format=FileExportFormat.DAE, - src_format=FileImportFormat.DAE, + output_format=FileExportFormat.GLTF, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1076,8 +1024,8 @@ async def test_create_file_conversion_with_base64_helper_async(): Union[FileConversion, Error] ] = await create_file_conversion_with_base64_helper.asyncio( client=client, - output_format=FileExportFormat.DAE, - src_format=FileImportFormat.DAE, + output_format=FileExportFormat.GLTF, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1086,8 +1034,8 @@ async def test_create_file_conversion_with_base64_helper_async(): Optional[Union[FileConversion, Error]] ] = await create_file_conversion.asyncio_detailed( client=client, - output_format=FileExportFormat.DAE, - src_format=FileImportFormat.DAE, + output_format=FileExportFormat.GLTF, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1102,7 +1050,7 @@ def test_create_file_density(): material_mass=3.14, material_mass_unit=UnitMass.G, output_unit=UnitDensity.LB_FT3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1121,7 +1069,7 @@ def test_create_file_density(): material_mass=3.14, material_mass_unit=UnitMass.G, output_unit=UnitDensity.LB_FT3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1138,7 +1086,7 @@ async def test_create_file_density_async(): material_mass=3.14, material_mass_unit=UnitMass.G, output_unit=UnitDensity.LB_FT3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1150,7 +1098,7 @@ async def test_create_file_density_async(): material_mass=3.14, material_mass_unit=UnitMass.G, output_unit=UnitDensity.LB_FT3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1220,7 +1168,7 @@ def test_create_file_mass(): material_density=3.14, material_density_unit=UnitDensity.LB_FT3, output_unit=UnitMass.G, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1239,7 +1187,7 @@ def test_create_file_mass(): material_density=3.14, material_density_unit=UnitDensity.LB_FT3, output_unit=UnitMass.G, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1256,7 +1204,7 @@ async def test_create_file_mass_async(): material_density=3.14, material_density_unit=UnitDensity.LB_FT3, output_unit=UnitMass.G, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1268,7 +1216,7 @@ async def test_create_file_mass_async(): material_density=3.14, material_density_unit=UnitDensity.LB_FT3, output_unit=UnitMass.G, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1281,7 +1229,7 @@ def test_create_file_surface_area(): result: Optional[Union[FileSurfaceArea, Error]] = create_file_surface_area.sync( client=client, output_unit=UnitArea.CM2, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1298,7 +1246,7 @@ def test_create_file_surface_area(): ] = create_file_surface_area.sync_detailed( client=client, output_unit=UnitArea.CM2, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1315,7 +1263,7 @@ async def test_create_file_surface_area_async(): ] = await create_file_surface_area.asyncio( client=client, output_unit=UnitArea.CM2, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1325,7 +1273,7 @@ async def test_create_file_surface_area_async(): ] = await create_file_surface_area.asyncio_detailed( client=client, output_unit=UnitArea.CM2, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1338,7 +1286,7 @@ def test_create_file_volume(): result: Optional[Union[FileVolume, Error]] = create_file_volume.sync( client=client, output_unit=UnitVolume.CM3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1355,7 +1303,7 @@ def test_create_file_volume(): ] = create_file_volume.sync_detailed( client=client, output_unit=UnitVolume.CM3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1370,7 +1318,7 @@ async def test_create_file_volume_async(): result: Optional[Union[FileVolume, Error]] = await create_file_volume.asyncio( client=client, output_unit=UnitVolume.CM3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1380,7 +1328,7 @@ async def test_create_file_volume_async(): ] = await create_file_volume.asyncio_detailed( client=client, output_unit=UnitVolume.CM3, - src_format=FileImportFormat.DAE, + src_format=FileImportFormat.GLTF, body=bytes("some bytes", "utf-8"), ) @@ -1432,7 +1380,7 @@ def test_cmd(): cmd.sync( client=client, body=ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1441,7 +1389,6 @@ def test_cmd(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ), ) @@ -1449,7 +1396,7 @@ def test_cmd(): cmd.sync_detailed( client=client, body=ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1458,7 +1405,6 @@ def test_cmd(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ), ) @@ -1473,7 +1419,7 @@ async def test_cmd_async(): await cmd.asyncio( client=client, body=ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1482,7 +1428,6 @@ async def test_cmd_async(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ), ) @@ -1490,7 +1435,7 @@ async def test_cmd_async(): await cmd.asyncio_detailed( client=client, body=ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1499,7 +1444,6 @@ async def test_cmd_async(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ), ) @@ -1514,7 +1458,7 @@ def test_cmd_batch(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1523,10 +1467,8 @@ def test_cmd_batch(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ) }, - file_id="", ), ) @@ -1545,7 +1487,7 @@ def test_cmd_batch(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1554,10 +1496,8 @@ def test_cmd_batch(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ) }, - file_id="", ), ) @@ -1574,7 +1514,7 @@ async def test_cmd_batch_async(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1583,10 +1523,8 @@ async def test_cmd_batch_async(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ) }, - file_id="", ), ) @@ -1598,7 +1536,7 @@ async def test_cmd_batch_async(): body=ModelingCmdReqBatch( cmds={ "": ModelingCmdReq( - cmd=MovePathPen( + cmd=move_path_pen( path=ModelingCmdId(""), to=Point3d( x=3.14, @@ -1607,10 +1545,8 @@ async def test_cmd_batch_async(): ), ), cmd_id=ModelingCmdId(""), - file_id="", ) }, - file_id="", ), ) @@ -3858,6 +3794,10 @@ def test_modeling_commands_ws(): # Connect to the websocket. websocket = modeling_commands_ws.sync( client=client, + fps=10, + unlocked_framerate=False, + video_res_height=10, + video_res_width=10, ) # Send a message. @@ -3878,6 +3818,10 @@ async def test_modeling_commands_ws_async(): # Connect to the websocket. websocket = await modeling_commands_ws.asyncio( client=client, + fps=10, + unlocked_framerate=False, + video_res_height=10, + video_res_width=10, ) # Send a message. diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 96db6289b..0f204e5bc 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -7,6 +7,13 @@ from .ai_plugin_auth import AiPluginAuth from .ai_plugin_auth_type import AiPluginAuthType from .ai_plugin_http_auth_type import AiPluginHttpAuthType from .ai_plugin_manifest import AiPluginManifest +from .annotation_line_end import AnnotationLineEnd +from .annotation_line_end_options import AnnotationLineEndOptions +from .annotation_options import AnnotationOptions +from .annotation_text_alignment_x import AnnotationTextAlignmentX +from .annotation_text_alignment_y import AnnotationTextAlignmentY +from .annotation_text_options import AnnotationTextOptions +from .annotation_type import AnnotationType from .api_call_query_group import ApiCallQueryGroup from .api_call_query_group_by import ApiCallQueryGroupBy from .api_call_status import ApiCallStatus @@ -28,6 +35,7 @@ from .card_details import CardDetails from .cluster import Cluster from .code_language import CodeLanguage from .code_output import CodeOutput +from .color import Color from .commit import Commit from .connection import Connection from .country_code import CountryCode @@ -44,12 +52,13 @@ from .discount import Discount from .docker_system_info import DockerSystemInfo from .email_authentication_form import EmailAuthenticationForm from .engine_metadata import EngineMetadata +from .entity_type import EntityType from .environment import Environment from .error import Error from .executor_metadata import ExecutorMetadata +from .export_file import ExportFile from .extended_user import ExtendedUser from .extended_user_results_page import ExtendedUserResultsPage -from .extrude import Extrude from .file_center_of_mass import FileCenterOfMass from .file_conversion import FileConversion from .file_density import FileDensity @@ -85,6 +94,7 @@ from .modeling_outcomes import ModelingOutcomes from .new_address import NewAddress from .o_auth2_client_info import OAuth2ClientInfo from .o_auth2_grant_type import OAuth2GrantType +from .ok_modeling_cmd_response import OkModelingCmdResponse from .onboarding import Onboarding from .output_file import OutputFile from .output_format import OutputFormat @@ -93,8 +103,6 @@ from .payment_intent import PaymentIntent from .payment_method import PaymentMethod from .payment_method_card_checks import PaymentMethodCardChecks from .payment_method_type import PaymentMethodType -from .physics_constant import PhysicsConstant -from .physics_constant_name import PhysicsConstantName from .plugins_info import PluginsInfo from .point2d import Point2d from .point3d import Point3d @@ -102,6 +110,7 @@ from .point_e_metadata import PointEMetadata from .pong import Pong from .registry_service_config import RegistryServiceConfig from .runtime import Runtime +from .scene_selection_type import SceneSelectionType from .session import Session from .storage import Storage from .system import System diff --git a/kittycad/models/annotation_line_end.py b/kittycad/models/annotation_line_end.py new file mode 100644 index 000000000..85eedc629 --- /dev/null +++ b/kittycad/models/annotation_line_end.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class AnnotationLineEnd(str, Enum): + """Annotation line end type""" # noqa: E501 + + NONE = "none" + ARROW = "arrow" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_line_end_options.py b/kittycad/models/annotation_line_end_options.py new file mode 100644 index 000000000..f3cfd70f4 --- /dev/null +++ b/kittycad/models/annotation_line_end_options.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.annotation_line_end import AnnotationLineEnd +from ..types import UNSET, Unset + +GO = TypeVar("GO", bound="AnnotationLineEndOptions") + + +@attr.s(auto_attribs=True) +class AnnotationLineEndOptions: + """Options for annotation text""" # noqa: E501 + + end: Union[Unset, AnnotationLineEnd] = UNSET + start: Union[Unset, AnnotationLineEnd] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + if not isinstance(self.start, Unset): + start = self.start + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict["end"] = end + if start is not UNSET: + field_dict["start"] = start + + return field_dict + + @classmethod + def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, AnnotationLineEnd] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + + _start = d.pop("start", UNSET) + start: Union[Unset, AnnotationLineEnd] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] + + annotation_line_end_options = cls( + end=end, + start=start, + ) + + annotation_line_end_options.additional_properties = d + return annotation_line_end_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_options.py b/kittycad/models/annotation_options.py new file mode 100644 index 000000000..ca9c7df0d --- /dev/null +++ b/kittycad/models/annotation_options.py @@ -0,0 +1,111 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.annotation_line_end_options import AnnotationLineEndOptions +from ..models.annotation_text_options import AnnotationTextOptions +from ..models.color import Color +from ..models.point3d import Point3d +from ..types import UNSET, Unset + +PI = TypeVar("PI", bound="AnnotationOptions") + + +@attr.s(auto_attribs=True) +class AnnotationOptions: + """Options for annotations""" # noqa: E501 + + color: Union[Unset, Color] = UNSET + line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET + line_width: Union[Unset, float] = UNSET + position: Union[Unset, Point3d] = UNSET + text: Union[Unset, AnnotationTextOptions] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.color, Unset): + color = self.color + if not isinstance(self.line_ends, Unset): + line_ends = self.line_ends + line_width = self.line_width + if not isinstance(self.position, Unset): + position = self.position + if not isinstance(self.text, Unset): + text = self.text + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if color is not UNSET: + field_dict["color"] = color + if line_ends is not UNSET: + field_dict["line_ends"] = line_ends + if line_width is not UNSET: + field_dict["line_width"] = line_width + if position is not UNSET: + field_dict["position"] = position + if text is not UNSET: + field_dict["text"] = text + + return field_dict + + @classmethod + def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: + d = src_dict.copy() + _color = d.pop("color", UNSET) + color: Union[Unset, Color] + if isinstance(_color, Unset): + color = UNSET + else: + color = _color # type: ignore[arg-type] + + _line_ends = d.pop("line_ends", UNSET) + line_ends: Union[Unset, AnnotationLineEndOptions] + if isinstance(_line_ends, Unset): + line_ends = UNSET + else: + line_ends = _line_ends # type: ignore[arg-type] + + line_width = d.pop("line_width", UNSET) + + _position = d.pop("position", UNSET) + position: Union[Unset, Point3d] + if isinstance(_position, Unset): + position = UNSET + else: + position = _position # type: ignore[arg-type] + + _text = d.pop("text", UNSET) + text: Union[Unset, AnnotationTextOptions] + if isinstance(_text, Unset): + text = UNSET + else: + text = _text # type: ignore[arg-type] + + annotation_options = cls( + color=color, + line_ends=line_ends, + line_width=line_width, + position=position, + text=text, + ) + + annotation_options.additional_properties = d + return annotation_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_text_alignment_x.py b/kittycad/models/annotation_text_alignment_x.py new file mode 100644 index 000000000..1b0b42901 --- /dev/null +++ b/kittycad/models/annotation_text_alignment_x.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AnnotationTextAlignmentX(str, Enum): + """Horizontal Text aligment""" # noqa: E501 + + LEFT = "left" + CENTER = "center" + RIGHT = "right" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_text_alignment_y.py b/kittycad/models/annotation_text_alignment_y.py new file mode 100644 index 000000000..3fc4842ca --- /dev/null +++ b/kittycad/models/annotation_text_alignment_y.py @@ -0,0 +1,12 @@ +from enum import Enum + + +class AnnotationTextAlignmentY(str, Enum): + """Vertical Text aligment""" # noqa: E501 + + BOTTOM = "bottom" + CENTER = "center" + TOP = "top" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_text_options.py b/kittycad/models/annotation_text_options.py new file mode 100644 index 000000000..8a25df305 --- /dev/null +++ b/kittycad/models/annotation_text_options.py @@ -0,0 +1,90 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.annotation_text_alignment_x import AnnotationTextAlignmentX +from ..models.annotation_text_alignment_y import AnnotationTextAlignmentY +from ..types import UNSET, Unset + +UZ = TypeVar("UZ", bound="AnnotationTextOptions") + + +@attr.s(auto_attribs=True) +class AnnotationTextOptions: + """Options for annotation text""" # noqa: E501 + + point_size: Union[Unset, int] = UNSET + text: Union[Unset, str] = UNSET + x: Union[Unset, AnnotationTextAlignmentX] = UNSET + y: Union[Unset, AnnotationTextAlignmentY] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + point_size = self.point_size + text = self.text + if not isinstance(self.x, Unset): + x = self.x + if not isinstance(self.y, Unset): + y = self.y + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if point_size is not UNSET: + field_dict["point_size"] = point_size + if text is not UNSET: + field_dict["text"] = text + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + + return field_dict + + @classmethod + def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: + d = src_dict.copy() + point_size = d.pop("point_size", UNSET) + + text = d.pop("text", UNSET) + + _x = d.pop("x", UNSET) + x: Union[Unset, AnnotationTextAlignmentX] + if isinstance(_x, Unset): + x = UNSET + else: + x = _x # type: ignore[arg-type] + + _y = d.pop("y", UNSET) + y: Union[Unset, AnnotationTextAlignmentY] + if isinstance(_y, Unset): + y = UNSET + else: + y = _y # type: ignore[arg-type] + + annotation_text_options = cls( + point_size=point_size, + text=text, + x=x, + y=y, + ) + + annotation_text_options.additional_properties = d + return annotation_text_options + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_type.py b/kittycad/models/annotation_type.py new file mode 100644 index 000000000..1fb492929 --- /dev/null +++ b/kittycad/models/annotation_type.py @@ -0,0 +1,13 @@ +from enum import Enum + + +class AnnotationType(str, Enum): + """The type of annotation""" # noqa: E501 + + """# 2D annotation type (screen or planar space) """ # noqa: E501 + T2D = "t2d" + """# 3D annotation type """ # noqa: E501 + T3D = "t3d" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_query_group.py b/kittycad/models/api_call_query_group.py index ca55a7975..7f439af8a 100644 --- a/kittycad/models/api_call_query_group.py +++ b/kittycad/models/api_call_query_group.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -GO = TypeVar("GO", bound="ApiCallQueryGroup") +FB = TypeVar("FB", bound="ApiCallQueryGroup") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class ApiCallQueryGroup: return field_dict @classmethod - def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: + def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: d = src_dict.copy() count = d.pop("count", UNSET) diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index 2c1da0716..5aac75327 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -8,7 +8,7 @@ from ..models.method import Method from ..models.uuid import Uuid from ..types import UNSET, Unset -PI = TypeVar("PI", bound="ApiCallWithPrice") +QP = TypeVar("QP", bound="ApiCallWithPrice") @attr.s(auto_attribs=True) @@ -126,7 +126,7 @@ class ApiCallWithPrice: return field_dict @classmethod - def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: + def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_call_with_price_results_page.py b/kittycad/models/api_call_with_price_results_page.py index c18ab3baf..80bcc6c00 100644 --- a/kittycad/models/api_call_with_price_results_page.py +++ b/kittycad/models/api_call_with_price_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UZ = TypeVar("UZ", bound="ApiCallWithPriceResultsPage") +KC = TypeVar("KC", bound="ApiCallWithPriceResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ApiCallWithPriceResultsPage: return field_dict @classmethod - def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: + def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: d = src_dict.copy() from ..models.api_call_with_price import ApiCallWithPrice diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index 839d3ba1e..b2baf9283 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -FB = TypeVar("FB", bound="ApiToken") +HX = TypeVar("HX", bound="ApiToken") @attr.s(auto_attribs=True) @@ -56,7 +56,7 @@ class ApiToken: return field_dict @classmethod - def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: + def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_token_results_page.py b/kittycad/models/api_token_results_page.py index 90ca9ee9e..5a7758fa3 100644 --- a/kittycad/models/api_token_results_page.py +++ b/kittycad/models/api_token_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -QP = TypeVar("QP", bound="ApiTokenResultsPage") +LB = TypeVar("LB", bound="ApiTokenResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ApiTokenResultsPage: return field_dict @classmethod - def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: + def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: d = src_dict.copy() from ..models.api_token import ApiToken diff --git a/kittycad/models/app_client_info.py b/kittycad/models/app_client_info.py index b52b0c97e..56956296a 100644 --- a/kittycad/models/app_client_info.py +++ b/kittycad/models/app_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -KC = TypeVar("KC", bound="AppClientInfo") +NE = TypeVar("NE", bound="AppClientInfo") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class AppClientInfo: return field_dict @classmethod - def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: + def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: d = src_dict.copy() url = d.pop("url", UNSET) diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index 7b2cddd78..0c0f46916 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -9,7 +9,7 @@ from ..models.async_api_call_type import AsyncApiCallType from ..models.uuid import Uuid from ..types import UNSET, Unset -HX = TypeVar("HX", bound="AsyncApiCall") +TL = TypeVar("TL", bound="AsyncApiCall") @attr.s(auto_attribs=True) @@ -86,7 +86,7 @@ class AsyncApiCall: return field_dict @classmethod - def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: + def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index eca062ee8..576530750 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -18,7 +18,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -LB = TypeVar("LB", bound="FileConversion") +MN = TypeVar("MN", bound="FileConversion") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class FileConversion: src_format_options: Union[Unset, InputFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, str] = UNSET + type: str = "FileConversion" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -100,8 +100,7 @@ class FileConversion: field_dict["started_at"] = started_at if status is not UNSET: field_dict["status"] = status - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -110,7 +109,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: + def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -229,7 +228,7 @@ class FileConversion: return key in self.additional_properties -NE = TypeVar("NE", bound="FileCenterOfMass") +JV = TypeVar("JV", bound="FileCenterOfMass") @attr.s(auto_attribs=True) @@ -237,7 +236,6 @@ class FileCenterOfMass: """File center of mass.""" # noqa: E501 center_of_mass: Union[Unset, Point3d] = UNSET - centers_of_mass: Union[Unset, Any] = UNSET completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET @@ -246,7 +244,7 @@ class FileCenterOfMass: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, str] = UNSET + type: str = "FileCenterOfMass" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -255,7 +253,6 @@ class FileCenterOfMass: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.center_of_mass, Unset): center_of_mass = self.center_of_mass - centers_of_mass = self.centers_of_mass completed_at: Union[Unset, str] = UNSET if not isinstance(self.completed_at, Unset): completed_at = self.completed_at.isoformat() @@ -284,8 +281,6 @@ class FileCenterOfMass: field_dict.update({}) if center_of_mass is not UNSET: field_dict["center_of_mass"] = center_of_mass - if centers_of_mass is not UNSET: - field_dict["centers_of_mass"] = centers_of_mass if completed_at is not UNSET: field_dict["completed_at"] = completed_at if created_at is not UNSET: @@ -302,8 +297,7 @@ class FileCenterOfMass: field_dict["started_at"] = started_at if status is not UNSET: field_dict["status"] = status - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -312,7 +306,7 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: + def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: d = src_dict.copy() _center_of_mass = d.pop("center_of_mass", UNSET) center_of_mass: Union[Unset, Point3d] @@ -321,7 +315,6 @@ class FileCenterOfMass: else: center_of_mass = _center_of_mass # type: ignore[arg-type] - centers_of_mass = d.pop("centers_of_mass", UNSET) _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] if isinstance(_completed_at, Unset): @@ -386,7 +379,6 @@ class FileCenterOfMass: file_center_of_mass = cls( center_of_mass=center_of_mass, - centers_of_mass=centers_of_mass, completed_at=completed_at, created_at=created_at, error=error, @@ -420,7 +412,7 @@ class FileCenterOfMass: return key in self.additional_properties -TL = TypeVar("TL", bound="FileMass") +IO = TypeVar("IO", bound="FileMass") @attr.s(auto_attribs=True) @@ -432,14 +424,13 @@ class FileMass: error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET mass: Union[Unset, float] = UNSET - masses: Union[Unset, Any] = UNSET material_density: Union[Unset, float] = UNSET material_density_unit: Union[Unset, UnitDensity] = UNSET output_unit: Union[Unset, UnitMass] = UNSET src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, str] = UNSET + type: str = "FileMass" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -455,7 +446,6 @@ class FileMass: error = self.error id = self.id mass = self.mass - masses = self.masses material_density = self.material_density if not isinstance(self.material_density_unit, Unset): material_density_unit = self.material_density_unit @@ -487,8 +477,6 @@ class FileMass: field_dict["id"] = id if mass is not UNSET: field_dict["mass"] = mass - if masses is not UNSET: - field_dict["masses"] = masses if material_density is not UNSET: field_dict["material_density"] = material_density if material_density_unit is not UNSET: @@ -501,8 +489,7 @@ class FileMass: field_dict["started_at"] = started_at if status is not UNSET: field_dict["status"] = status - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -511,7 +498,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: + def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -538,7 +525,6 @@ class FileMass: mass = d.pop("mass", UNSET) - masses = d.pop("masses", UNSET) material_density = d.pop("material_density", UNSET) _material_density_unit = d.pop("material_density_unit", UNSET) @@ -593,7 +579,6 @@ class FileMass: error=error, id=id, mass=mass, - masses=masses, material_density=material_density, material_density_unit=material_density_unit, output_unit=output_unit, @@ -625,7 +610,7 @@ class FileMass: return key in self.additional_properties -MN = TypeVar("MN", bound="FileVolume") +FV = TypeVar("FV", bound="FileVolume") @attr.s(auto_attribs=True) @@ -640,11 +625,10 @@ class FileVolume: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, str] = UNSET + type: str = "FileVolume" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET volume: Union[Unset, float] = UNSET - volumes: Union[Unset, Any] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -672,7 +656,6 @@ class FileVolume: updated_at = self.updated_at.isoformat() user_id = self.user_id volume = self.volume - volumes = self.volumes field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -693,21 +676,18 @@ class FileVolume: field_dict["started_at"] = started_at if status is not UNSET: field_dict["status"] = status - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: field_dict["user_id"] = user_id if volume is not UNSET: field_dict["volume"] = volume - if volumes is not UNSET: - field_dict["volumes"] = volumes return field_dict @classmethod - def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: + def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -773,8 +753,6 @@ class FileVolume: volume = d.pop("volume", UNSET) - volumes = d.pop("volumes", UNSET) - file_volume = cls( completed_at=completed_at, created_at=created_at, @@ -788,7 +766,6 @@ class FileVolume: updated_at=updated_at, user_id=user_id, volume=volume, - volumes=volumes, ) file_volume.additional_properties = d @@ -811,7 +788,7 @@ class FileVolume: return key in self.additional_properties -JV = TypeVar("JV", bound="FileDensity") +LE = TypeVar("LE", bound="FileDensity") @attr.s(auto_attribs=True) @@ -820,7 +797,6 @@ class FileDensity: completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET - densities: Union[Unset, Any] = UNSET density: Union[Unset, float] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET @@ -830,7 +806,7 @@ class FileDensity: src_format: Union[Unset, FileImportFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, str] = UNSET + type: str = "FileDensity" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -843,7 +819,6 @@ class FileDensity: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - densities = self.densities density = self.density error = self.error id = self.id @@ -872,8 +847,6 @@ class FileDensity: field_dict["completed_at"] = completed_at if created_at is not UNSET: field_dict["created_at"] = created_at - if densities is not UNSET: - field_dict["densities"] = densities if density is not UNSET: field_dict["density"] = density if error is not UNSET: @@ -892,8 +865,7 @@ class FileDensity: field_dict["started_at"] = started_at if status is not UNSET: field_dict["status"] = status - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -902,7 +874,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: + def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -918,7 +890,6 @@ class FileDensity: else: created_at = isoparse(_created_at) - densities = d.pop("densities", UNSET) density = d.pop("density", UNSET) error = d.pop("error", UNSET) @@ -981,7 +952,6 @@ class FileDensity: file_density = cls( completed_at=completed_at, created_at=created_at, - densities=densities, density=density, error=error, id=id, @@ -1016,7 +986,7 @@ class FileDensity: return key in self.additional_properties -IO = TypeVar("IO", bound="FileSurfaceArea") +OY = TypeVar("OY", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -1032,8 +1002,7 @@ class FileSurfaceArea: started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET surface_area: Union[Unset, float] = UNSET - surface_areas: Union[Unset, Any] = UNSET - type: Union[Unset, str] = UNSET + type: str = "FileSurfaceArea" updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -1058,7 +1027,6 @@ class FileSurfaceArea: if not isinstance(self.status, Unset): status = self.status surface_area = self.surface_area - surface_areas = self.surface_areas type = self.type updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): @@ -1086,10 +1054,7 @@ class FileSurfaceArea: field_dict["status"] = status if surface_area is not UNSET: field_dict["surface_area"] = surface_area - if surface_areas is not UNSET: - field_dict["surface_areas"] = surface_areas - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -1098,7 +1063,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: + def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -1153,7 +1118,6 @@ class FileSurfaceArea: surface_area = d.pop("surface_area", UNSET) - surface_areas = d.pop("surface_areas", UNSET) type = d.pop("type", UNSET) _updated_at = d.pop("updated_at", UNSET) @@ -1175,7 +1139,6 @@ class FileSurfaceArea: started_at=started_at, status=status, surface_area=surface_area, - surface_areas=surface_areas, type=type, updated_at=updated_at, user_id=user_id, diff --git a/kittycad/models/async_api_call_results_page.py b/kittycad/models/async_api_call_results_page.py index 288d2579c..3371285ab 100644 --- a/kittycad/models/async_api_call_results_page.py +++ b/kittycad/models/async_api_call_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FV = TypeVar("FV", bound="AsyncApiCallResultsPage") +HO = TypeVar("HO", bound="AsyncApiCallResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class AsyncApiCallResultsPage: return field_dict @classmethod - def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: + def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: d = src_dict.copy() from ..models.async_api_call import AsyncApiCall diff --git a/kittycad/models/axis_direction_pair.py b/kittycad/models/axis_direction_pair.py index fb58e9e5e..e74a571cc 100644 --- a/kittycad/models/axis_direction_pair.py +++ b/kittycad/models/axis_direction_pair.py @@ -6,7 +6,7 @@ from ..models.axis import Axis from ..models.direction import Direction from ..types import UNSET, Unset -LE = TypeVar("LE", bound="AxisDirectionPair") +TM = TypeVar("TM", bound="AxisDirectionPair") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class AxisDirectionPair: return field_dict @classmethod - def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: + def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: d = src_dict.copy() _axis = d.pop("axis", UNSET) axis: Union[Unset, Axis] diff --git a/kittycad/models/billing_info.py b/kittycad/models/billing_info.py index 4968bff42..3be4253ae 100644 --- a/kittycad/models/billing_info.py +++ b/kittycad/models/billing_info.py @@ -5,7 +5,7 @@ import attr from ..models.new_address import NewAddress from ..types import UNSET, Unset -OY = TypeVar("OY", bound="BillingInfo") +BS = TypeVar("BS", bound="BillingInfo") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class BillingInfo: return field_dict @classmethod - def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: + def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: d = src_dict.copy() _address = d.pop("address", UNSET) address: Union[Unset, NewAddress] diff --git a/kittycad/models/cache_metadata.py b/kittycad/models/cache_metadata.py index e8d43576b..00068314a 100644 --- a/kittycad/models/cache_metadata.py +++ b/kittycad/models/cache_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -HO = TypeVar("HO", bound="CacheMetadata") +AH = TypeVar("AH", bound="CacheMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class CacheMetadata: return field_dict @classmethod - def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: + def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/card_details.py b/kittycad/models/card_details.py index 53ef1722e..482ec46d2 100644 --- a/kittycad/models/card_details.py +++ b/kittycad/models/card_details.py @@ -5,7 +5,7 @@ import attr from ..models.payment_method_card_checks import PaymentMethodCardChecks from ..types import UNSET, Unset -TM = TypeVar("TM", bound="CardDetails") +EG = TypeVar("EG", bound="CardDetails") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class CardDetails: return field_dict @classmethod - def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: + def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: d = src_dict.copy() brand = d.pop("brand", UNSET) diff --git a/kittycad/models/cluster.py b/kittycad/models/cluster.py index 19e53fe6a..053c8ccaf 100644 --- a/kittycad/models/cluster.py +++ b/kittycad/models/cluster.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -BS = TypeVar("BS", bound="Cluster") +JR = TypeVar("JR", bound="Cluster") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class Cluster: return field_dict @classmethod - def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: + def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: d = src_dict.copy() addr = d.pop("addr", UNSET) diff --git a/kittycad/models/code_output.py b/kittycad/models/code_output.py index ba841fb64..0e0397e6f 100644 --- a/kittycad/models/code_output.py +++ b/kittycad/models/code_output.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -AH = TypeVar("AH", bound="CodeOutput") +LY = TypeVar("LY", bound="CodeOutput") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class CodeOutput: return field_dict @classmethod - def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: + def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: d = src_dict.copy() from ..models.output_file import OutputFile diff --git a/kittycad/models/color.py b/kittycad/models/color.py new file mode 100644 index 000000000..37e16b790 --- /dev/null +++ b/kittycad/models/color.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +HK = TypeVar("HK", bound="Color") + + +@attr.s(auto_attribs=True) +class Color: + """An RGBA color""" # noqa: E501 + + a: Union[Unset, float] = UNSET + b: Union[Unset, float] = UNSET + g: Union[Unset, float] = UNSET + r: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + a = self.a + b = self.b + g = self.g + r = self.r + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if a is not UNSET: + field_dict["a"] = a + if b is not UNSET: + field_dict["b"] = b + if g is not UNSET: + field_dict["g"] = g + if r is not UNSET: + field_dict["r"] = r + + return field_dict + + @classmethod + def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: + d = src_dict.copy() + a = d.pop("a", UNSET) + + b = d.pop("b", UNSET) + + g = d.pop("g", UNSET) + + r = d.pop("r", UNSET) + + color = cls( + a=a, + b=b, + g=g, + r=r, + ) + + color.additional_properties = d + return color + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/commit.py b/kittycad/models/commit.py index d999d3c56..6c8092db8 100644 --- a/kittycad/models/commit.py +++ b/kittycad/models/commit.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -EG = TypeVar("EG", bound="Commit") +VR = TypeVar("VR", bound="Commit") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class Commit: return field_dict @classmethod - def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: + def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: d = src_dict.copy() expected = d.pop("expected", UNSET) diff --git a/kittycad/models/connection.py b/kittycad/models/connection.py index 0ad29ca3b..b5c3a61b6 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream from ..models.leaf_node import LeafNode from ..types import UNSET, Unset -JR = TypeVar("JR", bound="Connection") +ON = TypeVar("ON", bound="Connection") @attr.s(auto_attribs=True) @@ -225,7 +225,7 @@ class Connection: return field_dict @classmethod - def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: + def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/coupon.py b/kittycad/models/coupon.py index 0563196ae..6a8f41344 100644 --- a/kittycad/models/coupon.py +++ b/kittycad/models/coupon.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LY = TypeVar("LY", bound="Coupon") +PC = TypeVar("PC", bound="Coupon") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class Coupon: return field_dict @classmethod - def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: + def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: d = src_dict.copy() amount_off = d.pop("amount_off", UNSET) diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index 34a008a11..812e24e33 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.new_address import NewAddress from ..types import UNSET, Unset -HK = TypeVar("HK", bound="Customer") +US = TypeVar("US", bound="Customer") @attr.s(auto_attribs=True) @@ -71,7 +71,7 @@ class Customer: return field_dict @classmethod - def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: + def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: d = src_dict.copy() _address = d.pop("address", UNSET) address: Union[Unset, NewAddress] diff --git a/kittycad/models/customer_balance.py b/kittycad/models/customer_balance.py index eec17d881..674bb8bdc 100644 --- a/kittycad/models/customer_balance.py +++ b/kittycad/models/customer_balance.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -VR = TypeVar("VR", bound="CustomerBalance") +KQ = TypeVar("KQ", bound="CustomerBalance") @attr.s(auto_attribs=True) @@ -64,7 +64,7 @@ class CustomerBalance: return field_dict @classmethod - def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: + def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/device_access_token_request_form.py b/kittycad/models/device_access_token_request_form.py index 233ce0c10..6830546c4 100644 --- a/kittycad/models/device_access_token_request_form.py +++ b/kittycad/models/device_access_token_request_form.py @@ -5,7 +5,7 @@ import attr from ..models.o_auth2_grant_type import OAuth2GrantType from ..types import UNSET, Unset -ON = TypeVar("ON", bound="DeviceAccessTokenRequestForm") +FH = TypeVar("FH", bound="DeviceAccessTokenRequestForm") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm: return field_dict @classmethod - def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: + def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: d = src_dict.copy() client_id = d.pop("client_id", UNSET) diff --git a/kittycad/models/device_auth_request_form.py b/kittycad/models/device_auth_request_form.py index 278080a4a..ec4c5d957 100644 --- a/kittycad/models/device_auth_request_form.py +++ b/kittycad/models/device_auth_request_form.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -PC = TypeVar("PC", bound="DeviceAuthRequestForm") +NH = TypeVar("NH", bound="DeviceAuthRequestForm") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class DeviceAuthRequestForm: return field_dict @classmethod - def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: + def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: d = src_dict.copy() client_id = d.pop("client_id", UNSET) diff --git a/kittycad/models/device_auth_verify_params.py b/kittycad/models/device_auth_verify_params.py index c83eb7aca..fe532fdd1 100644 --- a/kittycad/models/device_auth_verify_params.py +++ b/kittycad/models/device_auth_verify_params.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -US = TypeVar("US", bound="DeviceAuthVerifyParams") +BB = TypeVar("BB", bound="DeviceAuthVerifyParams") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class DeviceAuthVerifyParams: return field_dict @classmethod - def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: + def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: d = src_dict.copy() user_code = d.pop("user_code", UNSET) diff --git a/kittycad/models/discount.py b/kittycad/models/discount.py index 9d92decf2..afb055d5a 100644 --- a/kittycad/models/discount.py +++ b/kittycad/models/discount.py @@ -5,7 +5,7 @@ import attr from ..models.coupon import Coupon from ..types import UNSET, Unset -KQ = TypeVar("KQ", bound="Discount") +PJ = TypeVar("PJ", bound="Discount") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class Discount: return field_dict @classmethod - def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: + def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: d = src_dict.copy() _coupon = d.pop("coupon", UNSET) coupon: Union[Unset, Coupon] diff --git a/kittycad/models/docker_system_info.py b/kittycad/models/docker_system_info.py index 6d7272ea6..d4aba9131 100644 --- a/kittycad/models/docker_system_info.py +++ b/kittycad/models/docker_system_info.py @@ -10,7 +10,7 @@ from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum from ..models.system_info_isolation_enum import SystemInfoIsolationEnum from ..types import UNSET, Unset -FH = TypeVar("FH", bound="DockerSystemInfo") +TV = TypeVar("TV", bound="DockerSystemInfo") @attr.s(auto_attribs=True) @@ -293,7 +293,7 @@ class DockerSystemInfo: return field_dict @classmethod - def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: + def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: d = src_dict.copy() architecture = d.pop("architecture", UNSET) diff --git a/kittycad/models/email_authentication_form.py b/kittycad/models/email_authentication_form.py index 8e1f3aaab..c405a2638 100644 --- a/kittycad/models/email_authentication_form.py +++ b/kittycad/models/email_authentication_form.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -NH = TypeVar("NH", bound="EmailAuthenticationForm") +CR = TypeVar("CR", bound="EmailAuthenticationForm") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class EmailAuthenticationForm: return field_dict @classmethod - def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: + def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: d = src_dict.copy() callback_url = d.pop("callback_url", UNSET) diff --git a/kittycad/models/engine_metadata.py b/kittycad/models/engine_metadata.py index 03e993f94..9e76a22a4 100644 --- a/kittycad/models/engine_metadata.py +++ b/kittycad/models/engine_metadata.py @@ -8,7 +8,7 @@ from ..models.environment import Environment from ..models.file_system_metadata import FileSystemMetadata from ..types import UNSET, Unset -BB = TypeVar("BB", bound="EngineMetadata") +CE = TypeVar("CE", bound="EngineMetadata") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class EngineMetadata: return field_dict @classmethod - def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: + def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: d = src_dict.copy() async_jobs_running = d.pop("async_jobs_running", UNSET) diff --git a/kittycad/models/entity_type.py b/kittycad/models/entity_type.py new file mode 100644 index 000000000..29fe398d9 --- /dev/null +++ b/kittycad/models/entity_type.py @@ -0,0 +1,17 @@ +from enum import Enum + + +class EntityType(str, Enum): + """The type of entity""" # noqa: E501 + + ENTITY = "entity" + OBJECT = "object" + PATH = "path" + CURVE = "curve" + SOLID2D = "solid2d" + SOLID3D = "solid3d" + EDGE = "edge" + FACE = "face" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 386ce0d4d..58c352792 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -PJ = TypeVar("PJ", bound="Error") +MS = TypeVar("MS", bound="Error") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Error: return field_dict @classmethod - def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: + def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: d = src_dict.copy() error_code = d.pop("error_code", UNSET) diff --git a/kittycad/models/executor_metadata.py b/kittycad/models/executor_metadata.py index a80a3485c..2dc9815fb 100644 --- a/kittycad/models/executor_metadata.py +++ b/kittycad/models/executor_metadata.py @@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo from ..models.environment import Environment from ..types import UNSET, Unset -TV = TypeVar("TV", bound="ExecutorMetadata") +LT = TypeVar("LT", bound="ExecutorMetadata") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class ExecutorMetadata: return field_dict @classmethod - def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: + def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: d = src_dict.copy() _docker_info = d.pop("docker_info", UNSET) docker_info: Union[Unset, DockerSystemInfo] diff --git a/kittycad/models/export_file.py b/kittycad/models/export_file.py new file mode 100644 index 000000000..d8bc0a23f --- /dev/null +++ b/kittycad/models/export_file.py @@ -0,0 +1,62 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +ED = TypeVar("ED", bound="ExportFile") + + +@attr.s(auto_attribs=True) +class ExportFile: + """A file to be exported to the client.""" # noqa: E501 + + contents: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + contents = self.contents + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict["contents"] = contents + if name is not UNSET: + field_dict["name"] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: + d = src_dict.copy() + contents = d.pop("contents", UNSET) + + name = d.pop("name", UNSET) + + export_file = cls( + contents=contents, + name=name, + ) + + export_file.additional_properties = d + return export_file + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index f73cb883d..2c8bc5a0d 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -CR = TypeVar("CR", bound="ExtendedUser") +YY = TypeVar("YY", bound="ExtendedUser") @attr.s(auto_attribs=True) @@ -98,7 +98,7 @@ class ExtendedUser: return field_dict @classmethod - def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: + def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/extended_user_results_page.py b/kittycad/models/extended_user_results_page.py index 0d1d86cbc..4fcfb0b8a 100644 --- a/kittycad/models/extended_user_results_page.py +++ b/kittycad/models/extended_user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -CE = TypeVar("CE", bound="ExtendedUserResultsPage") +DO = TypeVar("DO", bound="ExtendedUserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ExtendedUserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: + def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: d = src_dict.copy() from ..models.extended_user import ExtendedUser diff --git a/kittycad/models/extrude.py b/kittycad/models/extrude.py deleted file mode 100644 index a28a5b214..000000000 --- a/kittycad/models/extrude.py +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..models.modeling_cmd_id import ModelingCmdId -from ..types import UNSET, Unset - -MS = TypeVar("MS", bound="Extrude") - - -@attr.s(auto_attribs=True) -class Extrude: - """Command for extruding a solid.""" # noqa: E501 - - cap: Union[Unset, bool] = False - distance: Union[Unset, float] = UNSET - target: Union[Unset, ModelingCmdId] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - cap = self.cap - distance = self.distance - if not isinstance(self.target, Unset): - target = self.target - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cap is not UNSET: - field_dict["cap"] = cap - if distance is not UNSET: - field_dict["distance"] = distance - if target is not UNSET: - field_dict["target"] = target - - return field_dict - - @classmethod - def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: - d = src_dict.copy() - cap = d.pop("cap", UNSET) - - distance = d.pop("distance", UNSET) - - _target = d.pop("target", UNSET) - target: Union[Unset, ModelingCmdId] - if isinstance(_target, Unset): - target = UNSET - else: - target = _target # type: ignore[arg-type] - - extrude = cls( - cap=cap, - distance=distance, - target=target, - ) - - extrude.additional_properties = d - return extrude - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index 7be4f8635..522d995b7 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -LT = TypeVar("LT", bound="FileCenterOfMass") +FZ = TypeVar("FZ", bound="FileCenterOfMass") @attr.s(auto_attribs=True) @@ -19,7 +19,6 @@ class FileCenterOfMass: """A file center of mass result.""" # noqa: E501 center_of_mass: Union[Unset, Point3d] = UNSET - centers_of_mass: Union[Unset, Any] = UNSET completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET @@ -36,7 +35,6 @@ class FileCenterOfMass: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.center_of_mass, Unset): center_of_mass = self.center_of_mass - centers_of_mass = self.centers_of_mass completed_at: Union[Unset, str] = UNSET if not isinstance(self.completed_at, Unset): completed_at = self.completed_at.isoformat() @@ -64,8 +62,6 @@ class FileCenterOfMass: field_dict.update({}) if center_of_mass is not UNSET: field_dict["center_of_mass"] = center_of_mass - if centers_of_mass is not UNSET: - field_dict["centers_of_mass"] = centers_of_mass if completed_at is not UNSET: field_dict["completed_at"] = completed_at if created_at is not UNSET: @@ -90,7 +86,7 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: + def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: d = src_dict.copy() _center_of_mass = d.pop("center_of_mass", UNSET) center_of_mass: Union[Unset, Point3d] @@ -99,7 +95,6 @@ class FileCenterOfMass: else: center_of_mass = _center_of_mass # type: ignore[arg-type] - centers_of_mass = d.pop("centers_of_mass", UNSET) _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] if isinstance(_completed_at, Unset): @@ -162,7 +157,6 @@ class FileCenterOfMass: file_center_of_mass = cls( center_of_mass=center_of_mass, - centers_of_mass=centers_of_mass, completed_at=completed_at, created_at=created_at, error=error, diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index dd21fc339..cd7d0b4fb 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -12,7 +12,7 @@ from ..models.output_format import OutputFormat from ..models.uuid import Uuid from ..types import UNSET, Unset -ED = TypeVar("ED", bound="FileConversion") +GL = TypeVar("GL", bound="FileConversion") @attr.s(auto_attribs=True) @@ -100,7 +100,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: + def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index f716b86e7..f00664253 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -YY = TypeVar("YY", bound="FileDensity") +NN = TypeVar("NN", bound="FileDensity") @attr.s(auto_attribs=True) @@ -20,7 +20,6 @@ class FileDensity: completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET - densities: Union[Unset, Any] = UNSET density: Union[Unset, float] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET @@ -42,7 +41,6 @@ class FileDensity: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - densities = self.densities density = self.density error = self.error id = self.id @@ -70,8 +68,6 @@ class FileDensity: field_dict["completed_at"] = completed_at if created_at is not UNSET: field_dict["created_at"] = created_at - if densities is not UNSET: - field_dict["densities"] = densities if density is not UNSET: field_dict["density"] = density if error is not UNSET: @@ -98,7 +94,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: + def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -114,7 +110,6 @@ class FileDensity: else: created_at = isoparse(_created_at) - densities = d.pop("densities", UNSET) density = d.pop("density", UNSET) error = d.pop("error", UNSET) @@ -175,7 +170,6 @@ class FileDensity: file_density = cls( completed_at=completed_at, created_at=created_at, - densities=densities, density=density, error=error, id=id, diff --git a/kittycad/models/file_export_format.py b/kittycad/models/file_export_format.py index 52f344591..37d7658b1 100644 --- a/kittycad/models/file_export_format.py +++ b/kittycad/models/file_export_format.py @@ -4,12 +4,6 @@ from enum import Enum class FileExportFormat(str, Enum): """The valid types of output file formats.""" # noqa: E501 - """# The COLLADA/DAE file format. """ # noqa: E501 - DAE = "dae" - """# The FBX file format. """ # noqa: E501 - FBX = "fbx" - """# The FBX file format (in binary). """ # noqa: E501 - FBXB = "fbxb" """# glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). """ # noqa: E501 GLTF = "gltf" """# 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 diff --git a/kittycad/models/file_import_format.py b/kittycad/models/file_import_format.py index 62a5f1c18..1a484317e 100644 --- a/kittycad/models/file_import_format.py +++ b/kittycad/models/file_import_format.py @@ -4,10 +4,6 @@ from enum import Enum class FileImportFormat(str, Enum): """The valid types of source file formats.""" # noqa: E501 - """# The COLLADA/DAE file format. """ # noqa: E501 - DAE = "dae" - """# The FBX file format. """ # noqa: E501 - FBX = "fbx" """# glTF 2.0. """ # noqa: E501 GLTF = "gltf" """# 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 diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index 65a460433..bb8def543 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -DO = TypeVar("DO", bound="FileMass") +OH = TypeVar("OH", bound="FileMass") @attr.s(auto_attribs=True) @@ -23,7 +23,6 @@ class FileMass: error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET mass: Union[Unset, float] = UNSET - masses: Union[Unset, Any] = UNSET material_density: Union[Unset, float] = UNSET material_density_unit: Union[Unset, UnitDensity] = UNSET output_unit: Union[Unset, UnitMass] = UNSET @@ -45,7 +44,6 @@ class FileMass: error = self.error id = self.id mass = self.mass - masses = self.masses material_density = self.material_density if not isinstance(self.material_density_unit, Unset): material_density_unit = self.material_density_unit @@ -76,8 +74,6 @@ class FileMass: field_dict["id"] = id if mass is not UNSET: field_dict["mass"] = mass - if masses is not UNSET: - field_dict["masses"] = masses if material_density is not UNSET: field_dict["material_density"] = material_density if material_density_unit is not UNSET: @@ -98,7 +94,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: + def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -125,7 +121,6 @@ class FileMass: mass = d.pop("mass", UNSET) - masses = d.pop("masses", UNSET) material_density = d.pop("material_density", UNSET) _material_density_unit = d.pop("material_density_unit", UNSET) @@ -178,7 +173,6 @@ class FileMass: error=error, id=id, mass=mass, - masses=masses, material_density=material_density, material_density_unit=material_density_unit, output_unit=output_unit, diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index c05b3c884..3e4ac363e 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -FZ = TypeVar("FZ", bound="FileSurfaceArea") +VI = TypeVar("VI", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -26,7 +26,6 @@ class FileSurfaceArea: started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, ApiCallStatus] = UNSET surface_area: Union[Unset, float] = UNSET - surface_areas: Union[Unset, Any] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -51,7 +50,6 @@ class FileSurfaceArea: if not isinstance(self.status, Unset): status = self.status surface_area = self.surface_area - surface_areas = self.surface_areas updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -78,8 +76,6 @@ class FileSurfaceArea: field_dict["status"] = status if surface_area is not UNSET: field_dict["surface_area"] = surface_area - if surface_areas is not UNSET: - field_dict["surface_areas"] = surface_areas if updated_at is not UNSET: field_dict["updated_at"] = updated_at if user_id is not UNSET: @@ -88,7 +84,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: + def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -143,7 +139,6 @@ class FileSurfaceArea: surface_area = d.pop("surface_area", UNSET) - surface_areas = d.pop("surface_areas", UNSET) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] if isinstance(_updated_at, Unset): @@ -163,7 +158,6 @@ class FileSurfaceArea: started_at=started_at, status=status, surface_area=surface_area, - surface_areas=surface_areas, updated_at=updated_at, user_id=user_id, ) diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index 6a10b858f..540b9def4 100644 --- a/kittycad/models/file_system_metadata.py +++ b/kittycad/models/file_system_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -GL = TypeVar("GL", bound="FileSystemMetadata") +ET = TypeVar("ET", bound="FileSystemMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class FileSystemMetadata: return field_dict @classmethod - def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: + def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 20172ddac..01b0819c7 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -NN = TypeVar("NN", bound="FileVolume") +QF = TypeVar("QF", bound="FileVolume") @attr.s(auto_attribs=True) @@ -28,7 +28,6 @@ class FileVolume: updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET volume: Union[Unset, float] = UNSET - volumes: Union[Unset, Any] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -55,7 +54,6 @@ class FileVolume: updated_at = self.updated_at.isoformat() user_id = self.user_id volume = self.volume - volumes = self.volumes field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -82,13 +80,11 @@ class FileVolume: field_dict["user_id"] = user_id if volume is not UNSET: field_dict["volume"] = volume - if volumes is not UNSET: - field_dict["volumes"] = volumes return field_dict @classmethod - def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: + def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -152,8 +148,6 @@ class FileVolume: volume = d.pop("volume", UNSET) - volumes = d.pop("volumes", UNSET) - file_volume = cls( completed_at=completed_at, created_at=created_at, @@ -166,7 +160,6 @@ class FileVolume: updated_at=updated_at, user_id=user_id, volume=volume, - volumes=volumes, ) file_volume.additional_properties = d diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index e46520541..bdcaff1c0 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OH = TypeVar("OH", bound="Gateway") +DI = TypeVar("DI", bound="Gateway") @attr.s(auto_attribs=True) @@ -43,7 +43,7 @@ class Gateway: return field_dict @classmethod - def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: + def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/index_info.py b/kittycad/models/index_info.py index 454eeaef3..286a69510 100644 --- a/kittycad/models/index_info.py +++ b/kittycad/models/index_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -VI = TypeVar("VI", bound="IndexInfo") +OJ = TypeVar("OJ", bound="IndexInfo") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class IndexInfo: return field_dict @classmethod - def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: + def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: d = src_dict.copy() mirrors = cast(List[str], d.pop("mirrors", UNSET)) diff --git a/kittycad/models/input_format.py b/kittycad/models/input_format.py index 00f356dcc..c758f521d 100644 --- a/kittycad/models/input_format.py +++ b/kittycad/models/input_format.py @@ -6,14 +6,14 @@ from ..models.system import System from ..models.unit_length import UnitLength from ..types import UNSET, Unset -ET = TypeVar("ET", bound="Gltf") +UF = TypeVar("UF", bound="gltf") @attr.s(auto_attribs=True) -class Gltf: +class gltf: """Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" # noqa: E501 - type: Union[Unset, str] = UNSET + type: str = "gltf" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -23,13 +23,12 @@ class Gltf: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: + def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: d = src_dict.copy() type = d.pop("type", UNSET) @@ -57,47 +56,33 @@ class Gltf: return key in self.additional_properties -QF = TypeVar("QF", bound="Step") +YF = TypeVar("YF", bound="step") @attr.s(auto_attribs=True) -class Step: +class step: """ISO 10303-21 (STEP) format.""" # noqa: E501 - coords: Union[Unset, System] = UNSET - type: Union[Unset, str] = UNSET + type: str = "step" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: + def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] - type = d.pop("type", UNSET) step = cls( - coords=coords, type=type, ) @@ -121,15 +106,15 @@ class Step: return key in self.additional_properties -DI = TypeVar("DI", bound="Obj") +PY = TypeVar("PY", bound="obj") @attr.s(auto_attribs=True) -class Obj: +class obj: """Wavefront OBJ format.""" # noqa: E501 coords: Union[Unset, System] = UNSET - type: Union[Unset, str] = UNSET + type: str = "obj" units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -146,15 +131,14 @@ class Obj: field_dict.update({}) if coords is not UNSET: field_dict["coords"] = coords - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if units is not UNSET: field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: + def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -198,15 +182,15 @@ class Obj: return key in self.additional_properties -OJ = TypeVar("OJ", bound="Ply") +LK = TypeVar("LK", bound="ply") @attr.s(auto_attribs=True) -class Ply: +class ply: """The PLY Polygon File Format.""" # noqa: E501 coords: Union[Unset, System] = UNSET - type: Union[Unset, str] = UNSET + type: str = "ply" units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -223,15 +207,14 @@ class Ply: field_dict.update({}) if coords is not UNSET: field_dict["coords"] = coords - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if units is not UNSET: field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: + def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -275,15 +258,15 @@ class Ply: return key in self.additional_properties -UF = TypeVar("UF", bound="Stl") +AR = TypeVar("AR", bound="stl") @attr.s(auto_attribs=True) -class Stl: +class stl: """*ST**ereo**L**ithography format.""" # noqa: E501 coords: Union[Unset, System] = UNSET - type: Union[Unset, str] = UNSET + type: str = "stl" units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -300,15 +283,14 @@ class Stl: field_dict.update({}) if coords is not UNSET: field_dict["coords"] = coords - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type if units is not UNSET: field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -352,4 +334,4 @@ class Stl: return key in self.additional_properties -InputFormat = Union[Gltf, Step, Obj, Ply, Stl] +InputFormat = Union[gltf, step, obj, ply, stl] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index a211485bc..018aa5f35 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.invoice_status import InvoiceStatus from ..types import UNSET, Unset -YF = TypeVar("YF", bound="Invoice") +WB = TypeVar("WB", bound="Invoice") @attr.s(auto_attribs=True) @@ -143,7 +143,7 @@ class Invoice: return field_dict @classmethod - def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: + def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: d = src_dict.copy() amount_due = d.pop("amount_due", UNSET) diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index b03b01c71..459aa3198 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -5,7 +5,7 @@ import attr from ..models.currency import Currency from ..types import UNSET, Unset -PY = TypeVar("PY", bound="InvoiceLineItem") +KK = TypeVar("KK", bound="InvoiceLineItem") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class InvoiceLineItem: return field_dict @classmethod - def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: + def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: d = src_dict.copy() amount = d.pop("amount", UNSET) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index 324a769d1..719472a23 100644 --- a/kittycad/models/jetstream.py +++ b/kittycad/models/jetstream.py @@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats from ..models.meta_cluster_info import MetaClusterInfo from ..types import UNSET, Unset -LK = TypeVar("LK", bound="Jetstream") +HC = TypeVar("HC", bound="Jetstream") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class Jetstream: return field_dict @classmethod - def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: + def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: d = src_dict.copy() _config = d.pop("config", UNSET) config: Union[Unset, JetstreamConfig] diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index 309b8d141..2177e7cfa 100644 --- a/kittycad/models/jetstream_api_stats.py +++ b/kittycad/models/jetstream_api_stats.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -AR = TypeVar("AR", bound="JetstreamApiStats") +FM = TypeVar("FM", bound="JetstreamApiStats") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class JetstreamApiStats: return field_dict @classmethod - def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: + def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: d = src_dict.copy() errors = d.pop("errors", UNSET) diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index d1013943f..ece7c4e6e 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -WB = TypeVar("WB", bound="JetstreamConfig") +PV = TypeVar("PV", bound="JetstreamConfig") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class JetstreamConfig: return field_dict @classmethod - def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: + def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: d = src_dict.copy() domain = d.pop("domain", UNSET) diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index 02dc8a82a..d0dfd02e1 100644 --- a/kittycad/models/jetstream_stats.py +++ b/kittycad/models/jetstream_stats.py @@ -5,7 +5,7 @@ import attr from ..models.jetstream_api_stats import JetstreamApiStats from ..types import UNSET, Unset -KK = TypeVar("KK", bound="JetstreamStats") +QI = TypeVar("QI", bound="JetstreamStats") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class JetstreamStats: return field_dict @classmethod - def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: + def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: d = src_dict.copy() accounts = d.pop("accounts", UNSET) diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index 066d96e57..4f239c3b8 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -HC = TypeVar("HC", bound="LeafNode") +TP = TypeVar("TP", bound="LeafNode") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class LeafNode: return field_dict @classmethod - def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: + def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/mesh.py b/kittycad/models/mesh.py index 3d46fe2c1..46420d4e4 100644 --- a/kittycad/models/mesh.py +++ b/kittycad/models/mesh.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FM = TypeVar("FM", bound="Mesh") +CF = TypeVar("CF", bound="Mesh") @attr.s(auto_attribs=True) @@ -25,7 +25,7 @@ class Mesh: return field_dict @classmethod - def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: + def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: d = src_dict.copy() mesh = d.pop("mesh", UNSET) diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py index e7df62850..96ba122b5 100644 --- a/kittycad/models/meta_cluster_info.py +++ b/kittycad/models/meta_cluster_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -PV = TypeVar("PV", bound="MetaClusterInfo") +OM = TypeVar("OM", bound="MetaClusterInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class MetaClusterInfo: return field_dict @classmethod - def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: + def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: d = src_dict.copy() cluster_size = d.pop("cluster_size", UNSET) diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 84c3152db..326cedd25 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -11,7 +11,7 @@ from ..models.file_system_metadata import FileSystemMetadata from ..models.point_e_metadata import PointEMetadata from ..types import UNSET, Unset -QI = TypeVar("QI", bound="Metadata") +EN = TypeVar("EN", bound="Metadata") @attr.s(auto_attribs=True) @@ -71,7 +71,7 @@ class Metadata: return field_dict @classmethod - def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: + def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: d = src_dict.copy() _cache = d.pop("cache", UNSET) cache: Union[Unset, CacheMetadata] diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index e8fdf5eca..8bbfc035d 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -1,34 +1,78 @@ -from enum import Enum -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr +from ..models.annotation_options import AnnotationOptions +from ..models.annotation_type import AnnotationType from ..models.camera_drag_interaction_type import CameraDragInteractionType from ..models.modeling_cmd_id import ModelingCmdId from ..models.output_format import OutputFormat from ..models.path_segment import PathSegment from ..models.point2d import Point2d from ..models.point3d import Point3d +from ..models.scene_selection_type import SceneSelectionType from ..types import UNSET, Unset -from .extrude import Extrude - -class StartPath(str, Enum): - """Start a path.""" # noqa: E501 - - START_PATH = "StartPath" - - def __str__(self) -> str: - return str(self.value) - - -TP = TypeVar("TP", bound="MovePathPen") +RS = TypeVar("RS", bound="start_path") @attr.s(auto_attribs=True) -class MovePathPen: +class start_path: + """Start a path.""" # noqa: E501 + + type: str = "start_path" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: + d = src_dict.copy() + type = d.pop("type", UNSET) + + start_path = cls( + type=type, + ) + + start_path.additional_properties = d + return start_path + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +LR = TypeVar("LR", bound="move_path_pen") + + +@attr.s(auto_attribs=True) +class move_path_pen: + """Move the path's "pen".""" # noqa: E501 + path: Union[Unset, ModelingCmdId] = UNSET to: Union[Unset, Point3d] = UNSET + type: str = "move_path_pen" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -37,6 +81,7 @@ class MovePathPen: path = self.path if not isinstance(self.to, Unset): to = self.to + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -45,11 +90,12 @@ class MovePathPen: field_dict["path"] = path if to is not UNSET: field_dict["to"] = to + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: + def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] @@ -65,9 +111,12 @@ class MovePathPen: else: to = _to # type: ignore[arg-type] + type = d.pop("type", UNSET) + move_path_pen = cls( path=path, to=to, + type=type, ) move_path_pen.additional_properties = d @@ -90,13 +139,16 @@ class MovePathPen: return key in self.additional_properties -CF = TypeVar("CF", bound="ExtendPath") +MP = TypeVar("MP", bound="extend_path") @attr.s(auto_attribs=True) -class ExtendPath: +class extend_path: + """Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin.""" # noqa: E501 + path: Union[Unset, ModelingCmdId] = UNSET segment: Union[Unset, PathSegment] = UNSET + type: str = "extend_path" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -105,6 +157,7 @@ class ExtendPath: path = self.path if not isinstance(self.segment, Unset): segment = self.segment + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -113,11 +166,12 @@ class ExtendPath: field_dict["path"] = path if segment is not UNSET: field_dict["segment"] = segment + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: + def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] @@ -133,9 +187,12 @@ class ExtendPath: else: segment = _segment # type: ignore[arg-type] + type = d.pop("type", UNSET) + extend_path = cls( path=path, segment=segment, + type=type, ) extend_path.additional_properties = d @@ -158,33 +215,118 @@ class ExtendPath: return key in self.additional_properties -OM = TypeVar("OM", bound="ClosePath") +WF = TypeVar("WF", bound="extrude") @attr.s(auto_attribs=True) -class ClosePath: +class extrude: + """Extrude a 2D solid.""" # noqa: E501 + + cap: Union[Unset, bool] = False + distance: Union[Unset, float] = UNSET + target: Union[Unset, ModelingCmdId] = UNSET + type: str = "extrude" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cap = self.cap + distance = self.distance + if not isinstance(self.target, Unset): + target = self.target + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cap is not UNSET: + field_dict["cap"] = cap + if distance is not UNSET: + field_dict["distance"] = distance + if target is not UNSET: + field_dict["target"] = target + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + d = src_dict.copy() + cap = d.pop("cap", UNSET) + + distance = d.pop("distance", UNSET) + + _target = d.pop("target", UNSET) + target: Union[Unset, ModelingCmdId] + if isinstance(_target, Unset): + target = UNSET + else: + target = _target # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + extrude = cls( + cap=cap, + distance=distance, + target=target, + type=type, + ) + + extrude.additional_properties = d + return extrude + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +RO = TypeVar("RO", bound="close_path") + + +@attr.s(auto_attribs=True) +class close_path: + """Closes a path, converting it to a 2D solid.""" # noqa: E501 + path_id: Union[Unset, str] = UNSET + type: str = "close_path" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: path_id = self.path_id + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if path_id is not UNSET: field_dict["path_id"] = path_id + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: + def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: d = src_dict.copy() path_id = d.pop("path_id", UNSET) + type = d.pop("type", UNSET) + close_path = cls( path_id=path_id, + type=type, ) close_path.additional_properties = d @@ -207,12 +349,15 @@ class ClosePath: return key in self.additional_properties -EN = TypeVar("EN", bound="CameraDragStart") +DN = TypeVar("DN", bound="camera_drag_start") @attr.s(auto_attribs=True) -class CameraDragStart: +class camera_drag_start: + """Camera drag started.""" # noqa: E501 + interaction: Union[Unset, CameraDragInteractionType] = UNSET + type: str = "camera_drag_start" window: Union[Unset, Point2d] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -220,6 +365,7 @@ class CameraDragStart: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.interaction, Unset): interaction = self.interaction + type = self.type if not isinstance(self.window, Unset): window = self.window @@ -228,13 +374,14 @@ class CameraDragStart: field_dict.update({}) if interaction is not UNSET: field_dict["interaction"] = interaction + field_dict["type"] = type if window is not UNSET: field_dict["window"] = window return field_dict @classmethod - def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: + def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -243,6 +390,8 @@ class CameraDragStart: else: interaction = _interaction # type: ignore[arg-type] + type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) window: Union[Unset, Point2d] if isinstance(_window, Unset): @@ -252,6 +401,7 @@ class CameraDragStart: camera_drag_start = cls( interaction=interaction, + type=type, window=window, ) @@ -275,13 +425,16 @@ class CameraDragStart: return key in self.additional_properties -RS = TypeVar("RS", bound="CameraDragMove") +BA = TypeVar("BA", bound="camera_drag_move") @attr.s(auto_attribs=True) -class CameraDragMove: +class camera_drag_move: + """Camera drag continued.""" # noqa: E501 + interaction: Union[Unset, CameraDragInteractionType] = UNSET sequence: Union[Unset, int] = UNSET + type: str = "camera_drag_move" window: Union[Unset, Point2d] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -290,6 +443,7 @@ class CameraDragMove: if not isinstance(self.interaction, Unset): interaction = self.interaction sequence = self.sequence + type = self.type if not isinstance(self.window, Unset): window = self.window @@ -300,13 +454,14 @@ class CameraDragMove: field_dict["interaction"] = interaction if sequence is not UNSET: field_dict["sequence"] = sequence + field_dict["type"] = type if window is not UNSET: field_dict["window"] = window return field_dict @classmethod - def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: + def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -317,6 +472,8 @@ class CameraDragMove: sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) window: Union[Unset, Point2d] if isinstance(_window, Unset): @@ -327,6 +484,7 @@ class CameraDragMove: camera_drag_move = cls( interaction=interaction, sequence=sequence, + type=type, window=window, ) @@ -350,12 +508,15 @@ class CameraDragMove: return key in self.additional_properties -LR = TypeVar("LR", bound="CameraDragEnd") +OR = TypeVar("OR", bound="camera_drag_end") @attr.s(auto_attribs=True) -class CameraDragEnd: +class camera_drag_end: + """Camera drag ended.""" # noqa: E501 + interaction: Union[Unset, CameraDragInteractionType] = UNSET + type: str = "camera_drag_end" window: Union[Unset, Point2d] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -363,6 +524,7 @@ class CameraDragEnd: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.interaction, Unset): interaction = self.interaction + type = self.type if not isinstance(self.window, Unset): window = self.window @@ -371,13 +533,14 @@ class CameraDragEnd: field_dict.update({}) if interaction is not UNSET: field_dict["interaction"] = interaction + field_dict["type"] = type if window is not UNSET: field_dict["window"] = window return field_dict @classmethod - def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: + def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -386,6 +549,8 @@ class CameraDragEnd: else: interaction = _interaction # type: ignore[arg-type] + type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) window: Union[Unset, Point2d] if isinstance(_window, Unset): @@ -395,6 +560,7 @@ class CameraDragEnd: camera_drag_end = cls( interaction=interaction, + type=type, window=window, ) @@ -418,12 +584,15 @@ class CameraDragEnd: return key in self.additional_properties -MP = TypeVar("MP", bound="DefaultCameraLookAt") +CB = TypeVar("CB", bound="default_camera_look_at") @attr.s(auto_attribs=True) -class DefaultCameraLookAt: +class default_camera_look_at: + """Change what the default camera is looking at.""" # noqa: E501 + center: Union[Unset, Point3d] = UNSET + type: str = "default_camera_look_at" up: Union[Unset, Point3d] = UNSET vantage: Union[Unset, Point3d] = UNSET @@ -432,6 +601,7 @@ class DefaultCameraLookAt: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.center, Unset): center = self.center + type = self.type if not isinstance(self.up, Unset): up = self.up if not isinstance(self.vantage, Unset): @@ -442,6 +612,7 @@ class DefaultCameraLookAt: field_dict.update({}) if center is not UNSET: field_dict["center"] = center + field_dict["type"] = type if up is not UNSET: field_dict["up"] = up if vantage is not UNSET: @@ -450,7 +621,7 @@ class DefaultCameraLookAt: return field_dict @classmethod - def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: + def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: d = src_dict.copy() _center = d.pop("center", UNSET) center: Union[Unset, Point3d] @@ -459,6 +630,8 @@ class DefaultCameraLookAt: else: center = _center # type: ignore[arg-type] + type = d.pop("type", UNSET) + _up = d.pop("up", UNSET) up: Union[Unset, Point3d] if isinstance(_up, Unset): @@ -475,6 +648,7 @@ class DefaultCameraLookAt: default_camera_look_at = cls( center=center, + type=type, up=up, vantage=vantage, ) @@ -499,24 +673,30 @@ class DefaultCameraLookAt: return key in self.additional_properties -WF = TypeVar("WF", bound="DefaultCameraEnableSketchMode") +LC = TypeVar("LC", bound="default_camera_enable_sketch_mode") @attr.s(auto_attribs=True) -class DefaultCameraEnableSketchMode: +class default_camera_enable_sketch_mode: + """Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.""" # noqa: E501 + + animated: Union[Unset, bool] = False distance_to_plane: Union[Unset, float] = UNSET origin: Union[Unset, Point3d] = UNSET ortho: Union[Unset, bool] = False + type: str = "default_camera_enable_sketch_mode" x_axis: Union[Unset, Point3d] = UNSET y_axis: Union[Unset, Point3d] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + animated = self.animated distance_to_plane = self.distance_to_plane if not isinstance(self.origin, Unset): origin = self.origin ortho = self.ortho + type = self.type if not isinstance(self.x_axis, Unset): x_axis = self.x_axis if not isinstance(self.y_axis, Unset): @@ -525,12 +705,15 @@ class DefaultCameraEnableSketchMode: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if animated is not UNSET: + field_dict["animated"] = animated if distance_to_plane is not UNSET: field_dict["distance_to_plane"] = distance_to_plane if origin is not UNSET: field_dict["origin"] = origin if ortho is not UNSET: field_dict["ortho"] = ortho + field_dict["type"] = type if x_axis is not UNSET: field_dict["x_axis"] = x_axis if y_axis is not UNSET: @@ -539,8 +722,10 @@ class DefaultCameraEnableSketchMode: return field_dict @classmethod - def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: d = src_dict.copy() + animated = d.pop("animated", UNSET) + distance_to_plane = d.pop("distance_to_plane", UNSET) _origin = d.pop("origin", UNSET) @@ -552,6 +737,8 @@ class DefaultCameraEnableSketchMode: ortho = d.pop("ortho", UNSET) + type = d.pop("type", UNSET) + _x_axis = d.pop("x_axis", UNSET) x_axis: Union[Unset, Point3d] if isinstance(_x_axis, Unset): @@ -567,9 +754,11 @@ class DefaultCameraEnableSketchMode: y_axis = _y_axis # type: ignore[arg-type] default_camera_enable_sketch_mode = cls( + animated=animated, distance_to_plane=distance_to_plane, origin=origin, ortho=ortho, + type=type, x_axis=x_axis, y_axis=y_axis, ) @@ -594,39 +783,93 @@ class DefaultCameraEnableSketchMode: return key in self.additional_properties -class DefaultCameraDisableSketchMode(str, Enum): - """Disable sketch mode, from the default camera.""" # noqa: E501 - - DEFAULT_CAMERA_DISABLE_SKETCH_MODE = "DefaultCameraDisableSketchMode" - - def __str__(self) -> str: - return str(self.value) - - -RO = TypeVar("RO", bound="Export") +TO = TypeVar("TO", bound="default_camera_disable_sketch_mode") @attr.s(auto_attribs=True) -class Export: - format: Union[Unset, OutputFormat] = UNSET +class default_camera_disable_sketch_mode: + """Disable sketch mode, from the default camera.""" # noqa: E501 + + type: str = "default_camera_disable_sketch_mode" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.format, Unset): - format = self.format + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if format is not UNSET: - field_dict["format"] = format + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: + def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: d = src_dict.copy() + type = d.pop("type", UNSET) + + default_camera_disable_sketch_mode = cls( + type=type, + ) + + default_camera_disable_sketch_mode.additional_properties = d + return default_camera_disable_sketch_mode + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +ZP = TypeVar("ZP", bound="export") + + +@attr.s(auto_attribs=True) +class export: + """Export the scene to a file.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + format: Union[Unset, OutputFormat] = UNSET + type: str = "export" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.format, Unset): + format = self.format + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + if format is not UNSET: + field_dict["format"] = format + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + _format = d.pop("format", UNSET) format: Union[Unset, OutputFormat] if isinstance(_format, Unset): @@ -634,8 +877,12 @@ class Export: else: format = _format # type: ignore[arg-type] + type = d.pop("type", UNSET) + export = cls( + entity_ids=entity_ids, format=format, + type=type, ) export.additional_properties = d @@ -658,17 +905,1492 @@ class Export: return key in self.additional_properties +EO = TypeVar("EO", bound="entity_get_parent_id") + + +@attr.s(auto_attribs=True) +class entity_get_parent_id: + """What is this entity's parent?""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_parent_id" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + entity_get_parent_id = cls( + entity_id=entity_id, + type=type, + ) + + entity_get_parent_id.additional_properties = d + return entity_get_parent_id + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +NY = TypeVar("NY", bound="entity_get_num_children") + + +@attr.s(auto_attribs=True) +class entity_get_num_children: + """How many children does the entity have?""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_num_children" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + entity_get_num_children = cls( + entity_id=entity_id, + type=type, + ) + + entity_get_num_children.additional_properties = d + return entity_get_num_children + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +QO = TypeVar("QO", bound="entity_get_child_uuid") + + +@attr.s(auto_attribs=True) +class entity_get_child_uuid: + """What is the UUID of this entity's n-th child?""" # noqa: E501 + + child_index: Union[Unset, int] = UNSET + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_child_uuid" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + child_index = self.child_index + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if child_index is not UNSET: + field_dict["child_index"] = child_index + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: + d = src_dict.copy() + child_index = d.pop("child_index", UNSET) + + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + entity_get_child_uuid = cls( + child_index=child_index, + entity_id=entity_id, + type=type, + ) + + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +KX = TypeVar("KX", bound="entity_get_all_child_uuids") + + +@attr.s(auto_attribs=True) +class entity_get_all_child_uuids: + """What are all UUIDs of this entity's children?""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_all_child_uuids" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + entity_get_all_child_uuids = cls( + entity_id=entity_id, + type=type, + ) + + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +IZ = TypeVar("IZ", bound="edit_mode_enter") + + +@attr.s(auto_attribs=True) +class edit_mode_enter: + """Enter edit mode""" # noqa: E501 + + target: Union[Unset, str] = UNSET + type: str = "edit_mode_enter" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + target = self.target + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if target is not UNSET: + field_dict["target"] = target + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + d = src_dict.copy() + target = d.pop("target", UNSET) + + type = d.pop("type", UNSET) + + edit_mode_enter = cls( + target=target, + type=type, + ) + + edit_mode_enter.additional_properties = d + return edit_mode_enter + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +WO = TypeVar("WO", bound="edit_mode_exit") + + +@attr.s(auto_attribs=True) +class edit_mode_exit: + """Exit edit mode""" # noqa: E501 + + type: str = "edit_mode_exit" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: + d = src_dict.copy() + type = d.pop("type", UNSET) + + edit_mode_exit = cls( + type=type, + ) + + edit_mode_exit.additional_properties = d + return edit_mode_exit + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +NK = TypeVar("NK", bound="select_with_point") + + +@attr.s(auto_attribs=True) +class select_with_point: + """Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected.""" # noqa: E501 + + selected_at_window: Union[Unset, Point2d] = UNSET + selection_type: Union[Unset, SceneSelectionType] = UNSET + type: str = "select_with_point" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.selected_at_window, Unset): + selected_at_window = self.selected_at_window + if not isinstance(self.selection_type, Unset): + selection_type = self.selection_type + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selected_at_window is not UNSET: + field_dict["selected_at_window"] = selected_at_window + if selection_type is not UNSET: + field_dict["selection_type"] = selection_type + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: + d = src_dict.copy() + _selected_at_window = d.pop("selected_at_window", UNSET) + selected_at_window: Union[Unset, Point2d] + if isinstance(_selected_at_window, Unset): + selected_at_window = UNSET + else: + selected_at_window = _selected_at_window # type: ignore[arg-type] + + _selection_type = d.pop("selection_type", UNSET) + selection_type: Union[Unset, SceneSelectionType] + if isinstance(_selection_type, Unset): + selection_type = UNSET + else: + selection_type = _selection_type # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + select_with_point = cls( + selected_at_window=selected_at_window, + selection_type=selection_type, + type=type, + ) + + select_with_point.additional_properties = d + return select_with_point + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +UQ = TypeVar("UQ", bound="select_clear") + + +@attr.s(auto_attribs=True) +class select_clear: + """Clear the selection""" # noqa: E501 + + type: str = "select_clear" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: + d = src_dict.copy() + type = d.pop("type", UNSET) + + select_clear = cls( + type=type, + ) + + select_clear.additional_properties = d + return select_clear + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +QE = TypeVar("QE", bound="select_add") + + +@attr.s(auto_attribs=True) +class select_add: + """Adds one or more entities (by UUID) to the selection.""" # noqa: E501 + + entities: Union[Unset, List[str]] = UNSET + type: str = "select_add" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) + + type = d.pop("type", UNSET) + + select_add = cls( + entities=entities, + type=type, + ) + + select_add.additional_properties = d + return select_add + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +XH = TypeVar("XH", bound="select_remove") + + +@attr.s(auto_attribs=True) +class select_remove: + """Removes one or more entities (by UUID) from the selection.""" # noqa: E501 + + entities: Union[Unset, List[str]] = UNSET + type: str = "select_remove" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) + + type = d.pop("type", UNSET) + + select_remove = cls( + entities=entities, + type=type, + ) + + select_remove.additional_properties = d + return select_remove + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +KT = TypeVar("KT", bound="select_replace") + + +@attr.s(auto_attribs=True) +class select_replace: + """Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd.""" # noqa: E501 + + entities: Union[Unset, List[str]] = UNSET + type: str = "select_replace" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) + + type = d.pop("type", UNSET) + + select_replace = cls( + entities=entities, + type=type, + ) + + select_replace.additional_properties = d + return select_replace + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +BV = TypeVar("BV", bound="select_get") + + +@attr.s(auto_attribs=True) +class select_get: + """Find all IDs of selected entities""" # noqa: E501 + + type: str = "select_get" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: + d = src_dict.copy() + type = d.pop("type", UNSET) + + select_get = cls( + type=type, + ) + + select_get.additional_properties = d + return select_get + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +GU = TypeVar("GU", bound="highlight_set_entity") + + +@attr.s(auto_attribs=True) +class highlight_set_entity: + """Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.""" # noqa: E501 + + selected_at_window: Union[Unset, Point2d] = UNSET + sequence: Union[Unset, int] = UNSET + type: str = "highlight_set_entity" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.selected_at_window, Unset): + selected_at_window = self.selected_at_window + sequence = self.sequence + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selected_at_window is not UNSET: + field_dict["selected_at_window"] = selected_at_window + if sequence is not UNSET: + field_dict["sequence"] = sequence + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: + d = src_dict.copy() + _selected_at_window = d.pop("selected_at_window", UNSET) + selected_at_window: Union[Unset, Point2d] + if isinstance(_selected_at_window, Unset): + selected_at_window = UNSET + else: + selected_at_window = _selected_at_window # type: ignore[arg-type] + + sequence = d.pop("sequence", UNSET) + + type = d.pop("type", UNSET) + + highlight_set_entity = cls( + selected_at_window=selected_at_window, + sequence=sequence, + type=type, + ) + + highlight_set_entity.additional_properties = d + return highlight_set_entity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +SS = TypeVar("SS", bound="highlight_set_entities") + + +@attr.s(auto_attribs=True) +class highlight_set_entities: + """Changes the current highlighted entity to these entities.""" # noqa: E501 + + entities: Union[Unset, List[str]] = UNSET + type: str = "highlight_set_entities" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict["entities"] = entities + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) + + type = d.pop("type", UNSET) + + highlight_set_entities = cls( + entities=entities, + type=type, + ) + + highlight_set_entities.additional_properties = d + return highlight_set_entities + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +UP = TypeVar("UP", bound="new_annotation") + + +@attr.s(auto_attribs=True) +class new_annotation: + """Create a new annotation""" # noqa: E501 + + annotation_type: Union[Unset, AnnotationType] = UNSET + clobber: Union[Unset, bool] = False + options: Union[Unset, AnnotationOptions] = UNSET + type: str = "new_annotation" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.annotation_type, Unset): + annotation_type = self.annotation_type + clobber = self.clobber + if not isinstance(self.options, Unset): + options = self.options + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotation_type is not UNSET: + field_dict["annotation_type"] = annotation_type + if clobber is not UNSET: + field_dict["clobber"] = clobber + if options is not UNSET: + field_dict["options"] = options + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: + d = src_dict.copy() + _annotation_type = d.pop("annotation_type", UNSET) + annotation_type: Union[Unset, AnnotationType] + if isinstance(_annotation_type, Unset): + annotation_type = UNSET + else: + annotation_type = _annotation_type # type: ignore[arg-type] + + clobber = d.pop("clobber", UNSET) + + _options = d.pop("options", UNSET) + options: Union[Unset, AnnotationOptions] + if isinstance(_options, Unset): + options = UNSET + else: + options = _options # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + new_annotation = cls( + annotation_type=annotation_type, + clobber=clobber, + options=options, + type=type, + ) + + new_annotation.additional_properties = d + return new_annotation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +AZ = TypeVar("AZ", bound="update_annotation") + + +@attr.s(auto_attribs=True) +class update_annotation: + """Update an annotation""" # noqa: E501 + + annotation_id: Union[Unset, str] = UNSET + options: Union[Unset, AnnotationOptions] = UNSET + type: str = "update_annotation" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + annotation_id = self.annotation_id + if not isinstance(self.options, Unset): + options = self.options + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotation_id is not UNSET: + field_dict["annotation_id"] = annotation_id + if options is not UNSET: + field_dict["options"] = options + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: + d = src_dict.copy() + annotation_id = d.pop("annotation_id", UNSET) + + _options = d.pop("options", UNSET) + options: Union[Unset, AnnotationOptions] + if isinstance(_options, Unset): + options = UNSET + else: + options = _options # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + update_annotation = cls( + annotation_id=annotation_id, + options=options, + type=type, + ) + + update_annotation.additional_properties = d + return update_annotation + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +DJ = TypeVar("DJ", bound="object_visible") + + +@attr.s(auto_attribs=True) +class object_visible: + """Hide or show an object""" # noqa: E501 + + hidden: Union[Unset, bool] = False + object_id: Union[Unset, str] = UNSET + type: str = "object_visible" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + hidden = self.hidden + object_id = self.object_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if hidden is not UNSET: + field_dict["hidden"] = hidden + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: + d = src_dict.copy() + hidden = d.pop("hidden", UNSET) + + object_id = d.pop("object_id", UNSET) + + type = d.pop("type", UNSET) + + object_visible = cls( + hidden=hidden, + object_id=object_id, + type=type, + ) + + object_visible.additional_properties = d + return object_visible + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +WJ = TypeVar("WJ", bound="get_entity_type") + + +@attr.s(auto_attribs=True) +class get_entity_type: + """What type of entity is this?""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "get_entity_type" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + get_entity_type = cls( + entity_id=entity_id, + type=type, + ) + + get_entity_type.additional_properties = d + return get_entity_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +TR = TypeVar("TR", bound="solid3d_get_all_edge_faces") + + +@attr.s(auto_attribs=True) +class solid3d_get_all_edge_faces: + """Gets all faces which use the given edge.""" # noqa: E501 + + edge_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_all_edge_faces" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + object_id = self.object_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) + + object_id = d.pop("object_id", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_all_edge_faces = cls( + edge_id=edge_id, + object_id=object_id, + type=type, + ) + + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +YD = TypeVar("YD", bound="solid3d_get_all_opposite_edges") + + +@attr.s(auto_attribs=True) +class solid3d_get_all_opposite_edges: + """Gets all edges which are opposite the given edge, across all possible faces.""" # noqa: E501 + + along_vector: Union[Unset, Point3d] = UNSET + edge_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_all_opposite_edges" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.along_vector, Unset): + along_vector = self.along_vector + edge_id = self.edge_id + object_id = self.object_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if along_vector is not UNSET: + field_dict["along_vector"] = along_vector + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: + d = src_dict.copy() + _along_vector = d.pop("along_vector", UNSET) + along_vector: Union[Unset, Point3d] + if isinstance(_along_vector, Unset): + along_vector = UNSET + else: + along_vector = _along_vector # type: ignore[arg-type] + + edge_id = d.pop("edge_id", UNSET) + + object_id = d.pop("object_id", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_all_opposite_edges = cls( + along_vector=along_vector, + edge_id=edge_id, + object_id=object_id, + type=type, + ) + + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +JF = TypeVar("JF", bound="solid3d_get_opposite_edge") + + +@attr.s(auto_attribs=True) +class solid3d_get_opposite_edge: + """Gets the edge opposite the given edge, along the given face.""" # noqa: E501 + + edge_id: Union[Unset, str] = UNSET + face_uuid: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_opposite_edge" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_uuid = self.face_uuid + object_id = self.object_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if face_uuid is not UNSET: + field_dict["face_uuid"] = face_uuid + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) + + face_uuid = d.pop("face_uuid", UNSET) + + object_id = d.pop("object_id", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_opposite_edge = cls( + edge_id=edge_id, + face_uuid=face_uuid, + object_id=object_id, + type=type, + ) + + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +VP = TypeVar("VP", bound="solid3d_get_next_adjacent_edge") + + +@attr.s(auto_attribs=True) +class solid3d_get_next_adjacent_edge: + """Gets the next adjacent edge for the given edge, along the given face.""" # noqa: E501 + + edge_id: Union[Unset, str] = UNSET + face_uuid: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_next_adjacent_edge" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_uuid = self.face_uuid + object_id = self.object_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if face_uuid is not UNSET: + field_dict["face_uuid"] = face_uuid + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) + + face_uuid = d.pop("face_uuid", UNSET) + + object_id = d.pop("object_id", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_next_adjacent_edge = cls( + edge_id=edge_id, + face_uuid=face_uuid, + object_id=object_id, + type=type, + ) + + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +EL = TypeVar("EL", bound="solid3d_get_prev_adjacent_edge") + + +@attr.s(auto_attribs=True) +class solid3d_get_prev_adjacent_edge: + """Gets the previous adjacent edge for the given edge, along the given face.""" # noqa: E501 + + edge_id: Union[Unset, str] = UNSET + face_uuid: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_prev_adjacent_edge" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_uuid = self.face_uuid + object_id = self.object_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict["edge_id"] = edge_id + if face_uuid is not UNSET: + field_dict["face_uuid"] = face_uuid + if object_id is not UNSET: + field_dict["object_id"] = object_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) + + face_uuid = d.pop("face_uuid", UNSET) + + object_id = d.pop("object_id", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_prev_adjacent_edge = cls( + edge_id=edge_id, + face_uuid=face_uuid, + object_id=object_id, + type=type, + ) + + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + ModelingCmd = Union[ - StartPath, - MovePathPen, - ExtendPath, - Extrude, - ClosePath, - CameraDragStart, - CameraDragMove, - CameraDragEnd, - DefaultCameraLookAt, - DefaultCameraEnableSketchMode, - DefaultCameraDisableSketchMode, - Export, + start_path, + move_path_pen, + extend_path, + extrude, + close_path, + camera_drag_start, + camera_drag_move, + camera_drag_end, + default_camera_look_at, + default_camera_enable_sketch_mode, + default_camera_disable_sketch_mode, + export, + entity_get_parent_id, + entity_get_num_children, + entity_get_child_uuid, + entity_get_all_child_uuids, + edit_mode_enter, + edit_mode_exit, + select_with_point, + select_clear, + select_add, + select_remove, + select_replace, + select_get, + highlight_set_entity, + highlight_set_entities, + new_annotation, + update_annotation, + object_visible, + get_entity_type, + solid3d_get_all_edge_faces, + solid3d_get_all_opposite_edges, + solid3d_get_opposite_edge, + solid3d_get_next_adjacent_edge, + solid3d_get_prev_adjacent_edge, ] diff --git a/kittycad/models/modeling_cmd_req.py b/kittycad/models/modeling_cmd_req.py index 8e5199324..475928f5f 100644 --- a/kittycad/models/modeling_cmd_req.py +++ b/kittycad/models/modeling_cmd_req.py @@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset -DN = TypeVar("DN", bound="ModelingCmdReq") +ZG = TypeVar("ZG", bound="ModelingCmdReq") @attr.s(auto_attribs=True) @@ -15,7 +15,6 @@ class ModelingCmdReq: cmd: Union[Unset, ModelingCmd] = UNSET cmd_id: Union[Unset, ModelingCmdId] = UNSET - file_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -24,7 +23,6 @@ class ModelingCmdReq: cmd = self.cmd if not isinstance(self.cmd_id, Unset): cmd_id = self.cmd_id - file_id = self.file_id field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -33,13 +31,11 @@ class ModelingCmdReq: field_dict["cmd"] = cmd if cmd_id is not UNSET: field_dict["cmd_id"] = cmd_id - if file_id is not UNSET: - field_dict["file_id"] = file_id return field_dict @classmethod - def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: + def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: d = src_dict.copy() _cmd = d.pop("cmd", UNSET) cmd: Union[Unset, ModelingCmd] @@ -55,12 +51,9 @@ class ModelingCmdReq: else: cmd_id = _cmd_id # type: ignore[arg-type] - file_id = d.pop("file_id", UNSET) - modeling_cmd_req = cls( cmd=cmd, cmd_id=cmd_id, - file_id=file_id, ) modeling_cmd_req.additional_properties = d diff --git a/kittycad/models/modeling_cmd_req_batch.py b/kittycad/models/modeling_cmd_req_batch.py index 166454149..7a4678043 100644 --- a/kittycad/models/modeling_cmd_req_batch.py +++ b/kittycad/models/modeling_cmd_req_batch.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -BA = TypeVar("BA", bound="ModelingCmdReqBatch") +LF = TypeVar("LF", bound="ModelingCmdReqBatch") @attr.s(auto_attribs=True) @@ -12,33 +12,27 @@ class ModelingCmdReqBatch: """A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501 cmds: Union[Unset, Any] = UNSET - file_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: cmds = self.cmds - file_id = self.file_id field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if cmds is not UNSET: field_dict["cmds"] = cmds - if file_id is not UNSET: - field_dict["file_id"] = file_id return field_dict @classmethod - def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: + def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: d = src_dict.copy() cmds = d.pop("cmds", UNSET) - file_id = d.pop("file_id", UNSET) modeling_cmd_req_batch = cls( cmds=cmds, - file_id=file_id, ) modeling_cmd_req_batch.additional_properties = d diff --git a/kittycad/models/modeling_error.py b/kittycad/models/modeling_error.py index b1c52dbf8..57ed12635 100644 --- a/kittycad/models/modeling_error.py +++ b/kittycad/models/modeling_error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OR = TypeVar("OR", bound="ModelingError") +CS = TypeVar("CS", bound="ModelingError") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class ModelingError: return field_dict @classmethod - def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: + def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: d = src_dict.copy() error_code = d.pop("error_code", UNSET) diff --git a/kittycad/models/modeling_outcome.py b/kittycad/models/modeling_outcome.py index 413f0b814..76a25075f 100644 --- a/kittycad/models/modeling_outcome.py +++ b/kittycad/models/modeling_outcome.py @@ -5,18 +5,19 @@ import attr from ..models.modeling_cmd_id import ModelingCmdId from ..types import UNSET, Unset from .modeling_error import ModelingError +from .ok_modeling_cmd_response import OkModelingCmdResponse -Success = Any +success = OkModelingCmdResponse -Error = ModelingError +error = ModelingError -CB = TypeVar("CB", bound="Cancelled") +GN = TypeVar("GN", bound="cancelled") @attr.s(auto_attribs=True) -class Cancelled: +class cancelled: what_failed: Union[Unset, ModelingCmdId] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -34,7 +35,7 @@ class Cancelled: return field_dict @classmethod - def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: + def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: d = src_dict.copy() _what_failed = d.pop("what_failed", UNSET) what_failed: Union[Unset, ModelingCmdId] @@ -67,4 +68,4 @@ class Cancelled: return key in self.additional_properties -ModelingOutcome = Union[Success, Error, Cancelled] +ModelingOutcome = Union[success, error, cancelled] diff --git a/kittycad/models/modeling_outcomes.py b/kittycad/models/modeling_outcomes.py index 62f871232..1c280e963 100644 --- a/kittycad/models/modeling_outcomes.py +++ b/kittycad/models/modeling_outcomes.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LC = TypeVar("LC", bound="ModelingOutcomes") +GD = TypeVar("GD", bound="ModelingOutcomes") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class ModelingOutcomes: return field_dict @classmethod - def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: + def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: d = src_dict.copy() outcomes = d.pop("outcomes", UNSET) diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index 8a2e124ad..c6352ccb4 100644 --- a/kittycad/models/new_address.py +++ b/kittycad/models/new_address.py @@ -5,7 +5,7 @@ import attr from ..models.country_code import CountryCode from ..types import UNSET, Unset -TO = TypeVar("TO", bound="NewAddress") +VJ = TypeVar("VJ", bound="NewAddress") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class NewAddress: return field_dict @classmethod - def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: + def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: d = src_dict.copy() city = d.pop("city", UNSET) diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py index 096dcfb25..f03fe17e1 100644 --- a/kittycad/models/o_auth2_client_info.py +++ b/kittycad/models/o_auth2_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -ZP = TypeVar("ZP", bound="OAuth2ClientInfo") +OX = TypeVar("OX", bound="OAuth2ClientInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class OAuth2ClientInfo: return field_dict @classmethod - def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: + def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: d = src_dict.copy() csrf_token = d.pop("csrf_token", UNSET) diff --git a/kittycad/models/ok_modeling_cmd_response.py b/kittycad/models/ok_modeling_cmd_response.py new file mode 100644 index 000000000..8281ab3f5 --- /dev/null +++ b/kittycad/models/ok_modeling_cmd_response.py @@ -0,0 +1,901 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.entity_type import EntityType +from ..types import UNSET, Unset + +YW = TypeVar("YW", bound="empty") + + +@attr.s(auto_attribs=True) +class empty: + """An empty response, used for any command that does not explicitly have a response defined here.""" # noqa: E501 + + type: str = "empty" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: + d = src_dict.copy() + type = d.pop("type", UNSET) + + empty = cls( + type=type, + ) + + empty.additional_properties = d + return empty + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +QX = TypeVar("QX", bound="export") + + +@attr.s(auto_attribs=True) +class export: + """The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`.""" # noqa: E501 + + from ..models.export_file import ExportFile + + files: Union[Unset, List[ExportFile]] = UNSET + type: str = "export" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.export_file import ExportFile + + files: Union[Unset, List[ExportFile]] = UNSET + if not isinstance(self.files, Unset): + files = self.files + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if files is not UNSET: + field_dict["files"] = files + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: + d = src_dict.copy() + from ..models.export_file import ExportFile + + files = cast(List[ExportFile], d.pop("files", UNSET)) + + type = d.pop("type", UNSET) + + export = cls( + files=files, + type=type, + ) + + export.additional_properties = d + return export + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +NO = TypeVar("NO", bound="select_with_point") + + +@attr.s(auto_attribs=True) +class select_with_point: + """The response from the `SelectWithPoint` command.""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "select_with_point" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + select_with_point = cls( + entity_id=entity_id, + type=type, + ) + + select_with_point.additional_properties = d + return select_with_point + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +VX = TypeVar("VX", bound="highlight_set_entity") + + +@attr.s(auto_attribs=True) +class highlight_set_entity: + """The response from the `HighlightSetEntity` command.""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + sequence: Union[Unset, int] = UNSET + type: str = "highlight_set_entity" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + sequence = self.sequence + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + if sequence is not UNSET: + field_dict["sequence"] = sequence + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + sequence = d.pop("sequence", UNSET) + + type = d.pop("type", UNSET) + + highlight_set_entity = cls( + entity_id=entity_id, + sequence=sequence, + type=type, + ) + + highlight_set_entity.additional_properties = d + return highlight_set_entity + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +RG = TypeVar("RG", bound="entity_get_child_uuid") + + +@attr.s(auto_attribs=True) +class entity_get_child_uuid: + """The response from the `EntityGetChildUuid` command.""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_child_uuid" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + entity_get_child_uuid = cls( + entity_id=entity_id, + type=type, + ) + + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +IT = TypeVar("IT", bound="entity_get_num_children") + + +@attr.s(auto_attribs=True) +class entity_get_num_children: + """The response from the `EntityGetNumChildren` command.""" # noqa: E501 + + num: Union[Unset, int] = UNSET + type: str = "entity_get_num_children" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + num = self.num + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if num is not UNSET: + field_dict["num"] = num + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: + d = src_dict.copy() + num = d.pop("num", UNSET) + + type = d.pop("type", UNSET) + + entity_get_num_children = cls( + num=num, + type=type, + ) + + entity_get_num_children.additional_properties = d + return entity_get_num_children + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +LD = TypeVar("LD", bound="entity_get_parent_id") + + +@attr.s(auto_attribs=True) +class entity_get_parent_id: + """The response from the `EntityGetParentId` command.""" # noqa: E501 + + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_parent_id" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict["entity_id"] = entity_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) + + type = d.pop("type", UNSET) + + entity_get_parent_id = cls( + entity_id=entity_id, + type=type, + ) + + entity_get_parent_id.additional_properties = d + return entity_get_parent_id + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +UA = TypeVar("UA", bound="entity_get_all_child_uuids") + + +@attr.s(auto_attribs=True) +class entity_get_all_child_uuids: + """The response from the `EntityGetAllChildUuids` command.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + type: str = "entity_get_all_child_uuids" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + type = d.pop("type", UNSET) + + entity_get_all_child_uuids = cls( + entity_ids=entity_ids, + type=type, + ) + + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +TN = TypeVar("TN", bound="select_get") + + +@attr.s(auto_attribs=True) +class select_get: + """The response from the `SelectGet` command.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + type: str = "select_get" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict["entity_ids"] = entity_ids + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + type = d.pop("type", UNSET) + + select_get = cls( + entity_ids=entity_ids, + type=type, + ) + + select_get.additional_properties = d + return select_get + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +MZ = TypeVar("MZ", bound="get_entity_type") + + +@attr.s(auto_attribs=True) +class get_entity_type: + """The response from the `GetEntityType` command.""" # noqa: E501 + + entity_type: Union[Unset, EntityType] = UNSET + type: str = "get_entity_type" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.entity_type, Unset): + entity_type = self.entity_type + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_type is not UNSET: + field_dict["entity_type"] = entity_type + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: + d = src_dict.copy() + _entity_type = d.pop("entity_type", UNSET) + entity_type: Union[Unset, EntityType] + if isinstance(_entity_type, Unset): + entity_type = UNSET + else: + entity_type = _entity_type # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + get_entity_type = cls( + entity_type=entity_type, + type=type, + ) + + get_entity_type.additional_properties = d + return get_entity_type + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +UG = TypeVar("UG", bound="solid3d_get_all_edge_faces") + + +@attr.s(auto_attribs=True) +class solid3d_get_all_edge_faces: + """The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501 + + faces: Union[Unset, List[str]] = UNSET + type: str = "solid3d_get_all_edge_faces" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + faces: Union[Unset, List[str]] = UNSET + if not isinstance(self.faces, Unset): + faces = self.faces + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if faces is not UNSET: + field_dict["faces"] = faces + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: + d = src_dict.copy() + faces = cast(List[str], d.pop("faces", UNSET)) + + type = d.pop("type", UNSET) + + solid3d_get_all_edge_faces = cls( + faces=faces, + type=type, + ) + + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +CY = TypeVar("CY", bound="solid3d_get_all_opposite_edges") + + +@attr.s(auto_attribs=True) +class solid3d_get_all_opposite_edges: + """The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501 + + edges: Union[Unset, List[str]] = UNSET + type: str = "solid3d_get_all_opposite_edges" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edges: Union[Unset, List[str]] = UNSET + if not isinstance(self.edges, Unset): + edges = self.edges + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edges is not UNSET: + field_dict["edges"] = edges + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: + d = src_dict.copy() + edges = cast(List[str], d.pop("edges", UNSET)) + + type = d.pop("type", UNSET) + + solid3d_get_all_opposite_edges = cls( + edges=edges, + type=type, + ) + + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +NZ = TypeVar("NZ", bound="solid3d_get_opposite_edge") + + +@attr.s(auto_attribs=True) +class solid3d_get_opposite_edge: + """The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501 + + edge: Union[Unset, str] = UNSET + type: str = "solid3d_get_opposite_edge" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge = self.edge + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict["edge"] = edge + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: + d = src_dict.copy() + edge = d.pop("edge", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_opposite_edge = cls( + edge=edge, + type=type, + ) + + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +LI = TypeVar("LI", bound="solid3d_get_prev_adjacent_edge") + + +@attr.s(auto_attribs=True) +class solid3d_get_prev_adjacent_edge: + """The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501 + + edge: Union[Unset, str] = UNSET + type: str = "solid3d_get_prev_adjacent_edge" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge = self.edge + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict["edge"] = edge + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: + d = src_dict.copy() + edge = d.pop("edge", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_prev_adjacent_edge = cls( + edge=edge, + type=type, + ) + + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +LO = TypeVar("LO", bound="solid3d_get_next_adjacent_edge") + + +@attr.s(auto_attribs=True) +class solid3d_get_next_adjacent_edge: + """The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501 + + edge: Union[Unset, str] = UNSET + type: str = "solid3d_get_next_adjacent_edge" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + edge = self.edge + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict["edge"] = edge + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: + d = src_dict.copy() + edge = d.pop("edge", UNSET) + + type = d.pop("type", UNSET) + + solid3d_get_next_adjacent_edge = cls( + edge=edge, + type=type, + ) + + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + +OkModelingCmdResponse = Union[ + empty, + export, + select_with_point, + highlight_set_entity, + entity_get_child_uuid, + entity_get_num_children, + entity_get_parent_id, + entity_get_all_child_uuids, + select_get, + get_entity_type, + solid3d_get_all_edge_faces, + solid3d_get_all_opposite_edges, + solid3d_get_opposite_edge, + solid3d_get_prev_adjacent_edge, + solid3d_get_next_adjacent_edge, +] diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index 156823467..22de9bcd8 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -EO = TypeVar("EO", bound="Onboarding") +XJ = TypeVar("XJ", bound="Onboarding") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class Onboarding: return field_dict @classmethod - def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: + def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: d = src_dict.copy() first_call_from__their_machine_date = d.pop( "first_call_from_their_machine_date", UNSET diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 337f8470a..6df1106c9 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -NY = TypeVar("NY", bound="OutputFile") +OW = TypeVar("OW", bound="OutputFile") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class OutputFile: return field_dict @classmethod - def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: d = src_dict.copy() contents = d.pop("contents", UNSET) diff --git a/kittycad/models/output_format.py b/kittycad/models/output_format.py index c57665ab1..7398e212a 100644 --- a/kittycad/models/output_format.py +++ b/kittycad/models/output_format.py @@ -6,15 +6,15 @@ from ..models.storage import Storage from ..models.system import System from ..types import UNSET, Unset -QO = TypeVar("QO", bound="Gltf") +JQ = TypeVar("JQ", bound="gltf") @attr.s(auto_attribs=True) -class Gltf: +class gltf: """glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.""" # noqa: E501 storage: Union[Unset, Storage] = UNSET - type: Union[Unset, str] = UNSET + type: str = "gltf" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -28,13 +28,12 @@ class Gltf: field_dict.update({}) if storage is not UNSET: field_dict["storage"] = storage - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: + def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: d = src_dict.copy() _storage = d.pop("storage", UNSET) storage: Union[Unset, Storage] @@ -70,15 +69,15 @@ class Gltf: return key in self.additional_properties -KX = TypeVar("KX", bound="Obj") +PQ = TypeVar("PQ", bound="obj") @attr.s(auto_attribs=True) -class Obj: +class obj: """Wavefront OBJ format.""" # noqa: E501 coords: Union[Unset, System] = UNSET - type: Union[Unset, str] = UNSET + type: str = "obj" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -92,13 +91,12 @@ class Obj: field_dict.update({}) if coords is not UNSET: field_dict["coords"] = coords - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: + def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -134,16 +132,16 @@ class Obj: return key in self.additional_properties -IZ = TypeVar("IZ", bound="Ply") +IM = TypeVar("IM", bound="ply") @attr.s(auto_attribs=True) -class Ply: +class ply: """The PLY Polygon File Format.""" # noqa: E501 coords: Union[Unset, System] = UNSET storage: Union[Unset, Storage] = UNSET - type: Union[Unset, str] = UNSET + type: str = "ply" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -161,13 +159,12 @@ class Ply: field_dict["coords"] = coords if storage is not UNSET: field_dict["storage"] = storage - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -211,15 +208,15 @@ class Ply: return key in self.additional_properties -WO = TypeVar("WO", bound="Step") +OU = TypeVar("OU", bound="step") @attr.s(auto_attribs=True) -class Step: +class step: """ISO 10303-21 (STEP) format.""" # noqa: E501 coords: Union[Unset, System] = UNSET - type: Union[Unset, str] = UNSET + type: str = "step" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -233,13 +230,12 @@ class Step: field_dict.update({}) if coords is not UNSET: field_dict["coords"] = coords - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: + def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -275,16 +271,16 @@ class Step: return key in self.additional_properties -NK = TypeVar("NK", bound="Stl") +KL = TypeVar("KL", bound="stl") @attr.s(auto_attribs=True) -class Stl: +class stl: """*ST**ereo**L**ithography format.""" # noqa: E501 coords: Union[Unset, System] = UNSET storage: Union[Unset, Storage] = UNSET - type: Union[Unset, str] = UNSET + type: str = "stl" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -302,13 +298,12 @@ class Stl: field_dict["coords"] = coords if storage is not UNSET: field_dict["storage"] = storage - if type is not UNSET: - field_dict["type"] = type + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: + def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -352,4 +347,4 @@ class Stl: return key in self.additional_properties -OutputFormat = Union[Gltf, Obj, Ply, Step, Stl] +OutputFormat = Union[gltf, obj, ply, step, stl] diff --git a/kittycad/models/path_segment.py b/kittycad/models/path_segment.py index e2e4107f7..3f941a7c1 100644 --- a/kittycad/models/path_segment.py +++ b/kittycad/models/path_segment.py @@ -6,29 +6,34 @@ from ..models.point2d import Point2d from ..models.point3d import Point3d from ..types import UNSET, Unset -UQ = TypeVar("UQ", bound="Line") +XI = TypeVar("XI", bound="line") @attr.s(auto_attribs=True) -class Line: +class line: + """A straight line segment. Goes from the current path "pen" to the given endpoint.""" # noqa: E501 + end: Union[Unset, Point3d] = UNSET + type: str = "line" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: if not isinstance(self.end, Unset): end = self.end + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if end is not UNSET: field_dict["end"] = end + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: + def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: d = src_dict.copy() _end = d.pop("end", UNSET) end: Union[Unset, Point3d] @@ -37,8 +42,11 @@ class Line: else: end = _end # type: ignore[arg-type] + type = d.pop("type", UNSET) + line = cls( end=end, + type=type, ) line.additional_properties = d @@ -61,15 +69,18 @@ class Line: return key in self.additional_properties -QE = TypeVar("QE", bound="Arc") +PO = TypeVar("PO", bound="arc") @attr.s(auto_attribs=True) -class Arc: +class arc: + """A circular arc segment.""" # noqa: E501 + angle_end: Union[Unset, float] = UNSET angle_start: Union[Unset, float] = UNSET center: Union[Unset, Point2d] = UNSET radius: Union[Unset, float] = UNSET + type: str = "arc" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -79,6 +90,7 @@ class Arc: if not isinstance(self.center, Unset): center = self.center radius = self.radius + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -91,11 +103,12 @@ class Arc: field_dict["center"] = center if radius is not UNSET: field_dict["radius"] = radius + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: + def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: d = src_dict.copy() angle_end = d.pop("angle_end", UNSET) @@ -110,11 +123,14 @@ class Arc: radius = d.pop("radius", UNSET) + type = d.pop("type", UNSET) + arc = cls( angle_end=angle_end, angle_start=angle_start, center=center, radius=radius, + type=type, ) arc.additional_properties = d @@ -137,14 +153,17 @@ class Arc: return key in self.additional_properties -XH = TypeVar("XH", bound="Bezier") +PS = TypeVar("PS", bound="bezier") @attr.s(auto_attribs=True) -class Bezier: +class bezier: + """A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.""" # noqa: E501 + control1: Union[Unset, Point3d] = UNSET control2: Union[Unset, Point3d] = UNSET end: Union[Unset, Point3d] = UNSET + type: str = "bezier" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -155,6 +174,7 @@ class Bezier: control2 = self.control2 if not isinstance(self.end, Unset): end = self.end + type = self.type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -165,11 +185,12 @@ class Bezier: field_dict["control2"] = control2 if end is not UNSET: field_dict["end"] = end + field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: + def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: d = src_dict.copy() _control1 = d.pop("control1", UNSET) control1: Union[Unset, Point3d] @@ -192,10 +213,13 @@ class Bezier: else: end = _end # type: ignore[arg-type] + type = d.pop("type", UNSET) + bezier = cls( control1=control1, control2=control2, end=end, + type=type, ) bezier.additional_properties = d @@ -218,4 +242,4 @@ class Bezier: return key in self.additional_properties -PathSegment = Union[Line, Arc, Bezier] +PathSegment = Union[line, arc, bezier] diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index cc377e055..9da79637c 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -KT = TypeVar("KT", bound="PaymentIntent") +WR = TypeVar("WR", bound="PaymentIntent") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class PaymentIntent: return field_dict @classmethod - def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: + def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: d = src_dict.copy() client_secret = d.pop("client_secret", UNSET) diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index d284870a9..d73afe391 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -9,7 +9,7 @@ from ..models.card_details import CardDetails from ..models.payment_method_type import PaymentMethodType from ..types import UNSET, Unset -BV = TypeVar("BV", bound="PaymentMethod") +XL = TypeVar("XL", bound="PaymentMethod") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class PaymentMethod: return field_dict @classmethod - def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: + def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: d = src_dict.copy() _billing_info = d.pop("billing_info", UNSET) billing_info: Union[Unset, BillingInfo] diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index 386f6e4f1..778d19d21 100644 --- a/kittycad/models/payment_method_card_checks.py +++ b/kittycad/models/payment_method_card_checks.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -GU = TypeVar("GU", bound="PaymentMethodCardChecks") +ZX = TypeVar("ZX", bound="PaymentMethodCardChecks") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class PaymentMethodCardChecks: return field_dict @classmethod - def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: + def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: d = src_dict.copy() address_line1_check = d.pop("address_line1_check", UNSET) diff --git a/kittycad/models/physics_constant.py b/kittycad/models/physics_constant.py deleted file mode 100644 index 8fd133bd8..000000000 --- a/kittycad/models/physics_constant.py +++ /dev/null @@ -1,168 +0,0 @@ -import datetime -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr -from dateutil.parser import isoparse - -from ..models.api_call_status import ApiCallStatus -from ..models.physics_constant_name import PhysicsConstantName -from ..models.uuid import Uuid -from ..types import UNSET, Unset - -SS = TypeVar("SS", bound="PhysicsConstant") - - -@attr.s(auto_attribs=True) -class PhysicsConstant: - """A physics constant.""" # noqa: E501 - - completed_at: Union[Unset, datetime.datetime] = UNSET - constant: Union[Unset, PhysicsConstantName] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - value: Union[Unset, float] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - completed_at: Union[Unset, str] = UNSET - if not isinstance(self.completed_at, Unset): - completed_at = self.completed_at.isoformat() - if not isinstance(self.constant, Unset): - constant = self.constant - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - error = self.error - id = self.id - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - value = self.value - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if completed_at is not UNSET: - field_dict["completed_at"] = completed_at - if constant is not UNSET: - field_dict["constant"] = constant - if created_at is not UNSET: - field_dict["created_at"] = created_at - if error is not UNSET: - field_dict["error"] = error - if id is not UNSET: - field_dict["id"] = id - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id - if value is not UNSET: - field_dict["value"] = value - - return field_dict - - @classmethod - def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - if isinstance(_completed_at, Unset): - completed_at = UNSET - else: - completed_at = isoparse(_completed_at) - - _constant = d.pop("constant", UNSET) - constant: Union[Unset, PhysicsConstantName] - if isinstance(_constant, Unset): - constant = UNSET - else: - constant = _constant # type: ignore[arg-type] - - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) - - error = d.pop("error", UNSET) - - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] - - _started_at = d.pop("started_at", UNSET) - started_at: Union[Unset, datetime.datetime] - if isinstance(_started_at, Unset): - started_at = UNSET - else: - started_at = isoparse(_started_at) - - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] - - _updated_at = d.pop("updated_at", UNSET) - updated_at: Union[Unset, datetime.datetime] - if isinstance(_updated_at, Unset): - updated_at = UNSET - else: - updated_at = isoparse(_updated_at) - - user_id = d.pop("user_id", UNSET) - - value = d.pop("value", UNSET) - - physics_constant = cls( - completed_at=completed_at, - constant=constant, - created_at=created_at, - error=error, - id=id, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - value=value, - ) - - physics_constant.additional_properties = d - return physics_constant - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/kittycad/models/physics_constant_name.py b/kittycad/models/physics_constant_name.py deleted file mode 100644 index a30397dcb..000000000 --- a/kittycad/models/physics_constant_name.py +++ /dev/null @@ -1,75 +0,0 @@ -from enum import Enum - - -class PhysicsConstantName(str, Enum): - """The valid types of phys constant names.""" # noqa: E501 - - """# pi - Ratio of a circle's circumference to its diameter. """ # noqa: E501 - PI = "pi" - """# c - Speed of light in vacuum. """ # noqa: E501 - C = "c" - """# Speed of light in a vacuum. """ # noqa: E501 - SPEED_OF_LIGHT = "speed_of_light" - """# G - Newtonian constant of gravitation. """ # noqa: E501 - G = "G" - """# Newtonian constant of gravitation. """ # noqa: E501 - NEWTONIAN_GRAVITATION = "newtonian_gravitation" - """# h - Planck constant. """ # noqa: E501 - H = "h" - """# Planck constant. """ # noqa: E501 - PLANCK_CONST = "planck_const" - """# mu_0 - vacuum permeability. """ # noqa: E501 - MU_0 = "mu_0" - """# vacuum permeability. """ # noqa: E501 - VACUUM_PERMEABILITY = "vacuum_permeability" - """# ε_0 - vacuum permitivity. """ # noqa: E501 - E_0 = "E_0" - """# vacuum permitivity. ] """ # noqa: E501 - VACUUM_PERMITIVITY = "vacuum_permitivity" - """# Z_0 - characteristic impedance of vacuum. """ # noqa: E501 - Z_0 = "Z_0" - """# characteristic impedance of vacuum. """ # noqa: E501 - VACUUM_IMPEDANCE = "vacuum_impedance" - """# k_e - Coulomb's constant. """ # noqa: E501 - K_E = "k_e" - """# Coulomb's constant. """ # noqa: E501 - COULOMB_CONST = "coulomb_const" - """# e - elementary charge. """ # noqa: E501 - E = "e" - """# elementary charge. """ # noqa: E501 - ELEMENTARY_CHARGE = "elementary_charge" - """# m_e - electron mass. """ # noqa: E501 - M_E = "m_e" - """# electron mass. """ # noqa: E501 - ELECTRON_MASS = "electron_mass" - """# m_p - proton mass. """ # noqa: E501 - M_P = "m_p" - """# proton mass. """ # noqa: E501 - PROTON_MASS = "proton_mass" - """# mu_B - Bohr magneton. """ # noqa: E501 - MU_B = "mu_B" - """# Bohr magneton. """ # noqa: E501 - BOHR_MAGNETON = "bohr_magneton" - """# NA - Avogadro's Number. """ # noqa: E501 - NA = "NA" - """# Avogadro's Number. """ # noqa: E501 - AVOGADRO_NUM = "avogadro_num" - """# R - Molar Gas constant. """ # noqa: E501 - R = "R" - """# Molar Gas constant. """ # noqa: E501 - MOLAR_GAS_CONST = "molar_gas_const" - """# K_B - Boltzmann constant. """ # noqa: E501 - K_B = "K_B" - """# Boltzmann constant. """ # noqa: E501 - BOLTZMANN_CONST = "boltzmann_const" - """# F - Faraday constant. """ # noqa: E501 - F = "F" - """# Faraday constant. """ # noqa: E501 - FARADAY_CONST = "faraday_const" - """# Sigma - Stefan-Boltzmann constant. """ # noqa: E501 - SIGMA = "sigma" - """# Stefan-Boltzmann constant. """ # noqa: E501 - STEFAN_BOLTZMANN_CONST = "stefan_boltzmann_const" - - def __str__(self) -> str: - return str(self.value) diff --git a/kittycad/models/plugins_info.py b/kittycad/models/plugins_info.py index a6422f16e..a720c0058 100644 --- a/kittycad/models/plugins_info.py +++ b/kittycad/models/plugins_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UP = TypeVar("UP", bound="PluginsInfo") +FT = TypeVar("FT", bound="PluginsInfo") @attr.s(auto_attribs=True) @@ -50,7 +50,7 @@ class PluginsInfo: return field_dict @classmethod - def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: + def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: d = src_dict.copy() authorization = cast(List[str], d.pop("authorization", UNSET)) diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py index 6270342c7..31da1b1b4 100644 --- a/kittycad/models/point2d.py +++ b/kittycad/models/point2d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -AZ = TypeVar("AZ", bound="Point2d") +NX = TypeVar("NX", bound="Point2d") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class Point2d: return field_dict @classmethod - def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: + def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py index 8a4b0739d..828f12a68 100644 --- a/kittycad/models/point3d.py +++ b/kittycad/models/point3d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -DJ = TypeVar("DJ", bound="Point3d") +SC = TypeVar("SC", bound="Point3d") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Point3d: return field_dict @classmethod - def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: + def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point_e_metadata.py b/kittycad/models/point_e_metadata.py index 586ba3c4f..57a2b1116 100644 --- a/kittycad/models/point_e_metadata.py +++ b/kittycad/models/point_e_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -WJ = TypeVar("WJ", bound="PointEMetadata") +TX = TypeVar("TX", bound="PointEMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class PointEMetadata: return field_dict @classmethod - def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: + def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index f637ea746..33f8c3300 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TR = TypeVar("TR", bound="Pong") +JA = TypeVar("JA", bound="Pong") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Pong: return field_dict @classmethod - def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: + def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: d = src_dict.copy() message = d.pop("message", UNSET) diff --git a/kittycad/models/registry_service_config.py b/kittycad/models/registry_service_config.py index 768c74121..f7e9ac714 100644 --- a/kittycad/models/registry_service_config.py +++ b/kittycad/models/registry_service_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -YD = TypeVar("YD", bound="RegistryServiceConfig") +SK = TypeVar("SK", bound="RegistryServiceConfig") @attr.s(auto_attribs=True) @@ -59,7 +59,7 @@ class RegistryServiceConfig: return field_dict @classmethod - def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: + def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: d = src_dict.copy() allow_nondistributable_artifacts_cid_rs = cast( List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET) diff --git a/kittycad/models/runtime.py b/kittycad/models/runtime.py index fd18432e3..70a4f2e3e 100644 --- a/kittycad/models/runtime.py +++ b/kittycad/models/runtime.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -JF = TypeVar("JF", bound="Runtime") +UK = TypeVar("UK", bound="Runtime") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class Runtime: return field_dict @classmethod - def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: + def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: d = src_dict.copy() path = d.pop("path", UNSET) diff --git a/kittycad/models/scene_selection_type.py b/kittycad/models/scene_selection_type.py new file mode 100644 index 000000000..a4e705295 --- /dev/null +++ b/kittycad/models/scene_selection_type.py @@ -0,0 +1,15 @@ +from enum import Enum + + +class SceneSelectionType(str, Enum): + """The type of scene selection change""" # noqa: E501 + + """# Replaces the selection """ # noqa: E501 + REPLACE = "replace" + """# Adds to the selection """ # noqa: E501 + ADD = "add" + """# Removes from the selection """ # noqa: E501 + REMOVE = "remove" + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/session.py b/kittycad/models/session.py index 79b10ca34..d75cc6100 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -VP = TypeVar("VP", bound="Session") +CX = TypeVar("CX", bound="Session") @attr.s(auto_attribs=True) @@ -58,7 +58,7 @@ class Session: return field_dict @classmethod - def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: + def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/system.py b/kittycad/models/system.py index 0edf3021c..c91e69cc2 100644 --- a/kittycad/models/system.py +++ b/kittycad/models/system.py @@ -5,7 +5,7 @@ import attr from ..models.axis_direction_pair import AxisDirectionPair from ..types import UNSET, Unset -EL = TypeVar("EL", bound="System") +MT = TypeVar("MT", bound="System") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class System: return field_dict @classmethod - def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: + def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: d = src_dict.copy() _forward = d.pop("forward", UNSET) forward: Union[Unset, AxisDirectionPair] diff --git a/kittycad/models/system_info_default_address_pools.py b/kittycad/models/system_info_default_address_pools.py index 3c2c523c1..edacbb771 100644 --- a/kittycad/models/system_info_default_address_pools.py +++ b/kittycad/models/system_info_default_address_pools.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -ZG = TypeVar("ZG", bound="SystemInfoDefaultAddressPools") +LJ = TypeVar("LJ", bound="SystemInfoDefaultAddressPools") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools: return field_dict @classmethod - def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: + def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: d = src_dict.copy() base = d.pop("base", UNSET) diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index 04cc8062b..184a3285d 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_angle import UnitAngle from ..models.uuid import Uuid from ..types import UNSET, Unset -LF = TypeVar("LF", bound="UnitAngleConversion") +TF = TypeVar("TF", bound="UnitAngleConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAngleConversion: return field_dict @classmethod - def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: + def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index 74ecda812..f815f2384 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -CS = TypeVar("CS", bound="UnitAreaConversion") +HF = TypeVar("HF", bound="UnitAreaConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAreaConversion: return field_dict @classmethod - def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: + def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_current_conversion.py b/kittycad/models/unit_current_conversion.py index 890e9ffb7..db62d4d4c 100644 --- a/kittycad/models/unit_current_conversion.py +++ b/kittycad/models/unit_current_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_current import UnitCurrent from ..models.uuid import Uuid from ..types import UNSET, Unset -GN = TypeVar("GN", bound="UnitCurrentConversion") +JD = TypeVar("JD", bound="UnitCurrentConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitCurrentConversion: return field_dict @classmethod - def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: + def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index b387b0813..9143792ff 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_energy import UnitEnergy from ..models.uuid import Uuid from ..types import UNSET, Unset -GD = TypeVar("GD", bound="UnitEnergyConversion") +RZ = TypeVar("RZ", bound="UnitEnergyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitEnergyConversion: return field_dict @classmethod - def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: + def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index 012144cce..269e8298a 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_force import UnitForce from ..models.uuid import Uuid from ..types import UNSET, Unset -VJ = TypeVar("VJ", bound="UnitForceConversion") +BH = TypeVar("BH", bound="UnitForceConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitForceConversion: return field_dict @classmethod - def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: + def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_frequency_conversion.py b/kittycad/models/unit_frequency_conversion.py index 052f05190..27ea8061e 100644 --- a/kittycad/models/unit_frequency_conversion.py +++ b/kittycad/models/unit_frequency_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_frequency import UnitFrequency from ..models.uuid import Uuid from ..types import UNSET, Unset -OX = TypeVar("OX", bound="UnitFrequencyConversion") +SX = TypeVar("SX", bound="UnitFrequencyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitFrequencyConversion: return field_dict @classmethod - def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: + def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index 17aea1408..4cf7c5768 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -YW = TypeVar("YW", bound="UnitLengthConversion") +CN = TypeVar("CN", bound="UnitLengthConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitLengthConversion: return field_dict @classmethod - def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: + def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index bbb2b02ce..e46dff0d8 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -QX = TypeVar("QX", bound="UnitMassConversion") +GS = TypeVar("GS", bound="UnitMassConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitMassConversion: return field_dict @classmethod - def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: + def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index 74c9da84c..137989be2 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_power import UnitPower from ..models.uuid import Uuid from ..types import UNSET, Unset -NO = TypeVar("NO", bound="UnitPowerConversion") +SO = TypeVar("SO", bound="UnitPowerConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPowerConversion: return field_dict @classmethod - def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: + def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index 9b9d6ce39..3d433499d 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_pressure import UnitPressure from ..models.uuid import Uuid from ..types import UNSET, Unset -VX = TypeVar("VX", bound="UnitPressureConversion") +ZS = TypeVar("ZS", bound="UnitPressureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPressureConversion: return field_dict @classmethod - def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: + def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index f90d94394..17bc9de63 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_temperature import UnitTemperature from ..models.uuid import Uuid from ..types import UNSET, Unset -RG = TypeVar("RG", bound="UnitTemperatureConversion") +AM = TypeVar("AM", bound="UnitTemperatureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTemperatureConversion: return field_dict @classmethod - def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: + def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_torque_conversion.py b/kittycad/models/unit_torque_conversion.py index 852fbd8de..115287ad9 100644 --- a/kittycad/models/unit_torque_conversion.py +++ b/kittycad/models/unit_torque_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_torque import UnitTorque from ..models.uuid import Uuid from ..types import UNSET, Unset -IT = TypeVar("IT", bound="UnitTorqueConversion") +GK = TypeVar("GK", bound="UnitTorqueConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTorqueConversion: return field_dict @classmethod - def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: + def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index 9f7070fc3..7c6e16751 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -LD = TypeVar("LD", bound="UnitVolumeConversion") +SG = TypeVar("SG", bound="UnitVolumeConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitVolumeConversion: return field_dict @classmethod - def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: + def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index 3f4a0d004..c82c5686d 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UA = TypeVar("UA", bound="UpdateUser") +QZ = TypeVar("QZ", bound="UpdateUser") @attr.s(auto_attribs=True) @@ -47,7 +47,7 @@ class UpdateUser: return field_dict @classmethod - def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: + def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 9b4440f5f..14f00d4db 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -TN = TypeVar("TN", bound="User") +SY = TypeVar("SY", bound="User") @attr.s(auto_attribs=True) @@ -83,7 +83,7 @@ class User: return field_dict @classmethod - def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: + def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user_results_page.py b/kittycad/models/user_results_page.py index a1aa8b076..496f6d93a 100644 --- a/kittycad/models/user_results_page.py +++ b/kittycad/models/user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -MZ = TypeVar("MZ", bound="UserResultsPage") +YK = TypeVar("YK", bound="UserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class UserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: + def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: d = src_dict.copy() from ..models.user import User diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index a8dcce99d..ca899dbd7 100644 --- a/kittycad/models/verification_token.py +++ b/kittycad/models/verification_token.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -UG = TypeVar("UG", bound="VerificationToken") +WS = TypeVar("WS", bound="VerificationToken") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class VerificationToken: return field_dict @classmethod - def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: + def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/pyproject.toml b/pyproject.toml index 3da4e9acb..4b82a2865 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kittycad" -version = "0.4.5" +version = "0.4.6" description = "A client library for accessing KittyCAD" authors = [] diff --git a/spec.json b/spec.json index c5edcb2b7..65c0300c7 100644 --- a/spec.json +++ b/spec.json @@ -211,6 +211,163 @@ ], "type": "object" }, + "AnnotationLineEnd": { + "description": "Annotation line end type", + "enum": [ + "none", + "arrow" + ], + "type": "string" + }, + "AnnotationLineEndOptions": { + "description": "Options for annotation text", + "properties": { + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationLineEnd" + } + ], + "description": "How to style the end of the annotation line." + }, + "start": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationLineEnd" + } + ], + "description": "How to style the start of the annotation line." + } + }, + "required": [ + "end", + "start" + ], + "type": "object" + }, + "AnnotationOptions": { + "description": "Options for annotations", + "properties": { + "color": { + "allOf": [ + { + "$ref": "#/components/schemas/Color" + } + ], + "description": "Color to render the annotation", + "nullable": true + }, + "line_ends": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationLineEndOptions" + } + ], + "description": "How to style the start and end of the line", + "nullable": true + }, + "line_width": { + "description": "Width of the annotation's line", + "format": "float", + "nullable": true, + "type": "number" + }, + "position": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Position to put the annotation", + "nullable": true + }, + "text": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationTextOptions" + } + ], + "description": "Text displayed on the annotation", + "nullable": true + } + }, + "type": "object" + }, + "AnnotationTextAlignmentX": { + "description": "Horizontal Text aligment", + "enum": [ + "left", + "center", + "right" + ], + "type": "string" + }, + "AnnotationTextAlignmentY": { + "description": "Vertical Text aligment", + "enum": [ + "bottom", + "center", + "top" + ], + "type": "string" + }, + "AnnotationTextOptions": { + "description": "Options for annotation text", + "properties": { + "point_size": { + "description": "Text font's point size", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "text": { + "description": "Text displayed on the annotation", + "type": "string" + }, + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationTextAlignmentX" + } + ], + "description": "Alignment along the X axis" + }, + "y": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationTextAlignmentY" + } + ], + "description": "Alignment along the Y axis" + } + }, + "required": [ + "point_size", + "text", + "x", + "y" + ], + "type": "object" + }, + "AnnotationType": { + "description": "The type of annotation", + "oneOf": [ + { + "description": "2D annotation type (screen or planar space)", + "enum": [ + "t2d" + ], + "type": "string" + }, + { + "description": "3D annotation type", + "enum": [ + "t3d" + ], + "type": "string" + } + ] + }, "ApiCallQueryGroup": { "description": "A response for a query on the API call table that is grouped by something.", "properties": { @@ -772,17 +929,9 @@ "$ref": "#/components/schemas/Point3d" } ], - "deprecated": true, - "description": "The resulting center of mass. This is deprecated and will be removed in a future release. Use `centers_of_mass` instead.", + "description": "The resulting center of mass.", "nullable": true }, - "centers_of_mass": { - "additionalProperties": { - "$ref": "#/components/schemas/Point3d" - }, - "description": "The center of mass for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "completed_at": { "description": "The time and date the API call was completed.", "format": "date-time", @@ -898,20 +1047,11 @@ "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "mass": { - "deprecated": true, - "description": "The resulting mass. This is deprecated and will be removed in a future release, use `masses` instead.", + "description": "The resulting mass.", "format": "double", "nullable": true, "type": "number" }, - "masses": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The mass for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "material_density": { "default": 0.0, "description": "The material density as denoted by the user.", @@ -1063,19 +1203,10 @@ "type": "string" }, "volume": { - "deprecated": true, - "description": "The resulting volume. This is deprecated and will be removed in a future release. Use `volumes` instead.", + "description": "The resulting volume.", "format": "double", "nullable": true, "type": "number" - }, - "volumes": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The volumes for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" } }, "required": [ @@ -1105,17 +1236,8 @@ "title": "DateTime", "type": "string" }, - "densities": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The density for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "density": { - "deprecated": true, - "description": "The resulting density. This is deprecated and will be removed in a future release, use `densities` instead.", + "description": "The resulting density.", "format": "double", "nullable": true, "type": "number" @@ -1268,20 +1390,11 @@ "description": "The status of the API call." }, "surface_area": { - "deprecated": true, - "description": "The resulting surface area. This is deprecated and will be removed in a future release. Use `surface_areas` instead.", + "description": "The resulting surface area.", "format": "double", "nullable": true, "type": "number" }, - "surface_areas": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The surface area for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "type": { "enum": [ "FileSurfaceArea" @@ -1627,6 +1740,38 @@ }, "type": "object" }, + "Color": { + "description": "An RGBA color", + "properties": { + "a": { + "description": "Alpha", + "format": "float", + "type": "number" + }, + "b": { + "description": "Blue", + "format": "float", + "type": "number" + }, + "g": { + "description": "Green", + "format": "float", + "type": "number" + }, + "r": { + "description": "Red", + "format": "float", + "type": "number" + } + }, + "required": [ + "a", + "b", + "g", + "r" + ], + "type": "object" + }, "Commit": { "description": "Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.", "properties": { @@ -5402,6 +5547,20 @@ ], "type": "object" }, + "EntityType": { + "description": "The type of entity", + "enum": [ + "entity", + "object", + "path", + "curve", + "solid2d", + "solid3d", + "edge", + "face" + ], + "type": "string" + }, "Environment": { "description": "The environment the server is running in.", "oneOf": [ @@ -5478,6 +5637,26 @@ ], "type": "object" }, + "ExportFile": { + "description": "A file to be exported to the client.", + "properties": { + "contents": { + "description": "The contents of the file, base64 encoded.", + "format": "byte", + "title": "String", + "type": "string" + }, + "name": { + "description": "The name of the file.", + "type": "string" + } + }, + "required": [ + "contents", + "name" + ], + "type": "object" + }, "ExtendedUser": { "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front", "properties": { @@ -5590,34 +5769,6 @@ ], "type": "object" }, - "Extrude": { - "description": "Command for extruding a solid.", - "properties": { - "cap": { - "description": "Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.", - "type": "boolean" - }, - "distance": { - "description": "How far off the plane to extrude", - "format": "double", - "type": "number" - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "Which sketch to extrude. Must be a closed 2D solid." - } - }, - "required": [ - "cap", - "distance", - "target" - ], - "type": "object" - }, "FileCenterOfMass": { "description": "A file center of mass result.", "properties": { @@ -5627,17 +5778,9 @@ "$ref": "#/components/schemas/Point3d" } ], - "deprecated": true, - "description": "The resulting center of mass. This is deprecated and will be removed in a future release. Use `centers_of_mass` instead.", + "description": "The resulting center of mass.", "nullable": true }, - "centers_of_mass": { - "additionalProperties": { - "$ref": "#/components/schemas/Point3d" - }, - "description": "The center of mass for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "completed_at": { "description": "The time and date the API call was completed.", "format": "date-time", @@ -5848,17 +5991,8 @@ "title": "DateTime", "type": "string" }, - "densities": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The density for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "density": { - "deprecated": true, - "description": "The resulting density. This is deprecated and will be removed in a future release, use `densities` instead.", + "description": "The resulting density.", "format": "double", "nullable": true, "type": "number" @@ -5946,27 +6080,6 @@ "FileExportFormat": { "description": "The valid types of output file formats.", "oneOf": [ - { - "description": "The COLLADA/DAE file format. ", - "enum": [ - "dae" - ], - "type": "string" - }, - { - "description": "The FBX file format. ", - "enum": [ - "fbx" - ], - "type": "string" - }, - { - "description": "The FBX file format (in binary). ", - "enum": [ - "fbxb" - ], - "type": "string" - }, { "description": "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb).", "enum": [ @@ -6007,20 +6120,6 @@ "FileImportFormat": { "description": "The valid types of source file formats.", "oneOf": [ - { - "description": "The COLLADA/DAE file format. ", - "enum": [ - "dae" - ], - "type": "string" - }, - { - "description": "The FBX file format. ", - "enum": [ - "fbx" - ], - "type": "string" - }, { "description": "glTF 2.0.", "enum": [ @@ -6088,20 +6187,11 @@ "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "mass": { - "deprecated": true, - "description": "The resulting mass. This is deprecated and will be removed in a future release, use `masses` instead.", + "description": "The resulting mass.", "format": "double", "nullable": true, "type": "number" }, - "masses": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The mass for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "material_density": { "default": 0.0, "description": "The material density as denoted by the user.", @@ -6230,20 +6320,11 @@ "description": "The status of the API call." }, "surface_area": { - "deprecated": true, - "description": "The resulting surface area. This is deprecated and will be removed in a future release. Use `surface_areas` instead.", + "description": "The resulting surface area.", "format": "double", "nullable": true, "type": "number" }, - "surface_areas": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The surface area for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" - }, "updated_at": { "description": "The time and date the API call was last updated.", "format": "date-time", @@ -6349,19 +6430,10 @@ "type": "string" }, "volume": { - "deprecated": true, - "description": "The resulting volume. This is deprecated and will be removed in a future release. Use `volumes` instead.", + "description": "The resulting volume.", "format": "double", "nullable": true, "type": "number" - }, - "volumes": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The volumes for each mesh in the file. The key of the hash map is the mesh name.", - "type": "object" } }, "required": [ @@ -6452,7 +6524,7 @@ "properties": { "type": { "enum": [ - "Gltf" + "gltf" ], "type": "string" } @@ -6465,23 +6537,14 @@ { "description": "ISO 10303-21 (STEP) format.", "properties": { - "coords": { - "allOf": [ - { - "$ref": "#/components/schemas/System" - } - ], - "description": "Co-ordinate system of input data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html" - }, "type": { "enum": [ - "Step" + "step" ], "type": "string" } }, "required": [ - "coords", "type" ], "type": "object" @@ -6499,7 +6562,7 @@ }, "type": { "enum": [ - "Obj" + "obj" ], "type": "string" }, @@ -6532,7 +6595,7 @@ }, "type": { "enum": [ - "Ply" + "ply" ], "type": "string" }, @@ -6565,7 +6628,7 @@ }, "type": { "enum": [ - "Stl" + "stl" ], "type": "string" }, @@ -7213,358 +7276,986 @@ "oneOf": [ { "description": "Start a path.", - "enum": [ - "StartPath" + "properties": { + "type": { + "enum": [ + "start_path" + ], + "type": "string" + } + }, + "required": [ + "type" ], - "type": "string" + "type": "object" }, { - "additionalProperties": false, "description": "Move the path's \"pen\".", "properties": { - "MovePathPen": { - "properties": { - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command which created the path." - }, - "to": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Where the path's pen should be." + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" } - }, - "required": [ - "path", - "to" ], - "type": "object" + "description": "The ID of the command which created the path." + }, + "to": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the path's pen should be." + }, + "type": { + "enum": [ + "move_path_pen" + ], + "type": "string" } }, "required": [ - "MovePathPen" + "path", + "to", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Extend a path by adding a new segment which starts at the path's \"pen\". If no \"pen\" location has been set before (via `MovePen`), then the pen is at the origin.", "properties": { - "ExtendPath": { - "properties": { - "path": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command which created the path." - }, - "segment": { - "allOf": [ - { - "$ref": "#/components/schemas/PathSegment" - } - ], - "description": "Segment to append to the path. This segment will implicitly begin at the current \"pen\" location." + "path": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" } - }, - "required": [ - "path", - "segment" ], - "type": "object" + "description": "The ID of the command which created the path." + }, + "segment": { + "allOf": [ + { + "$ref": "#/components/schemas/PathSegment" + } + ], + "description": "Segment to append to the path. This segment will implicitly begin at the current \"pen\" location." + }, + "type": { + "enum": [ + "extend_path" + ], + "type": "string" } }, "required": [ - "ExtendPath" + "path", + "segment", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Extrude a 2D solid.", "properties": { - "Extrude": { - "$ref": "#/components/schemas/Extrude" + "cap": { + "description": "Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.", + "type": "boolean" + }, + "distance": { + "description": "How far off the plane to extrude", + "format": "double", + "type": "number" + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelingCmdId" + } + ], + "description": "Which sketch to extrude. Must be a closed 2D solid." + }, + "type": { + "enum": [ + "extrude" + ], + "type": "string" } }, "required": [ - "Extrude" + "cap", + "distance", + "target", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Closes a path, converting it to a 2D solid.", "properties": { - "ClosePath": { - "properties": { - "path_id": { - "description": "Which path to close.", - "format": "uuid", - "type": "string" - } - }, - "required": [ - "path_id" + "path_id": { + "description": "Which path to close.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "close_path" ], - "type": "object" + "type": "string" } }, "required": [ - "ClosePath" + "path_id", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag started.", "properties": { - "CameraDragStart": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The initial mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "type": { + "enum": [ + "camera_drag_start" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The initial mouse position." } }, "required": [ - "CameraDragStart" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag continued.", "properties": { - "CameraDragMove": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "sequence": { - "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", - "format": "uint32", - "minimum": 0, - "nullable": true, - "type": "integer" - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The current mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "sequence": { + "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", + "format": "uint32", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "type": { + "enum": [ + "camera_drag_move" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The current mouse position." } }, "required": [ - "CameraDragMove" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Camera drag ended.", "properties": { - "CameraDragEnd": { - "properties": { - "interaction": { - "allOf": [ - { - "$ref": "#/components/schemas/CameraDragInteractionType" - } - ], - "description": "The type of camera drag interaction." - }, - "window": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "The final mouse position." + "interaction": { + "allOf": [ + { + "$ref": "#/components/schemas/CameraDragInteractionType" } - }, - "required": [ - "interaction", - "window" ], - "type": "object" + "description": "The type of camera drag interaction." + }, + "type": { + "enum": [ + "camera_drag_end" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "The final mouse position." } }, "required": [ - "CameraDragEnd" + "interaction", + "type", + "window" ], "type": "object" }, { - "additionalProperties": false, "description": "Change what the default camera is looking at.", "properties": { - "DefaultCameraLookAt": { - "properties": { - "center": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "What the camera is looking at. Center of the camera's field of vision" - }, - "up": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which way is \"up\", from the camera's point of view." - }, - "vantage": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Where the camera is positioned" + "center": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "center", - "up", - "vantage" ], - "type": "object" + "description": "What the camera is looking at. Center of the camera's field of vision" + }, + "type": { + "enum": [ + "default_camera_look_at" + ], + "type": "string" + }, + "up": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which way is \"up\", from the camera's point of view." + }, + "vantage": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the camera is positioned" } }, "required": [ - "DefaultCameraLookAt" + "center", + "type", + "up", + "vantage" ], "type": "object" }, { - "additionalProperties": false, "description": "Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.", "properties": { - "DefaultCameraEnableSketchMode": { - "properties": { - "distance_to_plane": { - "description": "How far to the sketching plane?", - "format": "float", - "type": "number" - }, - "origin": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "What's the origin of the sketching plane?" - }, - "ortho": { - "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", - "type": "boolean" - }, - "x_axis": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which 3D axis of the scene should be the X axis of the sketching plane?" - }, - "y_axis": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Which 3D axis of the scene should be the Y axis of the sketching plane?" + "animated": { + "description": "Should we animate or snap for the camera transition?", + "type": "boolean" + }, + "distance_to_plane": { + "description": "How far to the sketching plane?", + "format": "float", + "type": "number" + }, + "origin": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "distance_to_plane", - "origin", - "ortho", - "x_axis", - "y_axis" ], - "type": "object" + "description": "What's the origin of the sketching plane?" + }, + "ortho": { + "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", + "type": "boolean" + }, + "type": { + "enum": [ + "default_camera_enable_sketch_mode" + ], + "type": "string" + }, + "x_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which 3D axis of the scene should be the X axis of the sketching plane?" + }, + "y_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Which 3D axis of the scene should be the Y axis of the sketching plane?" } }, "required": [ - "DefaultCameraEnableSketchMode" + "animated", + "distance_to_plane", + "origin", + "ortho", + "type", + "x_axis", + "y_axis" ], "type": "object" }, { "description": "Disable sketch mode, from the default camera.", - "enum": [ - "DefaultCameraDisableSketchMode" - ], - "type": "string" - }, - { - "additionalProperties": false, - "description": "Export the scene to a file.", "properties": { - "Export": { - "properties": { - "format": { - "allOf": [ - { - "$ref": "#/components/schemas/OutputFormat" - } - ], - "description": "The file format to export to." - } - }, - "required": [ - "format" + "type": { + "enum": [ + "default_camera_disable_sketch_mode" ], - "type": "object" + "type": "string" } }, "required": [ - "Export" + "type" + ], + "type": "object" + }, + { + "description": "Export the scene to a file.", + "properties": { + "entity_ids": { + "description": "IDs of the entities to be exported. If this is empty, then all entities are exported.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/OutputFormat" + } + ], + "description": "The file format to export to." + }, + "type": { + "enum": [ + "export" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "format", + "type" + ], + "type": "object" + }, + { + "description": "What is this entity's parent?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_parent_id" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "How many children does the entity have?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_num_children" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "What is the UUID of this entity's n-th child?", + "properties": { + "child_index": { + "description": "Index into the entity's list of children.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_child_uuid" + ], + "type": "string" + } + }, + "required": [ + "child_index", + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "What are all UUIDs of this entity's children?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_all_child_uuids" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "Enter edit mode", + "properties": { + "target": { + "description": "The edit target", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "edit_mode_enter" + ], + "type": "string" + } + }, + "required": [ + "target", + "type" + ], + "type": "object" + }, + { + "description": "Exit edit mode", + "properties": { + "type": { + "enum": [ + "edit_mode_exit" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Modifies the selection by simulating a \"mouse click\" at the given x,y window coordinate Returns ID of whatever was selected.", + "properties": { + "selected_at_window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Where in the window was selected" + }, + "selection_type": { + "allOf": [ + { + "$ref": "#/components/schemas/SceneSelectionType" + } + ], + "description": "What entity was selected?" + }, + "type": { + "enum": [ + "select_with_point" + ], + "type": "string" + } + }, + "required": [ + "selected_at_window", + "selection_type", + "type" + ], + "type": "object" + }, + { + "description": "Clear the selection", + "properties": { + "type": { + "enum": [ + "select_clear" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Adds one or more entities (by UUID) to the selection.", + "properties": { + "entities": { + "description": "Which entities to select", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_add" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Removes one or more entities (by UUID) from the selection.", + "properties": { + "entities": { + "description": "Which entities to unselect", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_remove" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd.", + "properties": { + "entities": { + "description": "Which entities to select", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_replace" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Find all IDs of selected entities", + "properties": { + "type": { + "enum": [ + "select_get" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.", + "properties": { + "selected_at_window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Coordinates of the window being clicked" + }, + "sequence": { + "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", + "format": "uint32", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "type": { + "enum": [ + "highlight_set_entity" + ], + "type": "string" + } + }, + "required": [ + "selected_at_window", + "type" + ], + "type": "object" + }, + { + "description": "Changes the current highlighted entity to these entities.", + "properties": { + "entities": { + "description": "Highlight these entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "highlight_set_entities" + ], + "type": "string" + } + }, + "required": [ + "entities", + "type" + ], + "type": "object" + }, + { + "description": "Create a new annotation", + "properties": { + "annotation_type": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationType" + } + ], + "description": "What type of annotation to create." + }, + "clobber": { + "description": "If true, any existing drawables within the obj will be replaced (the object will be reset)", + "type": "boolean" + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationOptions" + } + ], + "description": "What should the annotation contain?" + }, + "type": { + "enum": [ + "new_annotation" + ], + "type": "string" + } + }, + "required": [ + "annotation_type", + "clobber", + "options", + "type" + ], + "type": "object" + }, + { + "description": "Update an annotation", + "properties": { + "annotation_id": { + "description": "Which annotation to update", + "format": "uuid", + "type": "string" + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/AnnotationOptions" + } + ], + "description": "If any of these fields are set, they will overwrite the previous options for the annotation." + }, + "type": { + "enum": [ + "update_annotation" + ], + "type": "string" + } + }, + "required": [ + "annotation_id", + "options", + "type" + ], + "type": "object" + }, + { + "description": "Hide or show an object", + "properties": { + "hidden": { + "description": "Whether or not the object should be hidden.", + "type": "boolean" + }, + "object_id": { + "description": "Which object to change", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "object_visible" + ], + "type": "string" + } + }, + "required": [ + "hidden", + "object_id", + "type" + ], + "type": "object" + }, + { + "description": "What type of entity is this?", + "properties": { + "entity_id": { + "description": "ID of the entity being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "get_entity_type" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "Gets all faces which use the given edge.", + "properties": { + "edge_id": { + "description": "Which edge you want the faces of.", + "format": "uuid", + "type": "string" + }, + "object_id": { + "description": "Which object is being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_all_edge_faces" + ], + "type": "string" + } + }, + "required": [ + "edge_id", + "object_id", + "type" + ], + "type": "object" + }, + { + "description": "Gets all edges which are opposite the given edge, across all possible faces.", + "properties": { + "along_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "If given, ohnly faces parallel to this vector will be considered.", + "nullable": true + }, + "edge_id": { + "description": "Which edge you want the opposites of.", + "format": "uuid", + "type": "string" + }, + "object_id": { + "description": "Which object is being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_all_opposite_edges" + ], + "type": "string" + } + }, + "required": [ + "edge_id", + "object_id", + "type" + ], + "type": "object" + }, + { + "description": "Gets the edge opposite the given edge, along the given face.", + "properties": { + "edge_id": { + "description": "Which edge you want the opposite of.", + "format": "uuid", + "type": "string" + }, + "face_uuid": { + "description": "Which face is used to figure out the opposite edge?", + "format": "uuid", + "type": "string" + }, + "object_id": { + "description": "Which object is being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_opposite_edge" + ], + "type": "string" + } + }, + "required": [ + "edge_id", + "face_uuid", + "object_id", + "type" + ], + "type": "object" + }, + { + "description": "Gets the next adjacent edge for the given edge, along the given face.", + "properties": { + "edge_id": { + "description": "Which edge you want the opposite of.", + "format": "uuid", + "type": "string" + }, + "face_uuid": { + "description": "Which face is used to figure out the opposite edge?", + "format": "uuid", + "type": "string" + }, + "object_id": { + "description": "Which object is being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_next_adjacent_edge" + ], + "type": "string" + } + }, + "required": [ + "edge_id", + "face_uuid", + "object_id", + "type" + ], + "type": "object" + }, + { + "description": "Gets the previous adjacent edge for the given edge, along the given face.", + "properties": { + "edge_id": { + "description": "Which edge you want the opposite of.", + "format": "uuid", + "type": "string" + }, + "face_uuid": { + "description": "Which face is used to figure out the opposite edge?", + "format": "uuid", + "type": "string" + }, + "object_id": { + "description": "Which object is being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_prev_adjacent_edge" + ], + "type": "string" + } + }, + "required": [ + "edge_id", + "face_uuid", + "object_id", + "type" ], "type": "object" } @@ -7593,16 +8284,11 @@ } ], "description": "ID of command being submitted." - }, - "file_id": { - "description": "ID of the model's file.", - "type": "string" } }, "required": [ "cmd", - "cmd_id", - "file_id" + "cmd_id" ], "type": "object" }, @@ -7615,15 +8301,10 @@ }, "description": "A set of commands to submit to the KittyCAD engine in a batch.", "type": "object" - }, - "file_id": { - "description": "Which file is being drawn in.", - "type": "string" } }, "required": [ - "cmds", - "file_id" + "cmds" ], "type": "object" }, @@ -7662,12 +8343,14 @@ "oneOf": [ { "additionalProperties": false, - "description": "Each successful command has some result. Unfortunately this isn't strongly typed, because the result depends on the command. This means the OpenAPI schema for this won't be very useful.", + "description": "Each successful command has some result.", "properties": { - "Success": {} + "success": { + "$ref": "#/components/schemas/OkModelingCmdResponse" + } }, "required": [ - "Success" + "success" ], "type": "object" }, @@ -7675,12 +8358,12 @@ "additionalProperties": false, "description": "It failed. Why? See 'struct Error' above.", "properties": { - "Error": { + "error": { "$ref": "#/components/schemas/ModelingError" } }, "required": [ - "Error" + "error" ], "type": "object" }, @@ -7688,7 +8371,7 @@ "additionalProperties": false, "description": "Cancelled because it required the output of a previous command, which failed.", "properties": { - "Cancelled": { + "cancelled": { "properties": { "what_failed": { "allOf": [ @@ -7706,7 +8389,7 @@ } }, "required": [ - "Cancelled" + "cancelled" ], "type": "object" } @@ -7800,6 +8483,345 @@ } ] }, + "OkModelingCmdResponse": { + "description": "A successful response from a modeling command. This can be one of several types of responses, depending on the command.", + "oneOf": [ + { + "description": "An empty response, used for any command that does not explicitly have a response defined here.", + "properties": { + "type": { + "enum": [ + "empty" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`.", + "properties": { + "files": { + "description": "The files that were exported.", + "items": { + "$ref": "#/components/schemas/ExportFile" + }, + "type": "array" + }, + "type": { + "enum": [ + "export" + ], + "type": "string" + } + }, + "required": [ + "files", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `SelectWithPoint` command.", + "properties": { + "entity_id": { + "description": "The UUID of the entity that was selected.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "type": { + "enum": [ + "select_with_point" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "The response from the `HighlightSetEntity` command.", + "properties": { + "entity_id": { + "description": "The UUID of the entity that was highlighted.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "sequence": { + "description": "If the client sent a sequence ID with its request, the backend sends it back.", + "format": "uint32", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "type": { + "enum": [ + "highlight_set_entity" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "description": "The response from the `EntityGetChildUuid` command.", + "properties": { + "entity_id": { + "description": "The UUID of the child entity.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_child_uuid" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `EntityGetNumChildren` command.", + "properties": { + "num": { + "description": "The number of children the entity has.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "type": { + "enum": [ + "entity_get_num_children" + ], + "type": "string" + } + }, + "required": [ + "num", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `EntityGetParentId` command.", + "properties": { + "entity_id": { + "description": "The UUID of the parent entity.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "entity_get_parent_id" + ], + "type": "string" + } + }, + "required": [ + "entity_id", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `EntityGetAllChildUuids` command.", + "properties": { + "entity_ids": { + "description": "The UUIDs of the child entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "entity_get_all_child_uuids" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `SelectGet` command.", + "properties": { + "entity_ids": { + "description": "The UUIDs of the selected entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "select_get" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `GetEntityType` command.", + "properties": { + "entity_type": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityType" + } + ], + "description": "The type of the entity." + }, + "type": { + "enum": [ + "get_entity_type" + ], + "type": "string" + } + }, + "required": [ + "entity_type", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Solid3dGetAllEdgeFaces` command.", + "properties": { + "faces": { + "description": "The UUIDs of the faces.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "solid3d_get_all_edge_faces" + ], + "type": "string" + } + }, + "required": [ + "faces", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Solid3dGetAllOppositeEdges` command.", + "properties": { + "edges": { + "description": "The UUIDs of the edges.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "solid3d_get_all_opposite_edges" + ], + "type": "string" + } + }, + "required": [ + "edges", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Solid3dGetOppositeEdge` command.", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_opposite_edge" + ], + "type": "string" + } + }, + "required": [ + "edge", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Solid3dGetPrevAdjacentEdge` command.", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_prev_adjacent_edge" + ], + "type": "string" + } + }, + "required": [ + "edge", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Solid3dGetNextAdjacentEdge` command.", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "solid3d_get_next_adjacent_edge" + ], + "type": "string" + } + }, + "required": [ + "edge", + "type" + ], + "type": "object" + } + ] + }, "Onboarding": { "description": "Onboarding details", "properties": { @@ -7850,7 +8872,7 @@ }, "type": { "enum": [ - "Gltf" + "gltf" ], "type": "string" } @@ -7874,7 +8896,7 @@ }, "type": { "enum": [ - "Obj" + "obj" ], "type": "string" } @@ -7906,7 +8928,7 @@ }, "type": { "enum": [ - "Ply" + "ply" ], "type": "string" } @@ -7931,7 +8953,7 @@ }, "type": { "enum": [ - "Step" + "step" ], "type": "string" } @@ -7963,7 +8985,7 @@ }, "type": { "enum": [ - "Stl" + "stl" ], "type": "string" } @@ -7981,116 +9003,110 @@ "description": "A segment of a path. Paths are composed of many segments.", "oneOf": [ { - "additionalProperties": false, "description": "A straight line segment. Goes from the current path \"pen\" to the given endpoint.", "properties": { - "Line": { - "properties": { - "end": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "End point of the line." + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "end" ], - "type": "object" + "description": "End point of the line." + }, + "type": { + "enum": [ + "line" + ], + "type": "string" } }, "required": [ - "Line" + "end", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "A circular arc segment.", "properties": { - "Arc": { - "properties": { - "angle_end": { - "description": "Start of the arc along circle's perimeter.", - "format": "float", - "type": "number" - }, - "angle_start": { - "description": "Start of the arc along circle's perimeter.", - "format": "float", - "type": "number" - }, - "center": { - "allOf": [ - { - "$ref": "#/components/schemas/Point2d" - } - ], - "description": "Center of the circle" - }, - "radius": { - "description": "Radius of the circle", - "format": "float", - "type": "number" + "angle_end": { + "description": "Start of the arc along circle's perimeter.", + "format": "float", + "type": "number" + }, + "angle_start": { + "description": "Start of the arc along circle's perimeter.", + "format": "float", + "type": "number" + }, + "center": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" } - }, - "required": [ - "angle_end", - "angle_start", - "center", - "radius" ], - "type": "object" + "description": "Center of the circle" + }, + "radius": { + "description": "Radius of the circle", + "format": "float", + "type": "number" + }, + "type": { + "enum": [ + "arc" + ], + "type": "string" } }, "required": [ - "Arc" + "angle_end", + "angle_start", + "center", + "radius", + "type" ], "type": "object" }, { - "additionalProperties": false, "description": "A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.", "properties": { - "Bezier": { - "properties": { - "control1": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "First control point." - }, - "control2": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Second control point." - }, - "end": { - "allOf": [ - { - "$ref": "#/components/schemas/Point3d" - } - ], - "description": "Final control point." + "control1": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } - }, - "required": [ - "control1", - "control2", - "end" ], - "type": "object" + "description": "First control point." + }, + "control2": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Second control point." + }, + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Final control point." + }, + "type": { + "enum": [ + "bezier" + ], + "type": "string" } }, "required": [ - "Bezier" + "control1", + "control2", + "end", + "type" ], "type": "object" } @@ -8192,320 +9208,6 @@ } ] }, - "PhysicsConstant": { - "description": "A physics constant.", - "properties": { - "completed_at": { - "description": "The time and date the API call was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "constant": { - "allOf": [ - { - "$ref": "#/components/schemas/PhysicsConstantName" - } - ], - "description": "The constant we are returning." - }, - "created_at": { - "description": "The time and date the API call was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." - }, - "started_at": { - "description": "The time and date the API call was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the API call." - }, - "updated_at": { - "description": "The time and date the API call was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the API call.", - "type": "string" - }, - "value": { - "description": "The resulting value of the constant.", - "format": "double", - "nullable": true, - "type": "number" - } - }, - "required": [ - "constant", - "created_at", - "id", - "status", - "updated_at" - ], - "type": "object" - }, - "PhysicsConstantName": { - "description": "The valid types of phys constant names.", - "oneOf": [ - { - "description": "pi - Ratio of a circle's circumference to its diameter. ", - "enum": [ - "pi" - ], - "type": "string" - }, - { - "description": "c - Speed of light in vacuum. ", - "enum": [ - "c" - ], - "type": "string" - }, - { - "description": "Speed of light in a vacuum. ", - "enum": [ - "speed_of_light" - ], - "type": "string" - }, - { - "description": "G - Newtonian constant of gravitation. ", - "enum": [ - "G" - ], - "type": "string" - }, - { - "description": "Newtonian constant of gravitation. ", - "enum": [ - "newtonian_gravitation" - ], - "type": "string" - }, - { - "description": "h - Planck constant. ", - "enum": [ - "h" - ], - "type": "string" - }, - { - "description": "Planck constant. ", - "enum": [ - "planck_const" - ], - "type": "string" - }, - { - "description": "mu_0 - vacuum permeability. ", - "enum": [ - "mu_0" - ], - "type": "string" - }, - { - "description": "vacuum permeability. ", - "enum": [ - "vacuum_permeability" - ], - "type": "string" - }, - { - "description": "ε_0 - vacuum permitivity. ", - "enum": [ - "E_0" - ], - "type": "string" - }, - { - "description": "vacuum permitivity. ]", - "enum": [ - "vacuum_permitivity" - ], - "type": "string" - }, - { - "description": "Z_0 - characteristic impedance of vacuum. ", - "enum": [ - "Z_0" - ], - "type": "string" - }, - { - "description": "characteristic impedance of vacuum. ", - "enum": [ - "vacuum_impedance" - ], - "type": "string" - }, - { - "description": "k_e - Coulomb's constant. ", - "enum": [ - "k_e" - ], - "type": "string" - }, - { - "description": "Coulomb's constant. ", - "enum": [ - "coulomb_const" - ], - "type": "string" - }, - { - "description": "e - elementary charge. ", - "enum": [ - "e" - ], - "type": "string" - }, - { - "description": "elementary charge. ", - "enum": [ - "elementary_charge" - ], - "type": "string" - }, - { - "description": "m_e - electron mass. ", - "enum": [ - "m_e" - ], - "type": "string" - }, - { - "description": "electron mass. ", - "enum": [ - "electron_mass" - ], - "type": "string" - }, - { - "description": "m_p - proton mass. ", - "enum": [ - "m_p" - ], - "type": "string" - }, - { - "description": "proton mass. ", - "enum": [ - "proton_mass" - ], - "type": "string" - }, - { - "description": "mu_B - Bohr magneton. ", - "enum": [ - "mu_B" - ], - "type": "string" - }, - { - "description": "Bohr magneton. ", - "enum": [ - "bohr_magneton" - ], - "type": "string" - }, - { - "description": "NA - Avogadro's Number. ", - "enum": [ - "NA" - ], - "type": "string" - }, - { - "description": "Avogadro's Number. ", - "enum": [ - "avogadro_num" - ], - "type": "string" - }, - { - "description": "R - Molar Gas constant. ", - "enum": [ - "R" - ], - "type": "string" - }, - { - "description": "Molar Gas constant. ", - "enum": [ - "molar_gas_const" - ], - "type": "string" - }, - { - "description": "K_B - Boltzmann constant. ", - "enum": [ - "K_B" - ], - "type": "string" - }, - { - "description": "Boltzmann constant. ", - "enum": [ - "boltzmann_const" - ], - "type": "string" - }, - { - "description": "F - Faraday constant. ", - "enum": [ - "F" - ], - "type": "string" - }, - { - "description": "Faraday constant. ", - "enum": [ - "faraday_const" - ], - "type": "string" - }, - { - "description": "Sigma - Stefan-Boltzmann constant. ", - "enum": [ - "sigma" - ], - "type": "string" - }, - { - "description": "Stefan-Boltzmann constant. ", - "enum": [ - "stefan_boltzmann_const" - ], - "type": "string" - } - ] - }, "PluginsInfo": { "description": "Available plugins per type.\n\n**Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \\\"lazily\\\" loaded, and are not returned in this list if there is no resource using the plugin.", "properties": { @@ -8665,6 +9367,32 @@ }, "type": "object" }, + "SceneSelectionType": { + "description": "The type of scene selection change", + "oneOf": [ + { + "description": "Replaces the selection", + "enum": [ + "replace" + ], + "type": "string" + }, + { + "description": "Adds to the selection", + "enum": [ + "add" + ], + "type": "string" + }, + { + "description": "Removes from the selection", + "enum": [ + "remove" + ], + "type": "string" + } + ] + }, "Session": { "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", "properties": { @@ -12181,79 +12909,6 @@ ] } }, - "/constant/physics/{constant}": { - "get": { - "operationId": "get_physics_constant", - "parameters": [ - { - "description": "The constant to get.", - "in": "path", - "name": "constant", - "required": true, - "schema": { - "$ref": "#/components/schemas/PhysicsConstantName" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhysicsConstant" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a physics constant.", - "tags": [ - "constant", - "hidden" - ] - } - }, "/file/center-of-mass": { "options": { "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", @@ -12309,7 +12964,7 @@ ] }, "post": { - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint returns the cartesian co-ordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cartesian co-ordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_center_of_mass", "parameters": [ { @@ -12622,7 +13277,7 @@ ] }, "post": { - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_density", "parameters": [ { @@ -12943,7 +13598,7 @@ ] }, "post": { - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_mass", "parameters": [ { @@ -13107,7 +13762,7 @@ ] }, "post": { - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint returns the square measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the square measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_surface_area", "parameters": [ { @@ -13254,7 +13909,7 @@ ] }, "post": { - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nCurrently, this endpoint returns the cubic measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cubic measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", "operationId": "create_file_volume", "parameters": [ { @@ -17907,6 +18562,46 @@ "get": { "description": "Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.", "operationId": "modeling_commands_ws", + "parameters": [ + { + "description": "Frames per second of the video feed.", + "in": "query", + "name": "fps", + "schema": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + { + "description": "If true, engine will render video frames as fast as it can.", + "in": "query", + "name": "unlocked_framerate", + "schema": { + "type": "boolean" + } + }, + { + "description": "Height of the video feed. Must be a multiple of 4.", + "in": "query", + "name": "video_res_height", + "schema": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + { + "description": "Width of the video feed. Must be a multiple of 4.", + "in": "query", + "name": "video_res_width", + "schema": { + "format": "uint32", + "minimum": 0, + "type": "integer" + } + } + ], "responses": { "default": { "content": {