From 9bc8c33a3294c3a07e90d17fa31c3abb4b4ac5bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Jan 2023 18:57:00 +0000 Subject: [PATCH 1/3] YOYO NEW API SPEC! --- spec.json | 4848 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 3160 insertions(+), 1688 deletions(-) diff --git a/spec.json b/spec.json index b0e3c615..d4445456 100644 --- a/spec.json +++ b/spec.json @@ -390,14 +390,14 @@ "description": "A file conversion.", "properties": { "completed_at": { - "description": "The time and date the file conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the file conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -413,7 +413,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "output": { "description": "The converted file, if completed, base64 encoded.", @@ -425,7 +425,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/FileOutputFormat" + "$ref": "#/components/schemas/FileExportFormat" } ], "description": "The output format of the file conversion." @@ -433,13 +433,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/FileImportFormat" } ], "description": "The source format of the file conversion." }, "started_at": { - "description": "The time and date the file conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -451,7 +451,7 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the file conversion." + "description": "The status of the API call." }, "type": { "enum": [ @@ -460,13 +460,203 @@ "type": "string" }, "updated_at": { - "description": "The time and date the file conversion was last updated.", + "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 file conversion.", + "description": "The user ID of the user who created the API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "A 2DVectorfile conversion.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "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." + }, + "output": { + "description": "The converted file, if completed, base64 encoded.", + "format": "byte", + "nullable": true, + "title": "String", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File2DVectorExportFormat" + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File2DVectorImportFormat" + } + ], + "description": "The source format of the file conversion." + }, + "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." + }, + "type": { + "enum": [ + "File2DVectorConversion" + ], + "type": "string" + }, + "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" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "A 3D file conversion.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "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." + }, + "output": { + "description": "The converted file, if completed, base64 encoded.", + "format": "byte", + "nullable": true, + "title": "String", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File3DExportFormat" + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File3DImportFormat" + } + ], + "description": "The source format of the file conversion." + }, + "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." + }, + "type": { + "enum": [ + "File3DConversion" + ], + "type": "string" + }, + "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" } }, @@ -494,14 +684,14 @@ "type": "array" }, "completed_at": { - "description": "The time and date the mass was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the mass was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -517,7 +707,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the center of mass request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "material_density": { "default": 0.0, @@ -528,13 +718,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the mass was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -546,7 +736,7 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the mass." + "description": "The status of the API call." }, "type": { "enum": [ @@ -555,13 +745,101 @@ "type": "string" }, "updated_at": { - "description": "The time and date the mass was last updated.", + "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" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ], + "type": "object" + }, + { + "description": "File center of mass.", + "properties": { + "center_of_mass": { + "description": "The resulting center of mass.", + "items": { + "format": "double", + "type": "number" + }, + "nullable": true, + "type": "array" + }, + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "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." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File3DImportFormat" + } + ], + "description": "The source format of the file." + }, + "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." + }, + "type": { + "enum": [ + "FileCenterOfMassWithUniformDensity" + ], + "type": "string" + }, + "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 mass.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -579,14 +857,14 @@ "description": "A file mass.", "properties": { "completed_at": { - "description": "The time and date the mass was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the mass was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -602,7 +880,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "mass": { "description": "The resulting mass.", @@ -619,13 +897,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the mass was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -637,7 +915,7 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the mass." + "description": "The status of the API call." }, "type": { "enum": [ @@ -646,13 +924,13 @@ "type": "string" }, "updated_at": { - "description": "The time and date the mass was last updated.", + "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 mass.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -670,14 +948,14 @@ "description": "A file volume.", "properties": { "completed_at": { - "description": "The time and date the volume was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the volume was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -693,18 +971,18 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the volume was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -716,7 +994,7 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the volume." + "description": "The status of the API call." }, "type": { "enum": [ @@ -725,13 +1003,13 @@ "type": "string" }, "updated_at": { - "description": "The time and date the volume was last updated.", + "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 volume.", + "description": "The user ID of the user who created the API call.", "type": "string" }, "volume": { @@ -755,14 +1033,14 @@ "description": "A file density.", "properties": { "completed_at": { - "description": "The time and date the density was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the density was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -784,7 +1062,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "material_mass": { "default": 0.0, @@ -795,13 +1073,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the density was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -813,7 +1091,7 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the density." + "description": "The status of the API call." }, "type": { "enum": [ @@ -822,13 +1100,13 @@ "type": "string" }, "updated_at": { - "description": "The time and date the density was last updated.", + "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 density.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -846,14 +1124,14 @@ "description": "A file surface area.", "properties": { "completed_at": { - "description": "The time and date the density was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the density was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -869,18 +1147,18 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the density was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -892,7 +1170,7 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the density." + "description": "The status of the API call." }, "surface_area": { "description": "The resulting surface area.", @@ -907,13 +1185,13 @@ "type": "string" }, "updated_at": { - "description": "The time and date the density was last updated.", + "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 density.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -954,8 +1232,11 @@ "description": "The type of async API call.", "enum": [ "FileConversion", + "File2DVectorConversion", + "File3DConversion", "FileVolume", "FileCenterOfMass", + "FileCenterOfMassWithUniformDensity", "FileMass", "FileDensity", "FileSurfaceArea" @@ -1053,7 +1334,6 @@ "properties": { "addr": { "description": "The IP address of the cluster.", - "format": "ip", "nullable": true, "type": "string" }, @@ -2301,7 +2581,7 @@ "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 Zendesk.", + "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": { "company": { "description": "The user's company.", @@ -2333,6 +2613,11 @@ "description": "The user's first name.", "type": "string" }, + "front_id": { + "description": "The user's Front ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, "github": { "description": "The user's GitHub handle.", "type": "string" @@ -2377,11 +2662,6 @@ "format": "date-time", "title": "DateTime", "type": "string" - }, - "zendesk_id": { - "description": "The user's Zendesk ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" } }, "required": [ @@ -2412,27 +2692,18 @@ ], "type": "object" }, - "FileCenterOfMass": { - "description": "A file center of mass result.", + "File2DVectorConversion": { + "description": "A 2D Vector file conversion.", "properties": { - "center_of_mass": { - "description": "The resulting center of mass.", - "items": { - "format": "double", - "type": "number" - }, - "nullable": true, - "type": "array" - }, "completed_at": { - "description": "The time and date the mass was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the mass was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -2448,24 +2719,33 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the center of mass request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, - "material_density": { - "default": 0.0, - "description": "The material density as denoted by the user.", - "format": "float", - "type": "number" + "output": { + "description": "The converted file, if completed, base64 encoded.", + "format": "byte", + "nullable": true, + "title": "String", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File2DVectorExportFormat" + } + ], + "description": "The output format of the file conversion." }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File2DVectorImportFormat" } ], - "description": "The source format of the file." + "description": "The source format of the file conversion." }, "started_at": { - "description": "The time and date the mass was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -2477,40 +2757,60 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the mass." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the mass was last updated.", + "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 mass.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, "required": [ "created_at", "id", + "output_format", "src_format", "status", "updated_at" ], "type": "object" }, - "FileConversion": { - "description": "A file conversion.", + "File2DVectorExportFormat": { + "description": "The valid types of Vector output file formats.", + "enum": [ + "dxf", + "json", + "png", + "ps", + "svg" + ], + "type": "string" + }, + "File2DVectorImportFormat": { + "description": "The valid types of Vector source file formats.", + "enum": [ + "dxf", + "svg" + ], + "type": "string" + }, + "File3DConversion": { + "description": "A 3D file conversion.", "properties": { "completed_at": { - "description": "The time and date the file conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the file conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -2526,7 +2826,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "output": { "description": "The converted file, if completed, base64 encoded.", @@ -2538,7 +2838,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/FileOutputFormat" + "$ref": "#/components/schemas/File3DExportFormat" } ], "description": "The output format of the file conversion." @@ -2546,13 +2846,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file conversion." }, "started_at": { - "description": "The time and date the file conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -2564,16 +2864,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the file conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the file conversion was last updated.", + "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 file conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -2587,28 +2887,60 @@ ], "type": "object" }, - "FileDensity": { - "description": "A file density result.", + "File3DExportFormat": { + "description": "The valid types of 3d output file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file.", + "enum": [ + "dae", + "fbx", + "fbxb", + "obj", + "obj_nomtl", + "ply", + "step", + "stl" + ], + "type": "string" + }, + "File3DImportFormat": { + "description": "The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file.", + "enum": [ + "dae", + "dxf", + "fbx", + "obj_zip", + "obj", + "obj_nomtl", + "ply", + "step", + "stl" + ], + "type": "string" + }, + "FileCenterOfMass": { + "description": "A file center of mass result.", "properties": { + "center_of_mass": { + "description": "The resulting center of mass.", + "items": { + "format": "double", + "type": "number" + }, + "nullable": true, + "type": "array" + }, "completed_at": { - "description": "The time and date the density was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the density was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" }, - "density": { - "description": "The resulting density.", - "format": "double", - "nullable": true, - "type": "number" - }, "error": { "description": "The error the function returned, if any.", "nullable": true, @@ -2620,24 +2952,24 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, - "material_mass": { + "material_density": { "default": 0.0, - "description": "The material mass as denoted by the user.", + "description": "The material density as denoted by the user.", "format": "float", "type": "number" }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the density was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -2649,16 +2981,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the density." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the density was last updated.", + "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 density.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -2671,18 +3003,27 @@ ], "type": "object" }, - "FileMass": { - "description": "A file mass result.", + "FileCenterOfMassWithUniformDensity": { + "description": "A file center of mass result.", "properties": { + "center_of_mass": { + "description": "The resulting center of mass.", + "items": { + "format": "double", + "type": "number" + }, + "nullable": true, + "type": "array" + }, "completed_at": { - "description": "The time and date the mass was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the mass was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -2698,30 +3039,18 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID." - }, - "mass": { - "description": "The resulting mass.", - "format": "double", - "nullable": true, - "type": "number" - }, - "material_density": { - "default": 0.0, - "description": "The material density as denoted by the user.", - "format": "float", - "type": "number" + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the mass was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -2733,16 +3062,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the mass." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the mass was last updated.", + "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 mass.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -2755,41 +3084,18 @@ ], "type": "object" }, - "FileOutputFormat": { - "description": "The valid types of output file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx", - "fbxb" - ], - "type": "string" - }, - "FileSourceFormat": { - "description": "The valid types of source file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx" - ], - "type": "string" - }, - "FileSurfaceArea": { - "description": "A file surface area result.", + "FileConversion": { + "description": "A file conversion.", "properties": { "completed_at": { - "description": "The time and date the density was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the density was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -2805,18 +3111,33 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." + }, + "output": { + "description": "The converted file, if completed, base64 encoded.", + "format": "byte", + "nullable": true, + "title": "String", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileExportFormat" + } + ], + "description": "The output format of the file conversion." }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/FileImportFormat" } ], - "description": "The source format of the file." + "description": "The source format of the file conversion." }, "started_at": { - "description": "The time and date the density was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -2828,63 +3149,51 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the density." - }, - "surface_area": { - "description": "The resulting surface area.", - "format": "double", - "nullable": true, - "type": "number" + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the density was last updated.", + "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 density.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, "required": [ "created_at", "id", + "output_format", "src_format", "status", "updated_at" ], "type": "object" }, - "FileSystemMetadata": { - "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "ok": { - "description": "If the file system passed a sanity check.", - "type": "boolean" - } - }, - "required": [ - "ok" - ], - "type": "object" - }, - "FileVolume": { - "description": "A file volume result.", + "FileDensity": { + "description": "A file density result.", "properties": { "completed_at": { - "description": "The time and date the volume was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the volume was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" }, + "density": { + "description": "The resulting density.", + "format": "double", + "nullable": true, + "type": "number" + }, "error": { "description": "The error the function returned, if any.", "nullable": true, @@ -2896,18 +3205,24 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." + }, + "material_mass": { + "default": 0.0, + "description": "The material mass as denoted by the user.", + "format": "float", + "type": "number" }, "src_format": { "allOf": [ { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" } ], "description": "The source format of the file." }, "started_at": { - "description": "The time and date the volume was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -2919,23 +3234,17 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the volume." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the volume was last updated.", + "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 volume.", + "description": "The user ID of the user who created the API call.", "type": "string" - }, - "volume": { - "description": "The resulting volume.", - "format": "double", - "nullable": true, - "type": "number" } }, "required": [ @@ -2947,1161 +3256,1089 @@ ], "type": "object" }, - "Gateway": { - "description": "Gateway information.", + "FileExportFormat": { + "description": "The valid types of output file formats.", + "enum": [ + "dae", + "dxf", + "fbx", + "fbxb", + "json", + "obj", + "obj_nomtl", + "ply", + "step", + "stl", + "svg" + ], + "type": "string" + }, + "FileImportFormat": { + "description": "The valid types of source file formats.", + "enum": [ + "dae", + "dxf", + "fbx", + "obj_zip", + "obj", + "obj_nomtl", + "ply", + "step", + "stl", + "svg" + ], + "type": "string" + }, + "FileMass": { + "description": "A file mass result.", "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the gateway.", - "format": "int64", - "type": "integer" - }, - "host": { - "default": "", - "description": "The host of the gateway.", + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", "type": "string" }, - "name": { - "default": "", - "description": "The name of the gateway.", + "created_at": { + "description": "The time and date the API call was created.", + "format": "date-time", + "title": "DateTime", "type": "string" }, - "port": { - "default": 0, - "description": "The port of the gateway.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the gateway.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "IndexInfo": { - "description": "IndexInfo contains information about a registry.", - "properties": { - "mirrors": { - "description": "List of mirrors, expressed as URIs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Name of the registry, such as \\\"docker.io\\\".", + "error": { + "description": "The error the function returned, if any.", "nullable": true, "type": "string" }, - "official": { - "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", - "nullable": true, - "type": "boolean" + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, - "secure": { - "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "mass": { + "description": "The resulting mass.", + "format": "double", "nullable": true, - "type": "boolean" - } - }, - "type": "object" - }, - "Invoice": { - "description": "An invoice.", - "properties": { - "amount_due": { - "default": 0.0, - "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", - "format": "money-usd", - "title": "Number", - "type": "number" - }, - "amount_paid": { - "default": 0.0, - "description": "The amount, in USD, that was paid.", - "format": "money-usd", - "title": "Number", "type": "number" }, - "amount_remaining": { + "material_density": { "default": 0.0, - "description": "The amount remaining, in USD, that is due.", - "format": "money-usd", - "title": "Number", + "description": "The material density as denoted by the user.", + "format": "float", "type": "number" }, - "attempt_count": { - "default": 0, - "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "attempted": { - "default": false, - "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", - "type": "boolean" + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File3DImportFormat" + } + ], + "description": "The source format of the file." }, - "created_at": { - "description": "Time at which the object was created.", + "started_at": { + "description": "The time and date the API call was started.", "format": "date-time", + "nullable": true, + "title": "DateTime", "type": "string" }, - "currency": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/Currency" + "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." + "description": "The status of the API call." }, - "customer_email": { - "description": "The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.", - "format": "email", + "updated_at": { + "description": "The time and date the API call was last updated.", + "format": "date-time", + "title": "DateTime", "type": "string" }, - "customer_id": { - "description": "Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.", + "user_id": { + "description": "The user ID of the user who created the API call.", "type": "string" - }, - "default_payment_method": { - "description": "Default payment method.", + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileSurfaceArea": { + "description": "A file surface area result.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", "type": "string" }, - "description": { - "description": "Description of the invoice.", + "created_at": { + "description": "The time and date the API call was created.", + "format": "date-time", + "title": "DateTime", "type": "string" }, - "id": { - "description": "Unique identifier for the object.", + "error": { + "description": "The error the function returned, if any.", + "nullable": true, "type": "string" }, - "lines": { - "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", - "items": { - "$ref": "#/components/schemas/InvoiceLineItem" - }, - "type": "array" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" - }, - "number": { - "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", - "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." }, - "paid": { - "default": false, - "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", - "type": "boolean" + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File3DImportFormat" + } + ], + "description": "The source format of the file." }, - "pdf": { - "description": "The link to download the PDF for the invoice.", - "format": "uri", + "started_at": { + "description": "The time and date the API call was started.", + "format": "date-time", "nullable": true, - "type": "string" - }, - "receipt_number": { - "description": "This is the transaction number that appears on email receipts sent for this invoice.", - "type": "string" - }, - "statement_descriptor": { - "description": "Extra information about an invoice for the customer's credit card statement.", + "title": "DateTime", "type": "string" }, "status": { "allOf": [ { - "$ref": "#/components/schemas/InvoiceStatus" + "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", - "nullable": true - }, - "subtotal": { - "default": 0.0, - "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", - "format": "money-usd", - "title": "Number", - "type": "number" + "description": "The status of the API call." }, - "tax": { - "default": 0.0, - "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", - "format": "money-usd", - "title": "Number", + "surface_area": { + "description": "The resulting surface area.", + "format": "double", + "nullable": true, "type": "number" }, - "total": { - "default": 0.0, - "description": "Total after discounts and taxes.", - "format": "money-usd", - "title": "Number", - "type": "number" + "updated_at": { + "description": "The time and date the API call was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" }, - "url": { - "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", - "format": "uri", - "nullable": true, + "user_id": { + "description": "The user ID of the user who created the API call.", "type": "string" } }, "required": [ "created_at", - "currency" + "id", + "src_format", + "status", + "updated_at" ], "type": "object" }, - "InvoiceLineItem": { - "description": "An invoice line item.", + "FileSystemMetadata": { + "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", "properties": { - "amount": { - "default": 0.0, - "description": "The amount, in USD.", - "format": "money-usd", - "title": "Number", - "type": "number" + "ok": { + "description": "If the file system passed a sanity check.", + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "type": "object" + }, + "FileVolume": { + "description": "A file volume result.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" }, - "currency": { + "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/Currency" + "$ref": "#/components/schemas/Uuid" } ], - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, - "description": { - "description": "The description.", - "type": "string" + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/File3DImportFormat" + } + ], + "description": "The source format of the file." }, - "id": { - "description": "Unique identifier for the object.", + "started_at": { + "description": "The time and date the API call was started.", + "format": "date-time", + "nullable": true, + "title": "DateTime", "type": "string" }, - "invoice_item": { - "description": "The ID of the invoice item associated with this line item if any.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", - "type": "object" - } - }, - "required": [ - "currency" - ], - "type": "object" - }, - "InvoiceStatus": { - "description": "An enum representing the possible values of an `Invoice`'s `status` field.", - "enum": [ - "deleted", - "draft", - "open", - "paid", - "uncollectible", - "void" - ], - "type": "string" - }, - "Jetstream": { - "description": "Jetstream information.", - "properties": { - "config": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/JetstreamConfig" + "$ref": "#/components/schemas/ApiCallStatus" } ], - "default": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" - }, - "description": "The Jetstream config." + "description": "The status of the API call." }, - "meta": { - "allOf": [ - { - "$ref": "#/components/schemas/MetaClusterInfo" - } - ], - "default": { - "cluster_size": 0, - "leader": "", - "name": "" - }, - "description": "Meta information about the cluster." + "updated_at": { + "description": "The time and date the API call was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" }, - "stats": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamStats" - } - ], - "default": { - "accounts": 0, - "api": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "ha_assets": 0, - "memory": 0, - "reserved_memory": 0, - "reserved_store": 0, - "store": 0 - }, - "description": "Jetstream statistics." + "user_id": { + "description": "The user ID of the user who created the API call.", + "type": "string" + }, + "volume": { + "description": "The resulting volume.", + "format": "double", + "nullable": true, + "type": "number" } }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ], "type": "object" }, - "JetstreamApiStats": { - "description": "Jetstream API statistics.", + "Gateway": { + "description": "Gateway information.", "properties": { - "errors": { + "auth_timeout": { "default": 0, - "description": "The number of errors.", + "description": "The auth timeout of the gateway.", "format": "int64", "type": "integer" }, - "inflight": { + "host": { + "default": "", + "description": "The host of the gateway.", + "type": "string" + }, + "name": { + "default": "", + "description": "The name of the gateway.", + "type": "string" + }, + "port": { "default": 0, - "description": "The number of inflight requests.", + "description": "The port of the gateway.", "format": "int64", "type": "integer" }, - "total": { + "tls_timeout": { "default": 0, - "description": "The number of requests.", + "description": "The TLS timeout for the gateway.", "format": "int64", "type": "integer" } }, "type": "object" }, - "JetstreamConfig": { - "description": "Jetstream configuration.", + "ImageType": { + "description": "An enumeration.", + "enum": [ + "png", + "jpg" + ], + "type": "string" + }, + "IndexInfo": { + "description": "IndexInfo contains information about a registry.", "properties": { - "domain": { - "default": "", - "description": "The domain.", - "type": "string" + "mirrors": { + "description": "List of mirrors, expressed as URIs.", + "items": { + "type": "string" + }, + "type": "array" }, - "max_memory": { - "default": 0, - "description": "The max memory.", - "format": "int64", - "type": "integer" + "name": { + "description": "Name of the registry, such as \\\"docker.io\\\".", + "nullable": true, + "type": "string" }, - "max_storage": { - "default": 0, - "description": "The max storage.", - "format": "int64", - "type": "integer" + "official": { + "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", + "nullable": true, + "type": "boolean" }, - "store_dir": { - "default": "", - "description": "The store directory.", - "type": "string" + "secure": { + "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "nullable": true, + "type": "boolean" } }, "type": "object" }, - "JetstreamStats": { - "description": "Jetstream statistics.", + "Invoice": { + "description": "An invoice.", "properties": { - "accounts": { + "amount_due": { + "default": 0.0, + "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "amount_paid": { + "default": 0.0, + "description": "The amount, in USD, that was paid.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "amount_remaining": { + "default": 0.0, + "description": "The amount remaining, in USD, that is due.", + "format": "money-usd", + "title": "Number", + "type": "number" + }, + "attempt_count": { "default": 0, - "description": "The number of accounts.", - "format": "int64", + "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", + "format": "uint64", + "minimum": 0, "type": "integer" }, - "api": { + "attempted": { + "default": false, + "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", + "type": "boolean" + }, + "created_at": { + "description": "Time at which the object was created.", + "format": "date-time", + "type": "string" + }, + "currency": { "allOf": [ { - "$ref": "#/components/schemas/JetstreamApiStats" + "$ref": "#/components/schemas/Currency" } ], - "default": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "description": "API stats." + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." }, - "ha_assets": { - "default": 0, - "description": "The number of HA assets.", - "format": "int64", - "type": "integer" + "customer_email": { + "description": "The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.", + "format": "email", + "type": "string" }, - "memory": { - "default": 0, - "description": "The memory used by the Jetstream server.", - "format": "int64", - "type": "integer" + "customer_id": { + "description": "Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.", + "type": "string" }, - "reserved_memory": { - "default": 0, - "description": "The reserved memory for the Jetstream server.", - "format": "int64", - "type": "integer" + "default_payment_method": { + "description": "Default payment method.", + "type": "string" }, - "reserved_store": { - "default": 0, - "description": "The reserved storage for the Jetstream server.", - "format": "int64", - "type": "integer" + "description": { + "description": "Description of the invoice.", + "type": "string" }, - "store": { - "default": 0, - "description": "The storage used by the Jetstream server.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "LeafNode": { - "description": "Leaf node information.", - "properties": { - "auth_timeout": { - "default": 0, - "description": "The auth timeout of the leaf node.", - "format": "int64", - "type": "integer" + "id": { + "description": "Unique identifier for the object.", + "type": "string" }, - "host": { - "default": "", - "description": "The host of the leaf node.", + "lines": { + "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", + "items": { + "$ref": "#/components/schemas/InvoiceLineItem" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "number": { + "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", "type": "string" }, - "port": { - "default": 0, - "description": "The port of the leaf node.", - "format": "int64", - "type": "integer" + "paid": { + "default": false, + "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "type": "boolean" }, - "tls_timeout": { - "default": 0, - "description": "The TLS timeout for the leaf node.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "MetaClusterInfo": { - "description": "Jetstream statistics.", - "properties": { - "cluster_size": { - "default": 0, - "description": "The size of the cluster.", - "format": "int64", - "type": "integer" + "pdf": { + "description": "The link to download the PDF for the invoice.", + "format": "uri", + "nullable": true, + "type": "string" }, - "leader": { - "default": "", - "description": "The leader of the cluster.", + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", "type": "string" }, - "name": { - "default": "", - "description": "The name of the cluster.", + "statement_descriptor": { + "description": "Extra information about an invoice for the customer's credit card statement.", "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "cache": { - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ], - "description": "Metadata about our cache." }, - "engine": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/EngineMetadata" + "$ref": "#/components/schemas/InvoiceStatus" } ], - "description": "Metadata about our engine API connection." + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", + "nullable": true }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." + "subtotal": { + "default": 0.0, + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", + "format": "money-usd", + "title": "Number", + "type": "number" }, - "executor": { - "allOf": [ - { - "$ref": "#/components/schemas/ExecutorMetadata" - } - ], - "description": "Metadata about our executor API connection." + "tax": { + "default": 0.0, + "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", + "format": "money-usd", + "title": "Number", + "type": "number" }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." + "total": { + "default": 0.0, + "description": "Total after discounts and taxes.", + "format": "money-usd", + "title": "Number", + "type": "number" }, - "git_hash": { - "description": "The git hash of the server.", + "url": { + "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", + "format": "uri", + "nullable": true, "type": "string" - }, - "pubsub": { - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ], - "description": "Metadata about our pub-sub connection." } }, "required": [ - "cache", - "engine", - "environment", - "executor", - "fs", - "git_hash", - "pubsub" + "created_at", + "currency" ], "type": "object" }, - "Method": { - "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", - "enum": [ - "OPTIONS", - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "TRACE", - "CONNECT", - "PATCH", - "EXTENSION" - ], - "type": "string" - }, - "NewAddress": { - "description": "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.", + "InvoiceLineItem": { + "description": "An invoice line item.", "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component.", - "type": "string" - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" + "amount": { + "default": 0.0, + "description": "The amount, in USD.", + "format": "money-usd", + "title": "Number", + "type": "number" }, - "street2": { - "description": "The second street component.", - "type": "string" + "currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Currency" + } + ], + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." }, - "user_id": { - "description": "The user ID that this address belongs to.", + "description": { + "description": "The description.", "type": "string" }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "type": "object" - }, - "OAuth2ClientInfo": { - "description": "Information about an OAuth 2.0 client.", - "properties": { - "csrf_token": { - "description": "Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.", + "id": { + "description": "Unique identifier for the object.", "type": "string" }, - "pkce_code_verifier": { - "description": "Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters. Each character must be ASCII alphanumeric or one of the characters \"-\" / \".\" / \"_\" / \"~\".", - "nullable": true, + "invoice_item": { + "description": "The ID of the invoice item associated with this line item if any.", "type": "string" }, - "url": { - "description": "The URL for consent.", - "type": "string" + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", + "type": "object" } }, + "required": [ + "currency" + ], "type": "object" }, - "OAuth2GrantType": { - "description": "An OAuth 2.0 Grant Type. These are documented here: .", + "InvoiceStatus": { + "description": "An enum representing the possible values of an `Invoice`'s `status` field.", "enum": [ - "urn:ietf:params:oauth:grant-type:device_code" + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void" ], "type": "string" }, - "OutputFile": { - "description": "Output file contents.", - "properties": { - "contents": { - "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", - "nullable": true, - "type": "string" - }, - "name": { - "default": "", - "description": "The name of the file.", - "type": "string" - } - }, - "type": "object" - }, - "PaymentIntent": { - "description": "A payment intent response.", - "properties": { - "client_secret": { - "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", - "type": "string" - } - }, - "required": [ - "client_secret" - ], - "type": "object" - }, - "PaymentMethod": { - "description": "A payment method.", + "Jetstream": { + "description": "Jetstream information.", "properties": { - "billing_info": { + "config": { "allOf": [ { - "$ref": "#/components/schemas/BillingInfo" + "$ref": "#/components/schemas/JetstreamConfig" } ], - "description": "The billing info for the payment method." + "default": { + "domain": "", + "max_memory": 0, + "max_storage": 0, + "store_dir": "" + }, + "description": "The Jetstream config." }, - "card": { + "meta": { "allOf": [ { - "$ref": "#/components/schemas/CardDetails" + "$ref": "#/components/schemas/MetaClusterInfo" } ], - "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", - "nullable": true - }, - "created_at": { - "description": "Time at which the object was created.", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "type": "string" + "default": { + "cluster_size": 0, + "leader": "", + "name": "" }, - "default": {}, - "description": "Set of key-value pairs.", - "type": "object" + "description": "Meta information about the cluster." }, - "type": { + "stats": { "allOf": [ { - "$ref": "#/components/schemas/PaymentMethodType" + "$ref": "#/components/schemas/JetstreamStats" } ], - "description": "The type of payment method." + "default": { + "accounts": 0, + "api": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "ha_assets": 0, + "memory": 0, + "reserved_memory": 0, + "reserved_store": 0, + "store": 0 + }, + "description": "Jetstream statistics." } }, - "required": [ - "billing_info", - "created_at", - "type" - ], "type": "object" }, - "PaymentMethodCardChecks": { - "description": "Card checks.", + "JetstreamApiStats": { + "description": "Jetstream API statistics.", "properties": { - "address_line1_check": { - "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" + "errors": { + "default": 0, + "description": "The number of errors.", + "format": "int64", + "type": "integer" }, - "address_postal_code_check": { - "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" + "inflight": { + "default": 0, + "description": "The number of inflight requests.", + "format": "int64", + "type": "integer" }, - "cvc_check": { - "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" + "total": { + "default": 0, + "description": "The number of requests.", + "format": "int64", + "type": "integer" } }, "type": "object" }, - "PaymentMethodType": { - "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", - "enum": [ - "card" - ], - "type": "string" - }, - "PhysicsConstant": { - "description": "A physics constant.", + "JetstreamConfig": { + "description": "Jetstream configuration.", "properties": { - "completed_at": { - "description": "The time and date the constant was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", + "domain": { + "default": "", + "description": "The domain.", "type": "string" }, - "constant": { - "allOf": [ - { - "$ref": "#/components/schemas/PhysicsConstantName" - } - ], - "description": "The constant we are returning." + "max_memory": { + "default": 0, + "description": "The max memory.", + "format": "int64", + "type": "integer" }, - "created_at": { - "description": "The time and date the constant was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" + "max_storage": { + "default": 0, + "description": "The max storage.", + "format": "int64", + "type": "integer" }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, + "store_dir": { + "default": "", + "description": "The store directory.", "type": "string" + } + }, + "type": "object" + }, + "JetstreamStats": { + "description": "Jetstream statistics.", + "properties": { + "accounts": { + "default": 0, + "description": "The number of accounts.", + "format": "int64", + "type": "integer" }, - "id": { + "api": { "allOf": [ { - "$ref": "#/components/schemas/Uuid" + "$ref": "#/components/schemas/JetstreamApiStats" } ], - "description": "The unique identifier of the constant request.\n\nThis is the same as the API call ID." + "default": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "description": "API stats." }, - "started_at": { - "description": "The time and date the constant was started.", - "format": "date-time", - "nullable": true, - "title": "DateTime", - "type": "string" + "ha_assets": { + "default": 0, + "description": "The number of HA assets.", + "format": "int64", + "type": "integer" }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ], - "description": "The status of the constant." + "memory": { + "default": 0, + "description": "The memory used by the Jetstream server.", + "format": "int64", + "type": "integer" }, - "updated_at": { - "description": "The time and date the constant was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" + "reserved_memory": { + "default": 0, + "description": "The reserved memory for the Jetstream server.", + "format": "int64", + "type": "integer" }, - "user_id": { - "description": "The user ID of the user who created the constant.", - "type": "string" + "reserved_store": { + "default": 0, + "description": "The reserved storage for the Jetstream server.", + "format": "int64", + "type": "integer" }, - "value": { - "description": "The resulting value of the constant.", - "format": "double", - "nullable": true, - "type": "number" + "store": { + "default": 0, + "description": "The storage used by the Jetstream server.", + "format": "int64", + "type": "integer" } }, - "required": [ - "constant", - "created_at", - "id", - "status", - "updated_at" - ], "type": "object" }, - "PhysicsConstantName": { - "description": "The valid types of phys constant names.", - "enum": [ - "pi", - "c", - "speed_of_light", - "G", - "newtonian_graviation", - "h", - "plank_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" - ], - "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.", + "LeafNode": { + "description": "Leaf node information.", "properties": { - "authorization": { - "description": "Names of available authorization plugins.", - "items": { - "type": "string" - }, - "type": "array" + "auth_timeout": { + "default": 0, + "description": "The auth timeout of the leaf node.", + "format": "int64", + "type": "integer" }, - "log": { - "description": "Names of available logging-drivers, and logging-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" + "host": { + "default": "", + "description": "The host of the leaf node.", + "type": "string" }, - "network": { - "description": "Names of available network-drivers, and network-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" + "port": { + "default": 0, + "description": "The port of the leaf node.", + "format": "int64", + "type": "integer" }, - "volume": { - "description": "Names of available volume-drivers, and network-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" + "tls_timeout": { + "default": 0, + "description": "The TLS timeout for the leaf node.", + "format": "int64", + "type": "integer" } }, "type": "object" }, - "Pong": { - "description": "The response from the `/ping` endpoint.", + "Mesh": { "properties": { - "message": { - "description": "The pong response.", + "mesh": { "type": "string" } }, "required": [ - "message" + "mesh" ], "type": "object" }, - "RegistryServiceConfig": { - "description": "RegistryServiceConfig stores daemon registry services configuration.", + "MetaClusterInfo": { + "description": "Jetstream statistics.", "properties": { - "allow_nondistributable_artifacts_cid_rs": { - "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allow_nondistributable_artifacts_hostnames": { - "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "index_configs": { - "additionalProperties": { - "$ref": "#/components/schemas/IndexInfo" - }, - "type": "object" - }, - "insecure_registry_cid_rs": { - "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "items": { - "type": "string" - }, - "type": "array" + "cluster_size": { + "default": 0, + "description": "The size of the cluster.", + "format": "int64", + "type": "integer" }, - "mirrors": { - "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "Runtime": { - "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", - "properties": { - "path": { - "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "nullable": true, + "leader": { + "default": "", + "description": "The leader of the cluster.", "type": "string" }, - "runtime_args": { - "description": "List of command-line arguments to pass to the runtime when invoked.", - "items": { - "type": "string" - }, - "type": "array" + "name": { + "default": "", + "description": "The name of the cluster.", + "type": "string" } }, "type": "object" }, - "Session": { - "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "Metadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", "properties": { - "created_at": { - "description": "The date and time the session was created.", - "format": "date-time", - "title": "DateTime", - "type": "string" + "cache": { + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata" + } + ], + "description": "Metadata about our cache." }, - "expires": { - "description": "The date and time the session expires.", - "format": "date-time", - "title": "DateTime", - "type": "string" + "engine": { + "allOf": [ + { + "$ref": "#/components/schemas/EngineMetadata" + } + ], + "description": "Metadata about our engine API connection." }, - "id": { - "description": "The unique identifier for the session.", - "type": "string" + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/Environment" + } + ], + "description": "The environment we are running in." }, - "session_token": { + "executor": { "allOf": [ { - "$ref": "#/components/schemas/Uuid" + "$ref": "#/components/schemas/ExecutorMetadata" } ], - "description": "The session token." + "description": "Metadata about our executor API connection." }, - "updated_at": { - "description": "The date and time the session was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata" + } + ], + "description": "Metadata about our file system." }, - "user_id": { - "description": "The user ID of the user that the session belongs to.", + "git_hash": { + "description": "The git hash of the server.", "type": "string" + }, + "point_e": { + "allOf": [ + { + "$ref": "#/components/schemas/PointEMetadata" + } + ], + "description": "Metadata about our point-e instance." + }, + "pubsub": { + "allOf": [ + { + "$ref": "#/components/schemas/Connection" + } + ], + "description": "Metadata about our pub-sub connection." } }, "required": [ - "created_at", - "expires", - "session_token", - "updated_at" + "cache", + "engine", + "environment", + "executor", + "fs", + "git_hash", + "point_e", + "pubsub" ], "type": "object" }, - "SystemInfoCgroupDriverEnum": { - "enum": [ - "", - "cgroupfs", - "systemd", - "none" - ], - "type": "string" - }, - "SystemInfoCgroupVersionEnum": { + "Method": { + "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", "enum": [ - "", - "1", - "2" + "OPTIONS", + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "TRACE", + "CONNECT", + "PATCH", + "EXTENSION" ], "type": "string" }, - "SystemInfoDefaultAddressPools": { + "NewAddress": { + "description": "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.", "properties": { - "base": { - "description": "The network address in CIDR format", - "nullable": true, + "city": { + "description": "The city component.", "type": "string" }, - "size": { - "description": "The network pool size", - "format": "int64", + "country": { + "description": "The country component.", + "type": "string" + }, + "state": { + "description": "The state component.", + "type": "string" + }, + "street1": { + "description": "The first street component.", + "type": "string" + }, + "street2": { + "description": "The second street component.", + "type": "string" + }, + "user_id": { + "description": "The user ID that this address belongs to.", + "type": "string" + }, + "zip": { + "description": "The zip component.", + "type": "string" + } + }, + "type": "object" + }, + "OAuth2ClientInfo": { + "description": "Information about an OAuth 2.0 client.", + "properties": { + "csrf_token": { + "description": "Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.", + "type": "string" + }, + "pkce_code_verifier": { + "description": "Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters. Each character must be ASCII alphanumeric or one of the characters \"-\" / \".\" / \"_\" / \"~\".", "nullable": true, - "type": "integer" + "type": "string" + }, + "url": { + "description": "The URL for consent.", + "type": "string" } }, "type": "object" }, - "SystemInfoIsolationEnum": { + "OAuth2GrantType": { + "description": "An OAuth 2.0 Grant Type. These are documented here: .", "enum": [ - "", - "default", - "hyperv", - "process" + "urn:ietf:params:oauth:grant-type:device_code" ], "type": "string" }, - "UnitAccelerationConversion": { - "description": "A unit conversion.", + "Onboarding": { + "description": "Onboarding details", "properties": { - "completed_at": { - "description": "The time and date the unit conversion was completed.", - "format": "date-time", - "nullable": true, - "title": "DateTime", + "first_call_from_their_machine_date": { + "description": "When the user first called an endpoint from their machine (i.e. not a litterbox execution)", "type": "string" }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "format": "date-time", - "title": "DateTime", + "first_litterbox_execute_date": { + "description": "When the user first used the litterbox", "type": "string" }, - "error": { - "description": "The error the function returned, if any.", - "nullable": true, + "first_token_date": { + "description": "When the user created their first token", "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", + } + }, + "type": "object" + }, + "OutputFile": { + "description": "Output file contents.", + "properties": { + "contents": { + "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", "nullable": true, - "type": "number" + "type": "string" }, - "output_format": { + "name": { + "default": "", + "description": "The name of the file.", + "type": "string" + } + }, + "type": "object" + }, + "PaymentIntent": { + "description": "A payment intent response.", + "properties": { + "client_secret": { + "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", + "type": "string" + } + }, + "required": [ + "client_secret" + ], + "type": "object" + }, + "PaymentMethod": { + "description": "A payment method.", + "properties": { + "billing_info": { "allOf": [ { - "$ref": "#/components/schemas/UnitAccelerationFormat" + "$ref": "#/components/schemas/BillingInfo" } ], - "description": "The output format of the unit conversion." + "description": "The billing info for the payment method." }, - "src_format": { + "card": { "allOf": [ { - "$ref": "#/components/schemas/UnitAccelerationFormat" + "$ref": "#/components/schemas/CardDetails" } ], - "description": "The source format of the unit conversion." + "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", + "nullable": true }, - "started_at": { - "description": "The time and date the unit conversion was started.", + "created_at": { + "description": "Time at which the object was created.", "format": "date-time", - "nullable": true, - "title": "DateTime", "type": "string" }, - "status": { + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "Set of key-value pairs.", + "type": "object" + }, + "type": { "allOf": [ { - "$ref": "#/components/schemas/ApiCallStatus" + "$ref": "#/components/schemas/PaymentMethodType" } ], - "description": "The status of the unit conversion." + "description": "The type of payment method." + } + }, + "required": [ + "billing_info", + "created_at", + "type" + ], + "type": "object" + }, + "PaymentMethodCardChecks": { + "description": "Card checks.", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "format": "date-time", - "title": "DateTime", + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", "type": "string" }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", "type": "string" } }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], "type": "object" }, - "UnitAccelerationFormat": { - "description": "The valid types of metric unit formats.", + "PaymentMethodType": { + "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", "enum": [ - "meters_per_second_squared", - "feet_per_second_squared", - "standard_gravity" + "card" ], "type": "string" }, - "UnitAngleConversion": { - "description": "A unit conversion.", + "PhysicsConstant": { + "description": "A physics constant.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "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 unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4117,38 +4354,10 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." - }, - "input": { - "default": 0.0, - "description": "The input value.", - "format": "float", - "type": "number" - }, - "output": { - "description": "The resulting value.", - "format": "double", - "nullable": true, - "type": "number" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAngleFormat" - } - ], - "description": "The output format of the unit conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/UnitAngleFormat" - } - ], - "description": "The source format of the unit conversion." + "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 unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4160,54 +4369,291 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "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", - "output_format", - "src_format", "status", "updated_at" ], "type": "object" }, - "UnitAngleFormat": { - "description": "The valid types of angle formats.", + "PhysicsConstantName": { + "description": "The valid types of phys constant names.", "enum": [ - "radian", - "degree", - "arcminute", - "arcsecond", - "milliarcsecond", - "turn", - "gradian" - ], - "type": "string" + "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" + ], + "type": "string" }, - "UnitAngularVelocityConversion": { + "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": { + "authorization": { + "description": "Names of available authorization plugins.", + "items": { + "type": "string" + }, + "type": "array" + }, + "log": { + "description": "Names of available logging-drivers, and logging-driver plugins.", + "items": { + "type": "string" + }, + "type": "array" + }, + "network": { + "description": "Names of available network-drivers, and network-driver plugins.", + "items": { + "type": "string" + }, + "type": "array" + }, + "volume": { + "description": "Names of available volume-drivers, and network-driver plugins.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PointEMetadata": { + "description": "Metadata about our point-e instance.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "ok": { + "description": "If the point-e service returned an ok response from ping.", + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "type": "object" + }, + "Pong": { + "description": "The response from the `/ping` endpoint.", + "properties": { + "message": { + "description": "The pong response.", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "RegistryServiceConfig": { + "description": "RegistryServiceConfig stores daemon registry services configuration.", + "properties": { + "allow_nondistributable_artifacts_cid_rs": { + "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allow_nondistributable_artifacts_hostnames": { + "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "index_configs": { + "additionalProperties": { + "$ref": "#/components/schemas/IndexInfo" + }, + "type": "object" + }, + "insecure_registry_cid_rs": { + "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mirrors": { + "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Runtime": { + "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", + "properties": { + "path": { + "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", + "nullable": true, + "type": "string" + }, + "runtime_args": { + "description": "List of command-line arguments to pass to the runtime when invoked.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Session": { + "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "properties": { + "created_at": { + "description": "The date and time the session was created.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "expires": { + "description": "The date and time the session expires.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "id": { + "description": "The unique identifier for the session.", + "type": "string" + }, + "session_token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The session token." + }, + "updated_at": { + "description": "The date and time the session was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user that the session belongs to.", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "session_token", + "updated_at" + ], + "type": "object" + }, + "SystemInfoCgroupDriverEnum": { + "enum": [ + "", + "cgroupfs", + "systemd", + "none" + ], + "type": "string" + }, + "SystemInfoCgroupVersionEnum": { + "enum": [ + "", + "1", + "2" + ], + "type": "string" + }, + "SystemInfoDefaultAddressPools": { + "properties": { + "base": { + "description": "The network address in CIDR format", + "nullable": true, + "type": "string" + }, + "size": { + "description": "The network pool size", + "format": "int64", + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, + "SystemInfoIsolationEnum": { + "enum": [ + "", + "default", + "hyperv", + "process" + ], + "type": "string" + }, + "UnitAccelerationConversion": { "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4223,7 +4669,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4240,7 +4686,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitAngularVelocityFormat" + "$ref": "#/components/schemas/UnitAccelerationFormat" } ], "description": "The output format of the unit conversion." @@ -4248,13 +4694,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitAngularVelocityFormat" + "$ref": "#/components/schemas/UnitAccelerationFormat" } ], "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4266,16 +4712,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4289,28 +4735,27 @@ ], "type": "object" }, - "UnitAngularVelocityFormat": { - "description": "The valid types of angular velocity unit formats.", + "UnitAccelerationFormat": { + "description": "The valid types of acceleration unit formats.", "enum": [ - "radians_per_second", - "degrees_per_second", - "revolutions_per_minute", - "milliarcseconds_per_year" + "meters_per_second_squared", + "feet_per_second_squared", + "standard_gravity" ], "type": "string" }, - "UnitAreaConversion": { + "UnitAngleConversion": { "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4326,7 +4771,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4343,7 +4788,216 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitAreaFormat" + "$ref": "#/components/schemas/UnitAngleFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngleFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "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" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitAngleFormat": { + "description": "The valid types of angle formats.", + "enum": [ + "radian", + "degree", + "arcminute", + "arcsecond", + "milliarcsecond", + "turn", + "gradian" + ], + "type": "string" + }, + "UnitAngularVelocityConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "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." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngularVelocityFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngularVelocityFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "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" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitAngularVelocityFormat": { + "description": "The valid types of angular velocity unit formats.", + "enum": [ + "radians_per_second", + "degrees_per_second", + "revolutions_per_minute", + "milliarcseconds_per_year" + ], + "type": "string" + }, + "UnitAreaConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "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." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAreaFormat" } ], "description": "The output format of the unit conversion." @@ -4357,7 +5011,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4369,16 +5023,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4409,14 +5063,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4432,7 +5086,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4463,7 +5117,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4475,16 +5129,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4510,14 +5164,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4533,7 +5187,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4564,7 +5218,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4576,16 +5230,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4613,14 +5267,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4636,7 +5290,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4667,7 +5321,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4679,16 +5333,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4716,14 +5370,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4739,7 +5393,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4770,7 +5424,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4782,16 +5436,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4819,14 +5473,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4842,7 +5496,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4873,7 +5527,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4885,16 +5539,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -4928,14 +5582,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -4951,7 +5605,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -4982,7 +5636,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -4994,16 +5648,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5022,9 +5676,12 @@ "enum": [ "joule", "calorie", + "kilowatt_hour", + "watt_hour", "british_thermal_unit", "british_thermal_unit_iso", "british_thermal_unit59", + "therm", "foot_pound" ], "type": "string" @@ -5033,14 +5690,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5056,7 +5713,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5087,7 +5744,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5099,16 +5756,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5128,7 +5785,7 @@ "newton", "pound", "dyne", - "kilopound", + "kilopond", "poundal" ], "type": "string" @@ -5137,14 +5794,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5160,7 +5817,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5191,7 +5848,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5203,16 +5860,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5240,14 +5897,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5263,7 +5920,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5294,7 +5951,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5306,16 +5963,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5332,15 +5989,19 @@ "UnitLengthFormat": { "description": "The valid types of length unit formats.", "enum": [ + "meter", "millimeter", "centimeter", - "meter", - "kilomter", + "kilometer", "foot", + "mil", "inch", "mile", "nautical_mile", "astronomical_unit", + "lightyear", + "parsec", + "angstrom", "cubit", "fathom", "chain", @@ -5356,14 +6017,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5379,7 +6040,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5410,7 +6071,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5422,16 +6083,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5457,14 +6118,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5480,7 +6141,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5511,7 +6172,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5523,16 +6184,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5558,14 +6219,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5581,7 +6242,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5612,7 +6273,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5624,16 +6285,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5674,7 +6335,7 @@ "milli", "centi", "deci", - "metric_unit", + "unit", "deca", "hecto", "kilo", @@ -5690,14 +6351,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5713,7 +6374,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5744,7 +6405,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5756,16 +6417,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5783,14 +6444,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5806,7 +6467,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5837,7 +6498,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5849,16 +6510,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5876,14 +6537,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5899,7 +6560,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -5930,7 +6591,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -5942,16 +6603,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -5969,14 +6630,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -5992,7 +6653,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6023,7 +6684,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6035,16 +6696,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6071,14 +6732,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6094,7 +6755,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6125,7 +6786,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6137,16 +6798,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6175,14 +6836,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6198,7 +6859,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6229,7 +6890,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6241,16 +6902,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6265,7 +6926,7 @@ "type": "object" }, "UnitRadiationFormat": { - "description": "The valid types of radiation unit formats.", + "description": "The valid types of radiation unit formats. These describe the radiation energy absorbed by a mass or material and/or how it affects the relative damage to the human body.", "enum": [ "gray", "sievert", @@ -6273,18 +6934,18 @@ ], "type": "string" }, - "UnitSolidAngleConversion": { + "UnitRadioactivityConversion": { "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6300,7 +6961,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6317,7 +6978,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitSolidAngleFormat" + "$ref": "#/components/schemas/UnitRadioactivityFormat" } ], "description": "The output format of the unit conversion." @@ -6325,13 +6986,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitSolidAngleFormat" + "$ref": "#/components/schemas/UnitRadioactivityFormat" } ], "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6343,16 +7004,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6366,27 +7027,27 @@ ], "type": "object" }, - "UnitSolidAngleFormat": { - "description": "The valid types of solid angle unit formats.", + "UnitRadioactivityFormat": { + "description": "The valid types of radioactivity unit formats. These describe the amount of radiation emitted by a radioactive material.", "enum": [ - "steradian", - "degree_squared", - "spat" + "becquerel", + "curie", + "rutherford" ], "type": "string" }, - "UnitTemperatureConversion": { + "UnitSolidAngleConversion": { "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6402,7 +7063,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6419,7 +7080,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitTemperatureFormat" + "$ref": "#/components/schemas/UnitSolidAngleFormat" } ], "description": "The output format of the unit conversion." @@ -6427,13 +7088,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitTemperatureFormat" + "$ref": "#/components/schemas/UnitSolidAngleFormat" } ], "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6445,16 +7106,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6468,29 +7129,27 @@ ], "type": "object" }, - "UnitTemperatureFormat": { - "description": "The valid types of temperature unit formats.", + "UnitSolidAngleFormat": { + "description": "The valid types of solid angle unit formats.", "enum": [ - "kelvin", - "celsius", - "fahrenheit", - "reaumur", - "rankine" + "steradian", + "degree_squared", + "spat" ], "type": "string" }, - "UnitTimeConversion": { + "UnitTemperatureConversion": { "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6506,7 +7165,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6523,7 +7182,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitTimeFormat" + "$ref": "#/components/schemas/UnitTemperatureFormat" } ], "description": "The output format of the unit conversion." @@ -6531,13 +7190,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitTimeFormat" + "$ref": "#/components/schemas/UnitTemperatureFormat" } ], "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6549,16 +7208,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6572,32 +7231,29 @@ ], "type": "object" }, - "UnitTimeFormat": { - "description": "The valid types of time unit formats.", + "UnitTemperatureFormat": { + "description": "The valid types of temperature unit formats.", "enum": [ - "second", - "minute", - "hour", - "day", - "week", - "year", - "julian_year", - "gregorian_year" + "kelvin", + "celsius", + "fahrenheit", + "reaumur", + "rankine" ], "type": "string" }, - "UnitVelocityConversion": { + "UnitTimeConversion": { "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6613,7 +7269,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6630,7 +7286,7 @@ "output_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitVelocityFormat" + "$ref": "#/components/schemas/UnitTimeFormat" } ], "description": "The output format of the unit conversion." @@ -6638,13 +7294,13 @@ "src_format": { "allOf": [ { - "$ref": "#/components/schemas/UnitVelocityFormat" + "$ref": "#/components/schemas/UnitTimeFormat" } ], "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6656,16 +7312,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6679,9 +7335,116 @@ ], "type": "object" }, - "UnitVelocityFormat": { - "description": "The valid types of velocity unit formats.", - "enum": [ + "UnitTimeFormat": { + "description": "The valid types of time unit formats.", + "enum": [ + "second", + "minute", + "hour", + "day", + "week", + "year", + "julian_year", + "gregorian_year" + ], + "type": "string" + }, + "UnitVelocityConversion": { + "description": "A unit conversion.", + "properties": { + "completed_at": { + "description": "The time and date the API call was completed.", + "format": "date-time", + "nullable": true, + "title": "DateTime", + "type": "string" + }, + "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." + }, + "input": { + "default": 0.0, + "description": "The input value.", + "format": "float", + "type": "number" + }, + "output": { + "description": "The resulting value.", + "format": "double", + "nullable": true, + "type": "number" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVelocityFormat" + } + ], + "description": "The output format of the unit conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVelocityFormat" + } + ], + "description": "The source format of the unit conversion." + }, + "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" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "UnitVelocityFormat": { + "description": "The valid types of velocity unit formats.", + "enum": [ "meters_per_second", "feet_per_second", "miles_per_hour", @@ -6694,14 +7457,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6717,7 +7480,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6748,7 +7511,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6760,16 +7523,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6796,14 +7559,14 @@ "description": "A unit conversion.", "properties": { "completed_at": { - "description": "The time and date the unit conversion was completed.", + "description": "The time and date the API call was completed.", "format": "date-time", "nullable": true, "title": "DateTime", "type": "string" }, "created_at": { - "description": "The time and date the unit conversion was created.", + "description": "The time and date the API call was created.", "format": "date-time", "title": "DateTime", "type": "string" @@ -6819,7 +7582,7 @@ "$ref": "#/components/schemas/Uuid" } ], - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID." + "description": "The unique identifier of the API call.\n\nThis is the same as the API call ID." }, "input": { "default": 0.0, @@ -6850,7 +7613,7 @@ "description": "The source format of the unit conversion." }, "started_at": { - "description": "The time and date the unit conversion was started.", + "description": "The time and date the API call was started.", "format": "date-time", "nullable": true, "title": "DateTime", @@ -6862,16 +7625,16 @@ "$ref": "#/components/schemas/ApiCallStatus" } ], - "description": "The status of the unit conversion." + "description": "The status of the API call." }, "updated_at": { - "description": "The time and date the unit conversion was last updated.", + "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 unit conversion.", + "description": "The user ID of the user who created the API call.", "type": "string" } }, @@ -6888,14 +7651,36 @@ "UnitVolumeFormat": { "description": "The valid types of volume unit formats.", "enum": [ - "cubic_millimeter", - "cubic_centimeter", "cubic_meter", + "cubic_centimeter", + "cubic_millimeter", "cubic_kilometer", "liter", + "cubic_inch", "cubic_foot", "cubic_yard", - "cubic_mile" + "cubic_mile", + "gallon", + "quart", + "pint", + "cup", + "fluid_ounce", + "barrel", + "bushel", + "cord", + "cubic_fathom", + "tablespoon", + "teaspoon", + "pinch", + "dash", + "drop", + "fifth", + "dram", + "gill", + "peck", + "sack", + "shot", + "strike" ], "type": "string" }, @@ -7053,48 +7838,605 @@ "description": "The token used for verification. This is used as the id for the table since it is unique per record.", "type": "string" }, - "identifier": { - "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", - "type": "string" + "identifier": { + "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", + "type": "string" + }, + "updated_at": { + "description": "The date and time the verification token was last updated.", + "format": "date-time", + "title": "DateTime", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "updated_at" + ], + "type": "object" + } + } + }, + "info": { + "contact": { + "email": "api@kittycad.io", + "url": "https://kittycad.io" + }, + "description": "API server for KittyCAD", + "title": "KittyCAD API", + "version": "0.1.0" + }, + "openapi": "3.0.3", + "paths": { + "/": { + "get": { + "operationId": "get_schema", + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "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 OpenAPI schema.", + "tags": [ + "meta" + ] + } + }, + "/_meta/info": { + "get": { + "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", + "operationId": "get_metadata", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Metadata" + } + } + }, + "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 the metadata about our currently running server.", + "tags": [ + "meta", + "hidden" + ] + } + }, + "/ai/image-to-3d/{input_format}/{output_format}": { + "post": { + "operationId": "create_image_to_3d", + "parameters": [ + { + "description": "The format of the image being converted.", + "in": "path", + "name": "input_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/ImageType" + }, + "style": "simple" + }, + { + "description": "The format the output file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileExportFormat" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mesh" + } + } + }, + "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": "Generate a 3D model from an image.", + "tags": [ + "ai", + "beta", + "hidden" + ] + } + }, + "/ai/text-to-3d/{output_format}": { + "post": { + "operationId": "create_text_to_3d", + "parameters": [ + { + "description": "The format the output file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileExportFormat" + }, + "style": "simple" + }, + { + "description": "The prompt for the model.", + "in": "query", + "name": "prompt", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mesh" + } + } + }, + "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": "Generate a 3D model from text.", + "tags": [ + "ai", + "beta", + "hidden" + ] + } + }, + "/api-call-metrics": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "description": "What field to group the metrics by.", + "in": "query", + "name": "group_by", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup" + }, + "title": "Array_of_ApiCallQueryGroup", + "type": "array" + } + } + }, + "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 API call metrics.", + "tags": [ + "api-calls", + "hidden" + ] + } + }, + "/api-calls": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retrieve the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } + }, + "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": "List API calls.", + "tags": [ + "api-calls", + "hidden" + ], + "x-dropshot-pagination": true + } + }, + "/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", + "operationId": "get_api_call", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice" + } + } + }, + "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" }, - "updated_at": { - "description": "The date and time the verification token was last updated.", - "format": "date-time", - "title": "DateTime", - "type": "string" + "5XX": { + "$ref": "#/components/responses/Error" } }, - "required": [ - "created_at", - "expires", - "updated_at" - ], - "type": "object" + "summary": "Get details of an API call.", + "tags": [ + "api-calls", + "hidden" + ] } - } - }, - "info": { - "contact": { - "email": "api@kittycad.io", - "url": "https://kittycad.io" }, - "description": "API server for KittyCAD", - "title": "KittyCAD API", - "version": "0.1.0" - }, - "openapi": "3.0.3", - "paths": { - "/": { + "/apps/github/callback": { "get": { - "operationId": "get_schema", + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "operationId": "apps_github_callback", + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + }, + "required": true + }, "responses": { - "200": { - "content": { - "application/json": { - "schema": {} - } - }, - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -7137,22 +8479,23 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Get OpenAPI schema.", + "summary": "Listen for callbacks to GitHub app authentication.", "tags": [ - "meta" + "apps", + "hidden" ] } }, - "/_meta/info": { + "/apps/github/consent": { "get": { - "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", - "operationId": "get_metadata", + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "operationId": "apps_github_consent", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Metadata" + "$ref": "#/components/schemas/AppClientInfo" } } }, @@ -7199,43 +8542,31 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Get the metadata about our currently running server.", + "summary": "Get the consent URL for GitHub app authentication.", "tags": [ - "meta", + "apps", "hidden" ] } }, - "/api-call-metrics": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", - "operationId": "get_api_call_metrics", - "parameters": [ - { - "description": "What field to group the metrics by.", - "in": "query", - "name": "group_by", - "required": true, - "schema": { - "$ref": "#/components/schemas/ApiCallQueryGroupBy" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ApiCallQueryGroup" - }, - "title": "Array_of_ApiCallQueryGroup", - "type": "array" - } + "/apps/github/webhook": { + "post": { + "description": "These come from the GitHub app.", + "operationId": "apps_github_webhook", + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" } - }, - "description": "successful operation", + } + }, + "required": true + }, + "responses": { + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -7278,17 +8609,17 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Get API call metrics.", + "summary": "Listen for GitHub webhooks.", "tags": [ - "api-calls", + "apps", "hidden" ] } }, - "/api-calls": { + "/async/operations": { "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls", + "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "operationId": "list_async_operations", "parameters": [ { "description": "Maximum number of items returned by a single call", @@ -7319,6 +8650,15 @@ "$ref": "#/components/schemas/CreatedAtSortMode" }, "style": "form" + }, + { + "description": "The status to filter by.", + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/ApiCallStatus" + }, + "style": "form" } ], "responses": { @@ -7326,7 +8666,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + "$ref": "#/components/schemas/AsyncApiCallResultsPage" } } }, @@ -7373,7 +8713,7 @@ "$ref": "#/components/responses/Error" } }, - "summary": "List API calls.", + "summary": "List async operations.", "tags": [ "api-calls", "hidden" @@ -7381,13 +8721,13 @@ "x-dropshot-pagination": true } }, - "/api-calls/{id}": { + "/async/operations/{id}": { "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", - "operationId": "get_api_call", + "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", + "operationId": "get_async_operation", "parameters": [ { - "description": "The ID of the API call.", + "description": "The ID of the async operation.", "in": "path", "name": "id", "required": true, @@ -7402,7 +8742,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" + "$ref": "#/components/schemas/AsyncApiCallOutput" } } }, @@ -7449,25 +8789,16 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Get details of an API call.", + "summary": "Get an async operation.", "tags": [ - "api-calls", - "hidden" + "api-calls" ] } }, - "/apps/github/callback": { - "get": { - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", - "operationId": "apps_github_callback", - "requestBody": { - "content": { - "application/json": { - "schema": {} - } - }, - "required": true - }, + "/auth/email": { + "options": { + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_auth_email", "responses": { "204": { "description": "successful operation, no content", @@ -7513,94 +8844,33 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Listen for callbacks to GitHub app authentication.", - "tags": [ - "apps", - "hidden" - ] - } - }, - "/apps/github/consent": { - "get": { - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", - "operationId": "apps_github_consent", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppClientInfo" - } - } - }, - "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 the consent URL for GitHub app authentication.", + "summary": "OPTIONS endoint.", "tags": [ - "apps", "hidden" ] - } - }, - "/apps/github/webhook": { + }, "post": { - "description": "These come from the GitHub app.", - "operationId": "apps_github_webhook", + "operationId": "auth_email", "requestBody": { "content": { - "application/octet-stream": { + "application/json": { "schema": { - "format": "binary", - "type": "string" + "$ref": "#/components/schemas/EmailAuthenticationForm" } } }, "required": true }, "responses": { - "204": { - "description": "successful operation, no content", + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerificationToken" + } + } + }, + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -7643,68 +8913,52 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Listen for GitHub webhooks.", + "summary": "Create an email verification request for a user.", "tags": [ - "apps", "hidden" ] } }, - "/async/operations": { + "/auth/email/callback": { "get": { - "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", - "operationId": "list_async_operations", + "operationId": "auth_email_callback", "parameters": [ { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retrieve the subsequent page", + "description": "The URL to redirect back to after we have authenticated.", "in": "query", - "name": "page_token", + "name": "callback_url", "schema": { + "format": "uri", "nullable": true, "type": "string" }, "style": "form" }, { + "description": "The user's email.", "in": "query", - "name": "sort_by", + "name": "email", + "required": true, "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "format": "email", + "type": "string" }, "style": "form" }, { - "description": "The status to filter by.", + "description": "The verification token.", "in": "query", - "name": "status", + "name": "token", + "required": true, "schema": { - "$ref": "#/components/schemas/ApiCallStatus" + "type": "string" }, "style": "form" } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallResultsPage" - } - } - }, - "description": "successful operation", + "302": { + "description": "Temporary Redirect", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -7737,6 +8991,14 @@ "type": "string" }, "style": "simple" + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" } } }, @@ -7747,26 +9009,23 @@ "$ref": "#/components/responses/Error" } }, - "summary": "List async operations.", + "summary": "Listen for callbacks for email verification for users.", "tags": [ - "api-calls", "hidden" - ], - "x-dropshot-pagination": true + ] } }, - "/async/operations/{id}": { + "/constant/physics/{constant}": { "get": { - "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", - "operationId": "get_async_operation", + "operationId": "get_physics_constant", "parameters": [ { - "description": "The ID of the async operation.", + "description": "The constant to get.", "in": "path", - "name": "id", + "name": "constant", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/PhysicsConstantName" }, "style": "simple" } @@ -7776,7 +9035,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" + "$ref": "#/components/schemas/PhysicsConstant" } } }, @@ -7823,73 +9082,44 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Get an async operation.", + "summary": "Get a physics constant.", "tags": [ - "api-calls" + "constant" ] } }, - "/auth/email": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_auth_email", - "responses": { - "204": { - "description": "successful operation, no content", - "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" + "/file/2d/vector/conversion/{src_format}/{output_format}": { + "post": { + "description": "Convert a 2D Vector file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_2d_vector_conversion", + "parameters": [ + { + "description": "The format the file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/File2DVectorExportFormat" + }, + "style": "simple" }, - "5XX": { - "$ref": "#/components/responses/Error" + { + "description": "The format of the file to convert.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/File2DVectorImportFormat" + }, + "style": "simple" } - }, - "summary": "OPTIONS endoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "operationId": "auth_email", + ], "requestBody": { "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/EmailAuthenticationForm" + "format": "binary", + "type": "string" } } }, @@ -7900,7 +9130,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VerificationToken" + "$ref": "#/components/schemas/File2DVectorConversion" } } }, @@ -7947,52 +9177,59 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Create an email verification request for a user.", + "summary": "Convert 2D Vector file.", "tags": [ - "hidden" + "file" ] } }, - "/auth/email/callback": { - "get": { - "operationId": "auth_email_callback", + "/file/3d/conversion/{src_format}/{output_format}": { + "post": { + "description": "Convert a 3D file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_3d_conversion", "parameters": [ { - "description": "The URL to redirect back to after we have authenticated.", - "in": "query", - "name": "callback_url", - "schema": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "The user's email.", - "in": "query", - "name": "email", + "description": "The format the file should be converted to.", + "in": "path", + "name": "output_format", "required": true, "schema": { - "format": "email", - "type": "string" + "$ref": "#/components/schemas/File3DExportFormat" }, - "style": "form" + "style": "simple" }, { - "description": "The verification token.", - "in": "query", - "name": "token", + "description": "The format of the file to convert.", + "in": "path", + "name": "src_format", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/File3DImportFormat" }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, "responses": { - "302": { - "description": "Temporary Redirect", + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/File3DConversion" + } + } + }, + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -8025,14 +9262,6 @@ "type": "string" }, "style": "simple" - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" } } }, @@ -8043,37 +9272,60 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Listen for callbacks for email verification for users.", + "summary": "Convert 3D file.", "tags": [ - "hidden" + "file" ] } }, - "/constant/physics/{constant}": { - "get": { - "operationId": "get_physics_constant", + "/file/center-of-mass": { + "post": { + "description": "Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nDoes the same as the `center_of_mass_with_uniform_density` endpoint; except, this has a redundant `material_density value`. Kept for legacy in this version.\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": [ { - "description": "The constant to get.", - "in": "path", - "name": "constant", + "description": "The material density.", + "in": "query", + "name": "material_density", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + }, + { + "description": "The format of the file.", + "in": "query", + "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/PhysicsConstantName" + "$ref": "#/components/schemas/File3DImportFormat" }, - "style": "simple" + "style": "form" } ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PhysicsConstant" + "$ref": "#/components/schemas/FileCenterOfMass" } } }, - "description": "successful operation", + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -8116,35 +9368,25 @@ "$ref": "#/components/responses/Error" } }, - "summary": "Get a physics constant.", + "summary": "Get CAD file center of mass.", "tags": [ - "constant" + "file", + "beta" ] } }, - "/file/center-of-mass": { + "/file/center-of-mass-with-uniform-density": { "post": { "description": "Get 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", + "operationId": "create_file_center_of_mass_with_uniform_density", "parameters": [ - { - "description": "The material density.", - "in": "query", - "name": "material_density", - "required": true, - "schema": { - "format": "float", - "type": "number" - }, - "style": "form" - }, { "description": "The format of the file.", "in": "query", "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" }, "style": "form" } @@ -8165,7 +9407,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileCenterOfMass" + "$ref": "#/components/schemas/FileCenterOfMassWithUniformDensity" } } }, @@ -8230,7 +9472,7 @@ "name": "output_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileOutputFormat" + "$ref": "#/components/schemas/FileExportFormat" }, "style": "simple" }, @@ -8240,7 +9482,7 @@ "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/FileImportFormat" }, "style": "simple" } @@ -8410,7 +9652,7 @@ "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" }, "style": "form" } @@ -8602,7 +9844,7 @@ "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" }, "style": "form" } @@ -8688,7 +9930,7 @@ "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" }, "style": "form" } @@ -8774,7 +10016,7 @@ "name": "src_format", "required": true, "schema": { - "$ref": "#/components/schemas/FileSourceFormat" + "$ref": "#/components/schemas/File3DImportFormat" }, "style": "form" } @@ -11511,6 +12753,102 @@ ] } }, + "/unit/conversion/radioactivity/{src_format}/{output_format}": { + "get": { + "description": "Convert a radioactivity unit value to another radioactivity unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_radioactivity_unit_conversion", + "parameters": [ + { + "description": "The output format of the unit.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitRadioactivityFormat" + }, + "style": "simple" + }, + { + "description": "The source format of the unit.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitRadioactivityFormat" + }, + "style": "simple" + }, + { + "description": "The initial value.", + "in": "query", + "name": "value", + "required": true, + "schema": { + "format": "float", + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitRadioactivityConversion" + } + } + }, + "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": "Convert radioactivity units.", + "tags": [ + "unit", + "beta" + ] + } + }, "/unit/conversion/solid-angle/{src_format}/{output_format}": { "get": { "description": "Convert a solid angle unit value to another solid angle unit value. This is a nice endpoint to use for helper functions.", @@ -12992,6 +14330,133 @@ ] } }, + "/user/front-hash": { + "get": { + "description": "This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser", + "operationId": "get_user_front_hash_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "title": "String", + "type": "string" + } + } + }, + "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 your user's front verification hash.", + "tags": [ + "users", + "hidden" + ] + } + }, + "/user/onboarding": { + "get": { + "description": "Checks key part of their api usage to determine their onboarding progress", + "operationId": "get_user_onboarding_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Onboarding" + } + } + }, + "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 your user's onboarding status.", + "tags": [ + "users", + "hidden" + ] + } + }, "/user/payment": { "delete": { "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", @@ -14215,6 +15680,13 @@ } }, "tags": [ + { + "description": "AI uses machine learning to generate 3D meshes.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/ai" + }, + "name": "ai" + }, { "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", "externalDocs": { From 27c101477203a3b1bb4856bd24a2725f1538b6c2 Mon Sep 17 00:00:00 2001 From: Adam Sunderland Date: Fri, 20 Jan 2023 11:55:00 -0500 Subject: [PATCH 2/3] Fixup client and gen --- kittycad.rs.patch.json | 140 +++- kittycad/src/ai.rs | 90 ++ kittycad/src/api_calls.rs | 23 +- kittycad/src/api_tokens.rs | 6 +- kittycad/src/constant.rs | 8 +- kittycad/src/file.rs | 233 +++++- kittycad/src/hidden.rs | 7 +- kittycad/src/lib.rs | 11 + kittycad/src/oauth2.rs | 7 +- kittycad/src/tests.rs | 12 +- kittycad/src/types.rs | 1576 +++++++++++++++++++++++++++-------- kittycad/src/unit.rs | 212 ++--- kittycad/src/users.rs | 66 +- openapitor/src/functions.rs | 30 +- openapitor/src/types/mod.rs | 7 +- 15 files changed, 1832 insertions(+), 596 deletions(-) create mode 100644 kittycad/src/ai.rs diff --git a/kittycad.rs.patch.json b/kittycad.rs.patch.json index 9f77f9a6..d8a79fba 100644 --- a/kittycad.rs.patch.json +++ b/kittycad.rs.patch.json @@ -23,6 +23,22 @@ "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.get_metadata" } }, + { + "op": "add", + "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-rust", + "value": { + "example": "/// Generate a 3D model from an image.\n/// \n/// **Parameters:**\n/// \n/// - `input_format: crate::types::ImageType`: The format of the image being converted. (required)\n/// - `output_format: crate::types::FileExportFormat`: The format the output file should be converted to. (required)\nasync fn example_ai_create_image_to_3d() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Mesh = client\n .ai()\n .create_image_to_3d(\n kittycad::types::ImageType::Jpg,\n kittycad::types::FileExportFormat::ObjNomtl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.create_image_to_3d" + } + }, + { + "op": "add", + "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-rust", + "value": { + "example": "/// Generate a 3D model from text.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::FileExportFormat`: The format the output file should be converted to. (required)\n/// - `prompt: &'astr`: The prompt for the model. (required)\nasync fn example_ai_create_text_to_3d() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Mesh = client\n .ai()\n .create_text_to_3d(kittycad::types::FileExportFormat::Ply, \"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.create_text_to_3d" + } + }, { "op": "add", "path": "/paths/~1api-call-metrics/get/x-rust", @@ -35,7 +51,7 @@ "op": "add", "path": "/paths/~1api-calls/get/x-rust", "value": { - "example": "/// List API calls.\n/// \n/// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API calls.\n/// \n/// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list" } }, @@ -75,7 +91,7 @@ "op": "add", "path": "/paths/~1async~1operations/get/x-rust", "value": { - "example": "/// List async operations.\n/// \n/// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n/// This endpoint requires authentication by a KittyCAD employee.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\n/// - `status: Option`: The status to filter by.\nasync fn example_api_calls_list_async_operations() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AsyncApiCallResultsPage = client\n .api_calls()\n .list_async_operations(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Completed),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Completed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List async operations.\n/// \n/// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n/// This endpoint requires authentication by a KittyCAD employee.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\n/// - `status: Option`: The status to filter by.\nasync fn example_api_calls_list_async_operations() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AsyncApiCallResultsPage = client\n .api_calls()\n .list_async_operations(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Failed),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_async_operations" } }, @@ -107,23 +123,47 @@ "op": "add", "path": "/paths/~1constant~1physics~1{constant}/get/x-rust", "value": { - "example": "/// Get a physics constant.\n/// \n/// **Parameters:**\n/// \n/// - `constant: crate::types::PhysicsConstantName`: The constant to get. (required)\nasync fn example_constant_get_physics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PhysicsConstant = client\n .constant()\n .get_physics(kittycad::types::PhysicsConstantName::MolarGasConst)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get a physics constant.\n/// \n/// **Parameters:**\n/// \n/// - `constant: crate::types::PhysicsConstantName`: The constant to get. (required)\nasync fn example_constant_get_physics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PhysicsConstant = client\n .constant()\n .get_physics(kittycad::types::PhysicsConstantName::ME)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/constant/struct.Constant.html#method.get_physics" } }, + { + "op": "add", + "path": "/paths/~1file~12d~1vector~1conversion~1{src_format}~1{output_format}/post/x-rust", + "value": { + "example": "/// Convert 2D Vector file.\n/// \n/// Convert a 2D Vector file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\n/// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::File2DVectorExportFormat`: The format the file should be converted to. (required)\n/// - `src_format: crate::types::File2DVectorImportFormat`: The format of the file to convert. (required)\nasync fn example_file_create_2d_vector_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::File2DVectorConversion = client\n .file()\n .create_2d_vector_conversion(\n kittycad::types::File2DVectorExportFormat::Json,\n kittycad::types::File2DVectorImportFormat::Svg,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_2d_vector_conversion" + } + }, + { + "op": "add", + "path": "/paths/~1file~13d~1conversion~1{src_format}~1{output_format}/post/x-rust", + "value": { + "example": "/// Convert 3D file.\n/// \n/// Convert a 3D file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\n/// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::File3DExportFormat`: The format the file should be converted to. (required)\n/// - `src_format: crate::types::File3DImportFormat`: The format of the file to convert. (required)\nasync fn example_file_create_3d_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::File3DConversion = client\n .file()\n .create_3d_conversion(\n kittycad::types::File3DExportFormat::Obj,\n kittycad::types::File3DImportFormat::ObjNomtl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_3d_conversion" + } + }, { "op": "add", "path": "/paths/~1file~1center-of-mass/post/x-rust", "value": { - "example": "/// Get CAD file center of mass.\n/// \n/// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `material_density: f64`: The material density. (required)\n/// - `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\nasync fn example_file_create_center_of_mass() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileCenterOfMass = client\n .file()\n .create_center_of_mass(\n 3.14 as f64,\n kittycad::types::FileSourceFormat::Stl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get CAD file center of mass.\n/// \n/// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// Does the same as the `center_of_mass_with_uniform_density` endpoint; except, this has a redundant `material_density value`. Kept for legacy in this version.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `material_density: f64`: The material density. (required)\n/// - `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\nasync fn example_file_create_center_of_mass() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileCenterOfMass = client\n .file()\n .create_center_of_mass(\n 3.14 as f64,\n kittycad::types::File3DImportFormat::Step,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_center_of_mass" } }, + { + "op": "add", + "path": "/paths/~1file~1center-of-mass-with-uniform-density/post/x-rust", + "value": { + "example": "/// Get CAD file center of mass.\n/// \n/// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\nasync fn example_file_create_center_of_mass_with_uniform_density() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileCenterOfMassWithUniformDensity = client\n .file()\n .create_center_of_mass_with_uniform_density(\n kittycad::types::File3DImportFormat::ObjNomtl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_center_of_mass_with_uniform_density" + } + }, { "op": "add", "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-rust", "value": { - "example": "/// Convert CAD file.\n/// \n/// Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\n/// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::FileOutputFormat`: The format the file should be converted to. (required)\n/// - `src_format: crate::types::FileSourceFormat`: The format of the file to convert. (required)\nasync fn example_file_create_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileConversion = client\n .file()\n .create_conversion(\n kittycad::types::FileOutputFormat::Step,\n kittycad::types::FileSourceFormat::Dae,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert CAD file.\n/// \n/// Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\n/// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::FileExportFormat`: The format the file should be converted to. (required)\n/// - `src_format: crate::types::FileImportFormat`: The format of the file to convert. (required)\nasync fn example_file_create_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileConversion = client\n .file()\n .create_conversion(\n kittycad::types::FileExportFormat::Svg,\n kittycad::types::FileImportFormat::Ply,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_conversion" } }, @@ -139,7 +179,7 @@ "op": "add", "path": "/paths/~1file~1density/post/x-rust", "value": { - "example": "/// Get CAD file density.\n/// \n/// Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `material_mass: f64`: The material mass. (required)\n/// - `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\nasync fn example_file_create_density() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileDensity = client\n .file()\n .create_density(\n 3.14 as f64,\n kittycad::types::FileSourceFormat::Fbx,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get CAD file density.\n/// \n/// Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `material_mass: f64`: The material mass. (required)\n/// - `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\nasync fn example_file_create_density() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileDensity = client\n .file()\n .create_density(\n 3.14 as f64,\n kittycad::types::File3DImportFormat::Fbx,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_density" } }, @@ -147,7 +187,7 @@ "op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-rust", "value": { - "example": "/// Execute a KittyCAD program in a specific language.\n/// \n/// **Parameters:**\n/// \n/// - `lang: crate::types::CodeLanguage`: The language of the code. (required)\n/// - `output: Option`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\nasync fn example_file_create_execution() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CodeOutput = client\n .file()\n .create_execution(\n kittycad::types::CodeLanguage::Node,\n Some(\"some-string\".to_string()),\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Execute a KittyCAD program in a specific language.\n/// \n/// **Parameters:**\n/// \n/// - `lang: crate::types::CodeLanguage`: The language of the code. (required)\n/// - `output: Option`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\nasync fn example_file_create_execution() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CodeOutput = client\n .file()\n .create_execution(\n kittycad::types::CodeLanguage::Go,\n Some(\"some-string\".to_string()),\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_execution" } }, @@ -155,7 +195,7 @@ "op": "add", "path": "/paths/~1file~1mass/post/x-rust", "value": { - "example": "/// Get CAD file mass.\n/// \n/// Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `material_density: f64`: The material density. (required)\n/// - `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\nasync fn example_file_create_mass() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileMass = client\n .file()\n .create_mass(\n 3.14 as f64,\n kittycad::types::FileSourceFormat::Stl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get CAD file mass.\n/// \n/// Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `material_density: f64`: The material density. (required)\n/// - `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\nasync fn example_file_create_mass() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileMass = client\n .file()\n .create_mass(\n 3.14 as f64,\n kittycad::types::File3DImportFormat::ObjZip,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_mass" } }, @@ -163,7 +203,7 @@ "op": "add", "path": "/paths/~1file~1surface-area/post/x-rust", "value": { - "example": "/// Get CAD file surface area.\n/// \n/// Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\nasync fn example_file_create_surface_area() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileSurfaceArea = client\n .file()\n .create_surface_area(\n kittycad::types::FileSourceFormat::Fbx,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get CAD file surface area.\n/// \n/// Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\nasync fn example_file_create_surface_area() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileSurfaceArea = client\n .file()\n .create_surface_area(\n kittycad::types::File3DImportFormat::Stl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_surface_area" } }, @@ -171,7 +211,7 @@ "op": "add", "path": "/paths/~1file~1volume/post/x-rust", "value": { - "example": "/// Get CAD file volume.\n/// \n/// Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\nasync fn example_file_create_volume() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileVolume = client\n .file()\n .create_volume(\n kittycad::types::FileSourceFormat::Obj,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get CAD file volume.\n/// \n/// Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\nasync fn example_file_create_volume() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileVolume = client\n .file()\n .create_volume(\n kittycad::types::File3DImportFormat::Step,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_volume" } }, @@ -251,7 +291,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1angle~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert angle units.\n/// \n/// Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitAngleFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitAngleFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_angle_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngleConversion = client\n .unit()\n .get_angle_conversion(\n kittycad::types::UnitAngleFormat::Arcsecond,\n kittycad::types::UnitAngleFormat::Arcsecond,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert angle units.\n/// \n/// Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitAngleFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitAngleFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_angle_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngleConversion = client\n .unit()\n .get_angle_conversion(\n kittycad::types::UnitAngleFormat::Degree,\n kittycad::types::UnitAngleFormat::Arcminute,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_angle_conversion" } }, @@ -259,7 +299,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1angular-velocity~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert angular velocity units.\n/// \n/// Convert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitAngularVelocityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitAngularVelocityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_angular_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngularVelocityConversion = client\n .unit()\n .get_angular_velocity_conversion(\n kittycad::types::UnitAngularVelocityFormat::MilliarcsecondsPerYear,\n kittycad::types::UnitAngularVelocityFormat::DegreesPerSecond,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert angular velocity units.\n/// \n/// Convert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitAngularVelocityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitAngularVelocityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_angular_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngularVelocityConversion = client\n .unit()\n .get_angular_velocity_conversion(\n kittycad::types::UnitAngularVelocityFormat::RevolutionsPerMinute,\n kittycad::types::UnitAngularVelocityFormat::RevolutionsPerMinute,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_angular_velocity_conversion" } }, @@ -267,7 +307,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1area~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert area units.\n/// \n/// Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitAreaFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitAreaFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_area_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAreaConversion = client\n .unit()\n .get_area_conversion(\n kittycad::types::UnitAreaFormat::SquareMile,\n kittycad::types::UnitAreaFormat::Hectare,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert area units.\n/// \n/// Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitAreaFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitAreaFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_area_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAreaConversion = client\n .unit()\n .get_area_conversion(\n kittycad::types::UnitAreaFormat::Hectare,\n kittycad::types::UnitAreaFormat::SquareKilometer,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_area_conversion" } }, @@ -275,7 +315,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1charge~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert charge units.\n/// \n/// Convert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitChargeFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitChargeFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_charge_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitChargeConversion = client\n .unit()\n .get_charge_conversion(\n kittycad::types::UnitChargeFormat::AmpereHour,\n kittycad::types::UnitChargeFormat::AmpereHour,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert charge units.\n/// \n/// Convert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitChargeFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitChargeFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_charge_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitChargeConversion = client\n .unit()\n .get_charge_conversion(\n kittycad::types::UnitChargeFormat::AmpereHour,\n kittycad::types::UnitChargeFormat::Coulomb,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_charge_conversion" } }, @@ -283,7 +323,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1concentration~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert concentration units.\n/// \n/// Convert a concentration unit value to another concentration unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitConcentrationFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitConcentrationFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_concentration_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitConcentrationConversion = client\n .unit()\n .get_concentration_conversion(\n kittycad::types::UnitConcentrationFormat::Percent,\n kittycad::types::UnitConcentrationFormat::PartsPerTrillion,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert concentration units.\n/// \n/// Convert a concentration unit value to another concentration unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitConcentrationFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitConcentrationFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_concentration_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitConcentrationConversion = client\n .unit()\n .get_concentration_conversion(\n kittycad::types::UnitConcentrationFormat::PartsPerTrillion,\n kittycad::types::UnitConcentrationFormat::Percent,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_concentration_conversion" } }, @@ -299,7 +339,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1data~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert data units.\n/// \n/// Convert a data unit value to another data unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitDataFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitDataFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_data_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDataConversion = client\n .unit()\n .get_data_conversion(\n kittycad::types::UnitDataFormat::Exabyte,\n kittycad::types::UnitDataFormat::Bit,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert data units.\n/// \n/// Convert a data unit value to another data unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitDataFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitDataFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_data_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDataConversion = client\n .unit()\n .get_data_conversion(\n kittycad::types::UnitDataFormat::Exabit,\n kittycad::types::UnitDataFormat::Exabit,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_data_conversion" } }, @@ -307,7 +347,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1density~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert density units.\n/// \n/// Convert a density unit value to another density unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitDensityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitDensityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_density_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDensityConversion = client\n .unit()\n .get_density_conversion(\n kittycad::types::UnitDensityFormat::KilogramsPerLiter,\n kittycad::types::UnitDensityFormat::KilogramsPerLiter,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert density units.\n/// \n/// Convert a density unit value to another density unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitDensityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitDensityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_density_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDensityConversion = client\n .unit()\n .get_density_conversion(\n kittycad::types::UnitDensityFormat::GramsPerMilliliter,\n kittycad::types::UnitDensityFormat::OuncesPerGallon,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_density_conversion" } }, @@ -315,7 +355,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1energy~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert energy units.\n/// \n/// Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitEnergyFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitEnergyFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_energy_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitEnergyConversion = client\n .unit()\n .get_energy_conversion(\n kittycad::types::UnitEnergyFormat::BritishThermalUnitIso,\n kittycad::types::UnitEnergyFormat::BritishThermalUnit59,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert energy units.\n/// \n/// Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitEnergyFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitEnergyFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_energy_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitEnergyConversion = client\n .unit()\n .get_energy_conversion(\n kittycad::types::UnitEnergyFormat::Calorie,\n kittycad::types::UnitEnergyFormat::FootPound,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_energy_conversion" } }, @@ -323,7 +363,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1force~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert force units.\n/// \n/// Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitForceFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitForceFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_force_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitForceConversion = client\n .unit()\n .get_force_conversion(\n kittycad::types::UnitForceFormat::Newton,\n kittycad::types::UnitForceFormat::Kilopound,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert force units.\n/// \n/// Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitForceFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitForceFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_force_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitForceConversion = client\n .unit()\n .get_force_conversion(\n kittycad::types::UnitForceFormat::Newton,\n kittycad::types::UnitForceFormat::Dyne,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_force_conversion" } }, @@ -331,7 +371,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1illuminance~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert illuminance units.\n/// \n/// Convert a illuminance unit value to another illuminance unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitIlluminanceFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitIlluminanceFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_illuminance_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitIlluminanceConversion = client\n .unit()\n .get_illuminance_conversion(\n kittycad::types::UnitIlluminanceFormat::Footcandle,\n kittycad::types::UnitIlluminanceFormat::Footcandle,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert illuminance units.\n/// \n/// Convert a illuminance unit value to another illuminance unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitIlluminanceFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitIlluminanceFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_illuminance_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitIlluminanceConversion = client\n .unit()\n .get_illuminance_conversion(\n kittycad::types::UnitIlluminanceFormat::LumensPerSquareInch,\n kittycad::types::UnitIlluminanceFormat::LumensPerSquareInch,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_illuminance_conversion" } }, @@ -339,7 +379,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1length~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert length units.\n/// \n/// Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitLengthFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitLengthFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_length_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitLengthConversion = client\n .unit()\n .get_length_conversion(\n kittycad::types::UnitLengthFormat::Yard,\n kittycad::types::UnitLengthFormat::Yard,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert length units.\n/// \n/// Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitLengthFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitLengthFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_length_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitLengthConversion = client\n .unit()\n .get_length_conversion(\n kittycad::types::UnitLengthFormat::Chain,\n kittycad::types::UnitLengthFormat::Hand,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_length_conversion" } }, @@ -347,7 +387,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1magnetic-field-strength~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert magnetic field strength units.\n/// \n/// Convert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMagneticFieldStrengthFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMagneticFieldStrengthFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_magnetic_field_strength_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMagneticFieldStrengthConversion = client\n .unit()\n .get_magnetic_field_strength_conversion(\n kittycad::types::UnitMagneticFieldStrengthFormat::Tesla,\n kittycad::types::UnitMagneticFieldStrengthFormat::Gauss,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert magnetic field strength units.\n/// \n/// Convert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMagneticFieldStrengthFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMagneticFieldStrengthFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_magnetic_field_strength_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMagneticFieldStrengthConversion = client\n .unit()\n .get_magnetic_field_strength_conversion(\n kittycad::types::UnitMagneticFieldStrengthFormat::Gauss,\n kittycad::types::UnitMagneticFieldStrengthFormat::Gauss,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_magnetic_field_strength_conversion" } }, @@ -355,7 +395,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1magnetic-flux~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert magnetic flux units.\n/// \n/// Convert a magnetic flux unit value to another magnetic flux unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMagneticFluxFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMagneticFluxFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_magnetic_flux_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMagneticFluxConversion = client\n .unit()\n .get_magnetic_flux_conversion(\n kittycad::types::UnitMagneticFluxFormat::Maxwell,\n kittycad::types::UnitMagneticFluxFormat::Maxwell,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert magnetic flux units.\n/// \n/// Convert a magnetic flux unit value to another magnetic flux unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMagneticFluxFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMagneticFluxFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_magnetic_flux_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMagneticFluxConversion = client\n .unit()\n .get_magnetic_flux_conversion(\n kittycad::types::UnitMagneticFluxFormat::Weber,\n kittycad::types::UnitMagneticFluxFormat::Weber,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_magnetic_flux_conversion" } }, @@ -363,7 +403,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1mass~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert mass units.\n/// \n/// Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMassFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMassFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_mass_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMassConversion = client\n .unit()\n .get_mass_conversion(\n kittycad::types::UnitMassFormat::Carat,\n kittycad::types::UnitMassFormat::Gram,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert mass units.\n/// \n/// Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMassFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMassFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_mass_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMassConversion = client\n .unit()\n .get_mass_conversion(\n kittycad::types::UnitMassFormat::ShortTon,\n kittycad::types::UnitMassFormat::Slug,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_mass_conversion" } }, @@ -371,7 +411,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1metric~1cubed~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert metric cubed units.\n/// \n/// Convert a metric cubed unit value to another metric cubed unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_metric_power_cubed_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerCubedConversion = client\n .unit()\n .get_metric_power_cubed_conversion(\n kittycad::types::UnitMetricPower::Deci,\n kittycad::types::UnitMetricPower::Peta,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert metric cubed units.\n/// \n/// Convert a metric cubed unit value to another metric cubed unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_metric_power_cubed_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerCubedConversion = client\n .unit()\n .get_metric_power_cubed_conversion(\n kittycad::types::UnitMetricPower::Exa,\n kittycad::types::UnitMetricPower::Hecto,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_metric_power_cubed_conversion" } }, @@ -379,7 +419,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1metric~1power~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert metric units.\n/// \n/// Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_metric_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerConversion = client\n .unit()\n .get_metric_power_conversion(\n kittycad::types::UnitMetricPower::Deci,\n kittycad::types::UnitMetricPower::Femto,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert metric units.\n/// \n/// Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_metric_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerConversion = client\n .unit()\n .get_metric_power_conversion(\n kittycad::types::UnitMetricPower::Peta,\n kittycad::types::UnitMetricPower::Atto,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_metric_power_conversion" } }, @@ -387,7 +427,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1metric~1squared~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert metric squared units.\n/// \n/// Convert a metric squared unit value to another metric squared unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_metric_power_squared_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerSquaredConversion = client\n .unit()\n .get_metric_power_squared_conversion(\n kittycad::types::UnitMetricPower::Nano,\n kittycad::types::UnitMetricPower::MetricUnit,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert metric squared units.\n/// \n/// Convert a metric squared unit value to another metric squared unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_metric_power_squared_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerSquaredConversion = client\n .unit()\n .get_metric_power_squared_conversion(\n kittycad::types::UnitMetricPower::Kilo,\n kittycad::types::UnitMetricPower::Kilo,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_metric_power_squared_conversion" } }, @@ -395,7 +435,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1power~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert power units.\n/// \n/// Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitPowerFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitPowerFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPowerConversion = client\n .unit()\n .get_power_conversion(\n kittycad::types::UnitPowerFormat::Horsepower,\n kittycad::types::UnitPowerFormat::Watt,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert power units.\n/// \n/// Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitPowerFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitPowerFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPowerConversion = client\n .unit()\n .get_power_conversion(\n kittycad::types::UnitPowerFormat::Horsepower,\n kittycad::types::UnitPowerFormat::Horsepower,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_power_conversion" } }, @@ -403,7 +443,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1pressure~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert pressure units.\n/// \n/// Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitPressureFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitPressureFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_pressure_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPressureConversion = client\n .unit()\n .get_pressure_conversion(\n kittycad::types::UnitPressureFormat::PoundsPerSquareInch,\n kittycad::types::UnitPressureFormat::Bar,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert pressure units.\n/// \n/// Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitPressureFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitPressureFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_pressure_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPressureConversion = client\n .unit()\n .get_pressure_conversion(\n kittycad::types::UnitPressureFormat::Bar,\n kittycad::types::UnitPressureFormat::Mbar,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_pressure_conversion" } }, @@ -411,10 +451,18 @@ "op": "add", "path": "/paths/~1unit~1conversion~1radiation~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert radiation units.\n/// \n/// Convert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitRadiationFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitRadiationFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_radiation_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitRadiationConversion = client\n .unit()\n .get_radiation_conversion(\n kittycad::types::UnitRadiationFormat::Sievert,\n kittycad::types::UnitRadiationFormat::Gray,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert radiation units.\n/// \n/// Convert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitRadiationFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitRadiationFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_radiation_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitRadiationConversion = client\n .unit()\n .get_radiation_conversion(\n kittycad::types::UnitRadiationFormat::Sievert,\n kittycad::types::UnitRadiationFormat::Rad,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_radiation_conversion" } }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1radioactivity~1{src_format}~1{output_format}/get/x-rust", + "value": { + "example": "/// Convert radioactivity units.\n/// \n/// Convert a radioactivity unit value to another radioactivity unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitRadioactivityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitRadioactivityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_radioactivity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitRadioactivityConversion = client\n .unit()\n .get_radioactivity_conversion(\n kittycad::types::UnitRadioactivityFormat::Rutherford,\n kittycad::types::UnitRadioactivityFormat::Rutherford,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_radioactivity_conversion" + } + }, { "op": "add", "path": "/paths/~1unit~1conversion~1solid-angle~1{src_format}~1{output_format}/get/x-rust", @@ -427,7 +475,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1temperature~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert temperature units.\n/// \n/// Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitTemperatureFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitTemperatureFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_temperature_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitTemperatureConversion = client\n .unit()\n .get_temperature_conversion(\n kittycad::types::UnitTemperatureFormat::Kelvin,\n kittycad::types::UnitTemperatureFormat::Kelvin,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert temperature units.\n/// \n/// Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitTemperatureFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitTemperatureFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_temperature_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitTemperatureConversion = client\n .unit()\n .get_temperature_conversion(\n kittycad::types::UnitTemperatureFormat::Kelvin,\n kittycad::types::UnitTemperatureFormat::Celsius,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_temperature_conversion" } }, @@ -435,7 +483,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1time~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert time units.\n/// \n/// Convert a time unit value to another time unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitTimeFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitTimeFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_time_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitTimeConversion = client\n .unit()\n .get_time_conversion(\n kittycad::types::UnitTimeFormat::Second,\n kittycad::types::UnitTimeFormat::Minute,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert time units.\n/// \n/// Convert a time unit value to another time unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitTimeFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitTimeFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_time_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitTimeConversion = client\n .unit()\n .get_time_conversion(\n kittycad::types::UnitTimeFormat::Week,\n kittycad::types::UnitTimeFormat::Day,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_time_conversion" } }, @@ -443,7 +491,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1velocity~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert velocity units.\n/// \n/// Convert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitVelocityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitVelocityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVelocityConversion = client\n .unit()\n .get_velocity_conversion(\n kittycad::types::UnitVelocityFormat::Knot,\n kittycad::types::UnitVelocityFormat::MetersPerSecond,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert velocity units.\n/// \n/// Convert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitVelocityFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitVelocityFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVelocityConversion = client\n .unit()\n .get_velocity_conversion(\n kittycad::types::UnitVelocityFormat::FeetPerSecond,\n kittycad::types::UnitVelocityFormat::Knot,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_velocity_conversion" } }, @@ -451,7 +499,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1voltage~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert voltage units.\n/// \n/// Convert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitVoltageFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitVoltageFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_voltage_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVoltageConversion = client\n .unit()\n .get_voltage_conversion(\n kittycad::types::UnitVoltageFormat::Abvolt,\n kittycad::types::UnitVoltageFormat::Statvolt,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert voltage units.\n/// \n/// Convert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitVoltageFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitVoltageFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_voltage_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVoltageConversion = client\n .unit()\n .get_voltage_conversion(\n kittycad::types::UnitVoltageFormat::Statvolt,\n kittycad::types::UnitVoltageFormat::Statvolt,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_voltage_conversion" } }, @@ -459,7 +507,7 @@ "op": "add", "path": "/paths/~1unit~1conversion~1volume~1{src_format}~1{output_format}/get/x-rust", "value": { - "example": "/// Convert volume units.\n/// \n/// Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitVolumeFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitVolumeFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_volume_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVolumeConversion = client\n .unit()\n .get_volume_conversion(\n kittycad::types::UnitVolumeFormat::CubicMillimeter,\n kittycad::types::UnitVolumeFormat::CubicFoot,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Convert volume units.\n/// \n/// Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.\n/// \n/// **Parameters:**\n/// \n/// - `output_format: crate::types::UnitVolumeFormat`: The output format of the unit. (required)\n/// - `src_format: crate::types::UnitVolumeFormat`: The source format of the unit. (required)\n/// - `value: f64`: The initial value. (required)\nasync fn example_unit_get_volume_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVolumeConversion = client\n .unit()\n .get_volume_conversion(\n kittycad::types::UnitVolumeFormat::Sack,\n kittycad::types::UnitVolumeFormat::FluidOunce,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.get_volume_conversion" } }, @@ -491,7 +539,7 @@ "op": "add", "path": "/paths/~1user~1api-calls/get/x-rust", "value": { - "example": "/// List API calls for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n/// The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_user_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .user_list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API calls for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n/// The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_user_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .user_list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.user_list" } }, @@ -507,7 +555,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens/get/x-rust", "value": { - "example": "/// List API tokens for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n/// The API tokens are returned in order of creation, with the most recently created API tokens first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_tokens_list_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiTokenResultsPage = client\n .api_tokens()\n .list_for_user(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API tokens for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n/// The API tokens are returned in order of creation, with the most recently created API tokens first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_tokens_list_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiTokenResultsPage = client\n .api_tokens()\n .list_for_user(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.list_for_user" } }, @@ -551,6 +599,22 @@ "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.get_conversion_for_user" } }, + { + "op": "add", + "path": "/paths/~1user~1front-hash/get/x-rust", + "value": { + "example": "/// Get your user's front verification hash.\n/// \n/// This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser\nasync fn example_users_get_front_hash_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: String = client.users().get_front_hash_self().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_front_hash_self" + } + }, + { + "op": "add", + "path": "/paths/~1user~1onboarding/get/x-rust", + "value": { + "example": "/// Get your user's onboarding status.\n/// \n/// Checks key part of their api usage to determine their onboarding progress\nasync fn example_users_get_onboarding_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Onboarding = client.users().get_onboarding_self().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_onboarding_self" + } + }, { "op": "add", "path": "/paths/~1user~1payment/delete/x-rust", @@ -643,7 +707,7 @@ "op": "add", "path": "/paths/~1users-extended/get/x-rust", "value": { - "example": "/// List users with extended information.\n/// \n/// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_users_list_extended() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ExtendedUserResultsPage = client\n .users()\n .list_extended(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List users with extended information.\n/// \n/// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_users_list_extended() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ExtendedUserResultsPage = client\n .users()\n .list_extended(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.list_extended" } }, diff --git a/kittycad/src/ai.rs b/kittycad/src/ai.rs new file mode 100644 index 00000000..a6259c23 --- /dev/null +++ b/kittycad/src/ai.rs @@ -0,0 +1,90 @@ +use anyhow::Result; + +use crate::Client; +#[derive(Clone, Debug)] +pub struct Ai { + pub client: Client, +} + +impl Ai { + #[doc(hidden)] + pub fn new(client: Client) -> Self { + Self { client } + } + + #[doc = "Generate a 3D model from an image.\n\n**Parameters:**\n\n- `input_format: crate::types::ImageType`: The format of the image being converted. (required)\n- `output_format: crate::types::FileExportFormat`: The format the output file should be converted to. (required)\n\n```rust,no_run\nasync fn example_ai_create_image_to_3d() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Mesh = client\n .ai()\n .create_image_to_3d(\n kittycad::types::ImageType::Jpg,\n kittycad::types::FileExportFormat::ObjNomtl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn create_image_to_3d<'a>( + &'a self, + input_format: crate::types::ImageType, + output_format: crate::types::FileExportFormat, + body: &bytes::Bytes, + ) -> Result { + let mut req = self.client.client.request( + http::Method::POST, + &format!( + "{}/{}", + self.client.base_url, + "ai/image-to-3d/{input_format}/{output_format}" + .replace("{input_format}", &format!("{}", input_format)) + .replace("{output_format}", &format!("{}", output_format)) + ), + ); + req = req.bearer_auth(&self.client.token); + req = req.body(body.clone()); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + + #[doc = "Generate a 3D model from text.\n\n**Parameters:**\n\n- `output_format: \ + crate::types::FileExportFormat`: The format the output file should be converted to. \ + (required)\n- `prompt: &'astr`: The prompt for the model. \ + (required)\n\n```rust,no_run\nasync fn example_ai_create_text_to_3d() -> \ + anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ + result: kittycad::types::Mesh = client\n .ai()\n \ + .create_text_to_3d(kittycad::types::FileExportFormat::Ply, \"some-string\")\n \ + .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn create_text_to_3d<'a>( + &'a self, + output_format: crate::types::FileExportFormat, + prompt: &'a str, + ) -> Result { + let mut req = self.client.client.request( + http::Method::POST, + &format!( + "{}/{}", + self.client.base_url, + "ai/text-to-3d/{output_format}" + .replace("{output_format}", &format!("{}", output_format)) + ), + ); + req = req.bearer_auth(&self.client.token); + let query_params = vec![("prompt", prompt.to_string())]; + req = req.query(&query_params); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } +} diff --git a/kittycad/src/api_calls.rs b/kittycad/src/api_calls.rs index 45245877..38937a07 100644 --- a/kittycad/src/api_calls.rs +++ b/kittycad/src/api_calls.rs @@ -23,8 +23,7 @@ impl ApiCalls { &format!("{}/{}", self.client.base_url, "api-call-metrics"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("group_by", format!("{}", group_by))); + let query_params = vec![("group_by", format!("{}", group_by))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -41,7 +40,7 @@ impl ApiCalls { } } - #[doc = "List API calls.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list<'a>( &'a self, @@ -54,7 +53,7 @@ impl ApiCalls { &format!("{}/{}", self.client.base_url, "api-calls"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } @@ -83,7 +82,7 @@ impl ApiCalls { } } - #[doc = "List API calls.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub fn list_stream<'a>( &'a self, @@ -175,7 +174,7 @@ impl ApiCalls { } } - #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Completed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_async_operations<'a>( &'a self, @@ -189,7 +188,7 @@ impl ApiCalls { &format!("{}/{}", self.client.base_url, "async/operations"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } @@ -222,7 +221,7 @@ impl ApiCalls { } } - #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Completed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub fn list_async_operations_stream<'a>( &'a self, @@ -324,7 +323,7 @@ impl ApiCalls { } } - #[doc = "List API calls for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn user_list<'a>( &'a self, @@ -337,7 +336,7 @@ impl ApiCalls { &format!("{}/{}", self.client.base_url, "user/api-calls"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } @@ -366,7 +365,7 @@ impl ApiCalls { } } - #[doc = "List API calls for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub fn user_list_stream<'a>( &'a self, @@ -483,7 +482,7 @@ impl ApiCalls { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } diff --git a/kittycad/src/api_tokens.rs b/kittycad/src/api_tokens.rs index b431c554..97622450 100644 --- a/kittycad/src/api_tokens.rs +++ b/kittycad/src/api_tokens.rs @@ -12,7 +12,7 @@ impl ApiTokens { Self { client } } - #[doc = "List API tokens for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API tokens for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_for_user<'a>( &'a self, @@ -25,7 +25,7 @@ impl ApiTokens { &format!("{}/{}", self.client.base_url, "user/api-tokens"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } @@ -54,7 +54,7 @@ impl ApiTokens { } } - #[doc = "List API tokens for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API tokens for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub fn list_for_user_stream<'a>( &'a self, diff --git a/kittycad/src/constant.rs b/kittycad/src/constant.rs index a242b3c3..6912da70 100644 --- a/kittycad/src/constant.rs +++ b/kittycad/src/constant.rs @@ -12,7 +12,13 @@ impl Constant { Self { client } } - #[doc = "Get a physics constant.\n\n**Parameters:**\n\n- `constant: crate::types::PhysicsConstantName`: The constant to get. (required)\n\n```rust,no_run\nasync fn example_constant_get_physics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PhysicsConstant = client\n .constant()\n .get_physics(kittycad::types::PhysicsConstantName::MolarGasConst)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get a physics constant.\n\n**Parameters:**\n\n- `constant: \ + crate::types::PhysicsConstantName`: The constant to get. \ + (required)\n\n```rust,no_run\nasync fn example_constant_get_physics() -> \ + anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ + result: kittycad::types::PhysicsConstant = client\n .constant()\n \ + .get_physics(kittycad::types::PhysicsConstantName::ME)\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_physics<'a>( &'a self, diff --git a/kittycad/src/file.rs b/kittycad/src/file.rs index 1871f049..d6d7ab06 100644 --- a/kittycad/src/file.rs +++ b/kittycad/src/file.rs @@ -12,25 +12,130 @@ impl File { Self { client } } + #[doc = "Convert 2D Vector file.\n\nConvert a 2D Vector file from one format to another. If \ + the file being converted is larger than 25MB, it will be performed \ + asynchronously.\nIf the conversion is performed synchronously, the contents of the \ + converted file (`output`) will be returned as a base64 encoded string.\nIf the \ + operation is performed asynchronously, the `id` of the operation will be returned. \ + You can use the `id` returned from the request to get status information about the \ + async operation from the `/async/operations/{id}` endpoint.\n\n**Parameters:**\n\n- \ + `output_format: crate::types::File2DVectorExportFormat`: The format the file should \ + be converted to. (required)\n- `src_format: crate::types::File2DVectorImportFormat`: \ + The format of the file to convert. (required)\n\n```rust,no_run\nasync fn \ + example_file_create_2d_vector_conversion() -> anyhow::Result<()> {\n let client = \ + kittycad::Client::new_from_env();\n let result: \ + kittycad::types::File2DVectorConversion = client\n .file()\n \ + .create_2d_vector_conversion(\n \ + kittycad::types::File2DVectorExportFormat::Json,\n \ + kittycad::types::File2DVectorImportFormat::Svg,\n \ + &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn create_2d_vector_conversion<'a>( + &'a self, + output_format: crate::types::File2DVectorExportFormat, + src_format: crate::types::File2DVectorImportFormat, + body: &bytes::Bytes, + ) -> Result { + let mut req = self.client.client.request( + http::Method::POST, + &format!( + "{}/{}", + self.client.base_url, + "file/2d/vector/conversion/{src_format}/{output_format}" + .replace("{output_format}", &format!("{}", output_format)) + .replace("{src_format}", &format!("{}", src_format)) + ), + ); + req = req.bearer_auth(&self.client.token); + req = req.body(body.clone()); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + + #[doc = "Convert 3D file.\n\nConvert a 3D file from one format to another. If the file being \ + converted is larger than 25MB, it will be performed asynchronously.\nIf the \ + conversion is performed synchronously, the contents of the converted file (`output`) \ + will be returned as a base64 encoded string.\nIf the operation is performed \ + asynchronously, the `id` of the operation will be returned. You can use the `id` \ + returned from the request to get status information about the async operation from \ + the `/async/operations/{id}` endpoint.\n\n**Parameters:**\n\n- `output_format: \ + crate::types::File3DExportFormat`: The format the file should be converted to. \ + (required)\n- `src_format: crate::types::File3DImportFormat`: The format of the file \ + to convert. (required)\n\n```rust,no_run\nasync fn \ + example_file_create_3d_conversion() -> anyhow::Result<()> {\n let client = \ + kittycad::Client::new_from_env();\n let result: kittycad::types::File3DConversion \ + = client\n .file()\n .create_3d_conversion(\n \ + kittycad::types::File3DExportFormat::Obj,\n \ + kittycad::types::File3DImportFormat::ObjNomtl,\n \ + &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn create_3d_conversion<'a>( + &'a self, + output_format: crate::types::File3DExportFormat, + src_format: crate::types::File3DImportFormat, + body: &bytes::Bytes, + ) -> Result { + let mut req = self.client.client.request( + http::Method::POST, + &format!( + "{}/{}", + self.client.base_url, + "file/3d/conversion/{src_format}/{output_format}" + .replace("{output_format}", &format!("{}", output_format)) + .replace("{src_format}", &format!("{}", src_format)) + ), + ); + req = req.bearer_auth(&self.client.token); + req = req.body(body.clone()); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + #[doc = "Get CAD file center of mass.\n\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.\n\n**Parameters:**\n\n- \ + the file is larger than 25MB, it will be performed asynchronously.\nDoes the same as \ + the `center_of_mass_with_uniform_density` endpoint; except, this has a redundant \ + `material_density value`. Kept for legacy in this version.\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.\n\n**Parameters:**\n\n- \ `material_density: f64`: The material density. (required)\n- `src_format: \ - crate::types::FileSourceFormat`: The format of the file. \ + crate::types::File3DImportFormat`: The format of the file. \ (required)\n\n```rust,no_run\nasync fn example_file_create_center_of_mass() -> \ anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ result: kittycad::types::FileCenterOfMass = client\n .file()\n \ .create_center_of_mass(\n 3.14 as f64,\n \ - kittycad::types::FileSourceFormat::Stl,\n \ + kittycad::types::File3DImportFormat::Step,\n \ &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_center_of_mass<'a>( &'a self, material_density: f64, - src_format: crate::types::FileSourceFormat, + src_format: crate::types::File3DImportFormat, body: &bytes::Bytes, ) -> Result { let mut req = self.client.client.request( @@ -38,9 +143,10 @@ impl File { &format!("{}/{}", self.client.base_url, "file/center-of-mass"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("material_density", format!("{}", material_density))); - query_params.push(("src_format", format!("{}", src_format))); + let query_params = vec![ + ("material_density", format!("{}", material_density)), + ("src_format", format!("{}", src_format)), + ]; req = req.query(&query_params); req = req.body(body.clone()); let resp = req.send().await?; @@ -58,12 +164,60 @@ impl File { } } - #[doc = "Convert CAD file.\n\nConvert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n\n**Parameters:**\n\n- `output_format: crate::types::FileOutputFormat`: The format the file should be converted to. (required)\n- `src_format: crate::types::FileSourceFormat`: The format of the file to convert. (required)\n\n```rust,no_run\nasync fn example_file_create_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileConversion = client\n .file()\n .create_conversion(\n kittycad::types::FileOutputFormat::Step,\n kittycad::types::FileSourceFormat::Dae,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get CAD file center of mass.\n\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.\n\n**Parameters:**\n\n- `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_center_of_mass_with_uniform_density() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileCenterOfMassWithUniformDensity = client\n .file()\n .create_center_of_mass_with_uniform_density(\n kittycad::types::File3DImportFormat::ObjNomtl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn create_center_of_mass_with_uniform_density<'a>( + &'a self, + src_format: crate::types::File3DImportFormat, + body: &bytes::Bytes, + ) -> Result { + let mut req = self.client.client.request( + http::Method::POST, + &format!( + "{}/{}", + self.client.base_url, "file/center-of-mass-with-uniform-density" + ), + ); + req = req.bearer_auth(&self.client.token); + let query_params = vec![("src_format", format!("{}", src_format))]; + req = req.query(&query_params); + req = req.body(body.clone()); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + + #[doc = "Convert CAD file.\n\nConvert a CAD file from one format to another. If the file being \ + converted is larger than 25MB, it will be performed asynchronously.\nIf the \ + conversion is performed synchronously, the contents of the converted file (`output`) \ + will be returned as a base64 encoded string.\nIf the operation is performed \ + asynchronously, the `id` of the operation will be returned. You can use the `id` \ + returned from the request to get status information about the async operation from \ + the `/async/operations/{id}` endpoint.\n\n**Parameters:**\n\n- `output_format: \ + crate::types::FileExportFormat`: The format the file should be converted to. \ + (required)\n- `src_format: crate::types::FileImportFormat`: The format of the file to \ + convert. (required)\n\n```rust,no_run\nasync fn example_file_create_conversion() -> \ + anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ + result: kittycad::types::FileConversion = client\n .file()\n \ + .create_conversion(\n kittycad::types::FileExportFormat::Svg,\n \ + kittycad::types::FileImportFormat::Ply,\n \ + &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_conversion<'a>( &'a self, - output_format: crate::types::FileOutputFormat, - src_format: crate::types::FileSourceFormat, + output_format: crate::types::FileExportFormat, + src_format: crate::types::FileImportFormat, body: &bytes::Bytes, ) -> Result { let mut req = self.client.client.request( @@ -133,12 +287,12 @@ impl File { } } - #[doc = "Get CAD file density.\n\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.\n\n**Parameters:**\n\n- `material_mass: f64`: The material mass. (required)\n- `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_density() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileDensity = client\n .file()\n .create_density(\n 3.14 as f64,\n kittycad::types::FileSourceFormat::Fbx,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get CAD file density.\n\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.\n\n**Parameters:**\n\n- `material_mass: f64`: The material mass. (required)\n- `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_density() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileDensity = client\n .file()\n .create_density(\n 3.14 as f64,\n kittycad::types::File3DImportFormat::Fbx,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_density<'a>( &'a self, material_mass: f64, - src_format: crate::types::FileSourceFormat, + src_format: crate::types::File3DImportFormat, body: &bytes::Bytes, ) -> Result { let mut req = self.client.client.request( @@ -146,9 +300,10 @@ impl File { &format!("{}/{}", self.client.base_url, "file/density"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("material_mass", format!("{}", material_mass))); - query_params.push(("src_format", format!("{}", src_format))); + let query_params = vec![ + ("material_mass", format!("{}", material_mass)), + ("src_format", format!("{}", src_format)), + ]; req = req.query(&query_params); req = req.body(body.clone()); let resp = req.send().await?; @@ -166,18 +321,7 @@ impl File { } } - #[doc = "Execute a KittyCAD program in a specific language.\n\n**Parameters:**\n\n- `lang: \ - crate::types::CodeLanguage`: The language of the code. (required)\n- `output: \ - Option`: The output file we want to get the contents for (the paths are \ - relative to where in litterbox it is being run). You can denote more than one file \ - with a comma separated list of string paths.\n\n```rust,no_run\nasync fn \ - example_file_create_execution() -> anyhow::Result<()> {\n let client = \ - kittycad::Client::new_from_env();\n let result: kittycad::types::CodeOutput = \ - client\n .file()\n .create_execution(\n \ - kittycad::types::CodeLanguage::Node,\n \ - Some(\"some-string\".to_string()),\n \ - &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n \ - println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Execute a KittyCAD program in a specific language.\n\n**Parameters:**\n\n- `lang: crate::types::CodeLanguage`: The language of the code. (required)\n- `output: Option`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\n\n```rust,no_run\nasync fn example_file_create_execution() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CodeOutput = client\n .file()\n .create_execution(\n kittycad::types::CodeLanguage::Go,\n Some(\"some-string\".to_string()),\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_execution<'a>( &'a self, @@ -194,7 +338,7 @@ impl File { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = output { query_params.push(("output", p)); } @@ -216,12 +360,12 @@ impl File { } } - #[doc = "Get CAD file mass.\n\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.\n\n**Parameters:**\n\n- `material_density: f64`: The material density. (required)\n- `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_mass() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileMass = client\n .file()\n .create_mass(\n 3.14 as f64,\n kittycad::types::FileSourceFormat::Stl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get CAD file mass.\n\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.\n\n**Parameters:**\n\n- `material_density: f64`: The material density. (required)\n- `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_mass() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileMass = client\n .file()\n .create_mass(\n 3.14 as f64,\n kittycad::types::File3DImportFormat::ObjZip,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_mass<'a>( &'a self, material_density: f64, - src_format: crate::types::FileSourceFormat, + src_format: crate::types::File3DImportFormat, body: &bytes::Bytes, ) -> Result { let mut req = self.client.client.request( @@ -229,9 +373,10 @@ impl File { &format!("{}/{}", self.client.base_url, "file/mass"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("material_density", format!("{}", material_density))); - query_params.push(("src_format", format!("{}", src_format))); + let query_params = vec![ + ("material_density", format!("{}", material_density)), + ("src_format", format!("{}", src_format)), + ]; req = req.query(&query_params); req = req.body(body.clone()); let resp = req.send().await?; @@ -249,11 +394,11 @@ impl File { } } - #[doc = "Get CAD file surface area.\n\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.\n\n**Parameters:**\n\n- `src_format: crate::types::FileSourceFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_surface_area() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileSurfaceArea = client\n .file()\n .create_surface_area(\n kittycad::types::FileSourceFormat::Fbx,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get CAD file surface area.\n\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.\n\n**Parameters:**\n\n- `src_format: crate::types::File3DImportFormat`: The format of the file. (required)\n\n```rust,no_run\nasync fn example_file_create_surface_area() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::FileSurfaceArea = client\n .file()\n .create_surface_area(\n kittycad::types::File3DImportFormat::Stl,\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_surface_area<'a>( &'a self, - src_format: crate::types::FileSourceFormat, + src_format: crate::types::File3DImportFormat, body: &bytes::Bytes, ) -> Result { let mut req = self.client.client.request( @@ -261,8 +406,7 @@ impl File { &format!("{}/{}", self.client.base_url, "file/surface-area"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("src_format", format!("{}", src_format))); + let query_params = vec![("src_format", format!("{}", src_format))]; req = req.query(&query_params); req = req.body(body.clone()); let resp = req.send().await?; @@ -285,17 +429,17 @@ impl File { 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.\n\n**Parameters:**\n\n- `src_format: \ - crate::types::FileSourceFormat`: The format of the file. \ + crate::types::File3DImportFormat`: The format of the file. \ (required)\n\n```rust,no_run\nasync fn example_file_create_volume() -> \ anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ result: kittycad::types::FileVolume = client\n .file()\n \ - .create_volume(\n kittycad::types::FileSourceFormat::Obj,\n \ + .create_volume(\n kittycad::types::File3DImportFormat::Step,\n \ &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_volume<'a>( &'a self, - src_format: crate::types::FileSourceFormat, + src_format: crate::types::File3DImportFormat, body: &bytes::Bytes, ) -> Result { let mut req = self.client.client.request( @@ -303,8 +447,7 @@ impl File { &format!("{}/{}", self.client.base_url, "file/volume"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("src_format", format!("{}", src_format))); + let query_params = vec![("src_format", format!("{}", src_format))]; req = req.query(&query_params); req = req.body(body.clone()); let resp = req.send().await?; diff --git a/kittycad/src/hidden.rs b/kittycad/src/hidden.rs index 2b8e7dc5..4b8fb234 100644 --- a/kittycad/src/hidden.rs +++ b/kittycad/src/hidden.rs @@ -52,13 +52,14 @@ impl Hidden { &format!("{}/{}", self.client.base_url, "auth/email/callback"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![ + ("email", email.to_string()), + ("token", token.to_string()), + ]; if let Some(p) = callback_url { query_params.push(("callback_url", p)); } - query_params.push(("email", email.to_string())); - query_params.push(("token", token.to_string())); req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); diff --git a/kittycad/src/lib.rs b/kittycad/src/lib.rs index a213e8d9..a0424c93 100644 --- a/kittycad/src/lib.rs +++ b/kittycad/src/lib.rs @@ -60,6 +60,10 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #[doc(hidden)] +/// AI uses machine learning to generate 3D meshes. +/// +/// FROM: +pub mod ai; /// API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. /// /// FROM: @@ -218,6 +222,13 @@ impl Client { Ok(req) } + /// AI uses machine learning to generate 3D meshes. + /// + /// FROM: + pub fn ai(&self) -> ai::Ai { + ai::Ai::new(self.clone()) + } + /// API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. /// /// FROM: diff --git a/kittycad/src/oauth2.rs b/kittycad/src/oauth2.rs index a42bd34f..d6c76335 100644 --- a/kittycad/src/oauth2.rs +++ b/kittycad/src/oauth2.rs @@ -109,8 +109,7 @@ impl Oauth2 { &format!("{}/{}", self.client.base_url, "oauth2/device/verify"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("user_code", user_code.to_string())); + let query_params = vec![("user_code", user_code.to_string())]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -148,7 +147,7 @@ impl Oauth2 { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = code { query_params.push(("code", p)); } @@ -193,7 +192,7 @@ impl Oauth2 { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = callback_url { query_params.push(("callback_url", p)); } diff --git a/kittycad/src/tests.rs b/kittycad/src/tests.rs index 7b2b4efd..7caa7316 100644 --- a/kittycad/src/tests.rs +++ b/kittycad/src/tests.rs @@ -8,13 +8,13 @@ fn test_client() -> crate::Client { #[tokio::test] async fn test_create_file_conversion() { let client = test_client(); - let body = include_bytes!("../../assets/in_step.stp"); + let body = include_bytes!("../../assets/in_obj.obj"); let conversion = client .file() .create_conversion( - crate::types::FileOutputFormat::Stl, - crate::types::FileSourceFormat::Step, + crate::types::FileExportFormat::Step, + crate::types::FileImportFormat::Obj, &body.to_vec().into(), ) .await @@ -22,7 +22,7 @@ async fn test_create_file_conversion() { assert!(conversion.output.is_some()); - assert_eq!(conversion.src_format, crate::types::FileSourceFormat::Step); + assert_eq!(conversion.src_format, crate::types::FileImportFormat::Obj); assert_eq!(conversion.status, crate::types::ApiCallStatus::Completed); } @@ -33,13 +33,13 @@ async fn test_create_file_volume() { let result = client .file() - .create_volume(crate::types::FileSourceFormat::Obj, &body.to_vec().into()) + .create_volume(crate::types::File3DImportFormat::Obj, &body.to_vec().into()) .await .unwrap(); assert_eq!(result.volume, Some(53.601147)); - assert_eq!(result.src_format, crate::types::FileSourceFormat::Obj); + assert_eq!(result.src_format, crate::types::File3DImportFormat::Obj); assert_eq!(result.status, crate::types::ApiCallStatus::Completed); } diff --git a/kittycad/src/types.rs b/kittycad/src/types.rs index 97884d92..e04ef035 100644 --- a/kittycad/src/types.rs +++ b/kittycad/src/types.rs @@ -1086,7 +1086,10 @@ impl tabled::Tabled for AsyncApiCall { #[serde(tag = "type")] pub enum AsyncApiCallOutput { FileConversion(FileConversion), + File2DVectorConversion(File2DVectorConversion), + File3DConversion(File3DConversion), FileCenterOfMass(FileCenterOfMass), + FileCenterOfMassWithUniformDensity(FileCenterOfMassWithUniformDensity), FileMass(FileMass), FileVolume(FileVolume), FileDensity(FileDensity), @@ -1176,8 +1179,11 @@ impl tabled::Tabled for AsyncApiCallResultsPage { )] pub enum AsyncApiCallType { FileConversion, + File2DVectorConversion, + File3DConversion, FileVolume, FileCenterOfMass, + FileCenterOfMassWithUniformDensity, FileMass, FileDensity, FileSurfaceArea, @@ -1376,7 +1382,7 @@ impl tabled::Tabled for CardDetails { pub struct Cluster { #[doc = "The IP address of the cluster."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub addr: Option, + pub addr: Option, #[doc = "The auth timeout of the cluster."] #[serde(default, skip_serializing_if = "Option::is_none")] pub auth_timeout: Option, @@ -3589,7 +3595,7 @@ impl tabled::Tabled for ExecutorMetadata { #[doc = "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 Zendesk."] + users: MailChimp, Stripe, and Front"] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, )] @@ -3611,6 +3617,9 @@ pub struct ExtendedUser { #[doc = "The user's first name."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_name: Option, + #[doc = "The user's Front ID. This is mostly used for internal mapping."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub front_id: Option, #[doc = "The user's GitHub handle."] #[serde(default, skip_serializing_if = "Option::is_none")] pub github: Option, @@ -3638,9 +3647,6 @@ pub struct ExtendedUser { pub stripe_id: Option, #[doc = "The date and time the user was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user's Zendesk ID. This is mostly used for internal mapping."] - #[serde(default, skip_serializing_if = "Option::is_none")] - pub zendesk_id: Option, } impl std::fmt::Display for ExtendedUser { @@ -3683,6 +3689,11 @@ impl tabled::Tabled for ExtendedUser { } else { String::new() }, + if let Some(front_id) = &self.front_id { + format!("{:?}", front_id) + } else { + String::new() + }, if let Some(github) = &self.github { format!("{:?}", github) } else { @@ -3716,11 +3727,6 @@ impl tabled::Tabled for ExtendedUser { String::new() }, format!("{:?}", self.updated_at), - if let Some(zendesk_id) = &self.zendesk_id { - format!("{:?}", zendesk_id) - } else { - String::new() - }, ] } @@ -3732,6 +3738,7 @@ impl tabled::Tabled for ExtendedUser { "email".to_string(), "email_verified".to_string(), "first_name".to_string(), + "front_id".to_string(), "github".to_string(), "id".to_string(), "image".to_string(), @@ -3741,7 +3748,6 @@ impl tabled::Tabled for ExtendedUser { "phone".to_string(), "stripe_id".to_string(), "updated_at".to_string(), - "zendesk_id".to_string(), ] } } @@ -3813,43 +3819,41 @@ impl tabled::Tabled for ExtendedUserResultsPage { } } -#[doc = "A file center of mass result."] +#[doc = "A 2D Vector file conversion."] #[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, + serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, )] -pub struct FileCenterOfMass { - #[doc = "The resulting center of mass."] - #[serde(default, skip_serializing_if = "Option::is_none")] - pub center_of_mass: Option>, - #[doc = "The time and date the mass was completed."] +pub struct File2DVectorConversion { + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the mass was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the center of mass request.\n\nThis is the same as the API \ - call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, - #[doc = "The material density as denoted by the user."] + #[doc = "The converted file, if completed, base64 encoded."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub material_density: Option, - #[doc = "The source format of the file."] - pub src_format: FileSourceFormat, - #[doc = "The time and date the mass was started."] + pub output: Option, + #[doc = "The output format of the file conversion."] + pub output_format: File2DVectorExportFormat, + #[doc = "The source format of the file conversion."] + pub src_format: File2DVectorImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the mass."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the mass was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the mass."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } -impl std::fmt::Display for FileCenterOfMass { +impl std::fmt::Display for File2DVectorConversion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { write!( f, @@ -3859,15 +3863,10 @@ impl std::fmt::Display for FileCenterOfMass { } } -impl tabled::Tabled for FileCenterOfMass { +impl tabled::Tabled for File2DVectorConversion { const LENGTH: usize = 11; fn fields(&self) -> Vec { vec![ - if let Some(center_of_mass) = &self.center_of_mass { - format!("{:?}", center_of_mass) - } else { - String::new() - }, if let Some(completed_at) = &self.completed_at { format!("{:?}", completed_at) } else { @@ -3880,11 +3879,12 @@ impl tabled::Tabled for FileCenterOfMass { String::new() }, format!("{:?}", self.id), - if let Some(material_density) = &self.material_density { - format!("{:?}", material_density) + if let Some(output) = &self.output { + format!("{:?}", output) } else { String::new() }, + format!("{:?}", self.output_format), format!("{:?}", self.src_format), if let Some(started_at) = &self.started_at { format!("{:?}", started_at) @@ -3903,12 +3903,12 @@ impl tabled::Tabled for FileCenterOfMass { fn headers() -> Vec { vec![ - "center_of_mass".to_string(), "completed_at".to_string(), "created_at".to_string(), "error".to_string(), "id".to_string(), - "material_density".to_string(), + "output".to_string(), + "output_format".to_string(), "src_format".to_string(), "started_at".to_string(), "status".to_string(), @@ -3918,41 +3918,96 @@ impl tabled::Tabled for FileCenterOfMass { } } -#[doc = "A file conversion."] +#[doc = "The valid types of Vector output file formats."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, Eq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + tabled :: Tabled, + clap :: ValueEnum, + parse_display :: FromStr, + parse_display :: Display, +)] +pub enum File2DVectorExportFormat { + #[serde(rename = "dxf")] + #[display("dxf")] + Dxf, + #[serde(rename = "json")] + #[display("json")] + Json, + #[serde(rename = "png")] + #[display("png")] + Png, + #[serde(rename = "ps")] + #[display("ps")] + Ps, + #[serde(rename = "svg")] + #[display("svg")] + Svg, +} + +#[doc = "The valid types of Vector source file formats."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, Eq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + tabled :: Tabled, + clap :: ValueEnum, + parse_display :: FromStr, + parse_display :: Display, +)] +pub enum File2DVectorImportFormat { + #[serde(rename = "dxf")] + #[display("dxf")] + Dxf, + #[serde(rename = "svg")] + #[display("svg")] + Svg, +} + +#[doc = "A 3D file conversion."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, )] -pub struct FileConversion { - #[doc = "The time and date the file conversion was completed."] +pub struct File3DConversion { + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the file conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the file conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The converted file, if completed, base64 encoded."] #[serde(default, skip_serializing_if = "Option::is_none")] pub output: Option, #[doc = "The output format of the file conversion."] - pub output_format: FileOutputFormat, + pub output_format: File3DExportFormat, #[doc = "The source format of the file conversion."] - pub src_format: FileSourceFormat, - #[doc = "The time and date the file conversion was started."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the file conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the file conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the file conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } -impl std::fmt::Display for FileConversion { +impl std::fmt::Display for File3DConversion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { write!( f, @@ -3962,7 +4017,7 @@ impl std::fmt::Display for FileConversion { } } -impl tabled::Tabled for FileConversion { +impl tabled::Tabled for File3DConversion { const LENGTH: usize = 11; fn fields(&self) -> Vec { vec![ @@ -4017,42 +4072,129 @@ impl tabled::Tabled for FileConversion { } } -#[doc = "A file density result."] +#[doc = "The valid types of 3d output file formats, can include formats that use suplimentary \ + files. For example, the OBJ format can use a MTL file."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, Eq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + tabled :: Tabled, + clap :: ValueEnum, + parse_display :: FromStr, + parse_display :: Display, +)] +pub enum File3DExportFormat { + #[serde(rename = "dae")] + #[display("dae")] + Dae, + #[serde(rename = "fbx")] + #[display("fbx")] + Fbx, + #[serde(rename = "fbxb")] + #[display("fbxb")] + Fbxb, + #[serde(rename = "obj")] + #[display("obj")] + Obj, + #[serde(rename = "obj_nomtl")] + #[display("obj_nomtl")] + ObjNomtl, + #[serde(rename = "ply")] + #[display("ply")] + Ply, + #[serde(rename = "step")] + #[display("step")] + Step, + #[serde(rename = "stl")] + #[display("stl")] + Stl, +} + +#[doc = "The valid types of 3d source file formats, can include formats that use suplimentary \ + files. For example, the OBJ format can use a MTL file."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, Eq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + tabled :: Tabled, + clap :: ValueEnum, + parse_display :: FromStr, + parse_display :: Display, +)] +pub enum File3DImportFormat { + #[serde(rename = "dae")] + #[display("dae")] + Dae, + #[serde(rename = "dxf")] + #[display("dxf")] + Dxf, + #[serde(rename = "fbx")] + #[display("fbx")] + Fbx, + #[serde(rename = "obj_zip")] + #[display("obj_zip")] + ObjZip, + #[serde(rename = "obj")] + #[display("obj")] + Obj, + #[serde(rename = "obj_nomtl")] + #[display("obj_nomtl")] + ObjNomtl, + #[serde(rename = "ply")] + #[display("ply")] + Ply, + #[serde(rename = "step")] + #[display("step")] + Step, + #[serde(rename = "stl")] + #[display("stl")] + Stl, +} + +#[doc = "A file center of mass result."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] -pub struct FileDensity { - #[doc = "The time and date the density was completed."] +pub struct FileCenterOfMass { + #[doc = "The resulting center of mass."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub center_of_mass: Option>, + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the density was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, - #[doc = "The resulting density."] - #[serde(default, skip_serializing_if = "Option::is_none")] - pub density: Option, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the density request.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, - #[doc = "The material mass as denoted by the user."] + #[doc = "The material density as denoted by the user."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub material_mass: Option, + pub material_density: Option, #[doc = "The source format of the file."] - pub src_format: FileSourceFormat, - #[doc = "The time and date the density was started."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the density."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the density was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the density."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } -impl std::fmt::Display for FileDensity { +impl std::fmt::Display for FileCenterOfMass { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { write!( f, @@ -4062,29 +4204,29 @@ impl std::fmt::Display for FileDensity { } } -impl tabled::Tabled for FileDensity { +impl tabled::Tabled for FileCenterOfMass { const LENGTH: usize = 11; fn fields(&self) -> Vec { vec![ - if let Some(completed_at) = &self.completed_at { - format!("{:?}", completed_at) + if let Some(center_of_mass) = &self.center_of_mass { + format!("{:?}", center_of_mass) } else { String::new() }, - format!("{:?}", self.created_at), - if let Some(density) = &self.density { - format!("{:?}", density) + if let Some(completed_at) = &self.completed_at { + format!("{:?}", completed_at) } else { String::new() }, + format!("{:?}", self.created_at), if let Some(error) = &self.error { format!("{:?}", error) } else { String::new() }, format!("{:?}", self.id), - if let Some(material_mass) = &self.material_mass { - format!("{:?}", material_mass) + if let Some(material_density) = &self.material_density { + format!("{:?}", material_density) } else { String::new() }, @@ -4106,12 +4248,12 @@ impl tabled::Tabled for FileDensity { fn headers() -> Vec { vec![ + "center_of_mass".to_string(), "completed_at".to_string(), "created_at".to_string(), - "density".to_string(), "error".to_string(), "id".to_string(), - "material_mass".to_string(), + "material_density".to_string(), "src_format".to_string(), "started_at".to_string(), "status".to_string(), @@ -4121,42 +4263,136 @@ impl tabled::Tabled for FileDensity { } } -#[doc = "A file mass result."] +#[doc = "A file center of mass result."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] -pub struct FileMass { - #[doc = "The time and date the mass was completed."] +pub struct FileCenterOfMassWithUniformDensity { + #[doc = "The resulting center of mass."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub center_of_mass: Option>, + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the mass was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the mass request.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, - #[doc = "The resulting mass."] + #[doc = "The source format of the file."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub mass: Option, - #[doc = "The material density as denoted by the user."] + pub started_at: Option>, + #[doc = "The status of the API call."] + pub status: ApiCallStatus, + #[doc = "The time and date the API call was last updated."] + pub updated_at: chrono::DateTime, + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub material_density: Option, - #[doc = "The source format of the file."] - pub src_format: FileSourceFormat, - #[doc = "The time and date the mass was started."] + pub user_id: Option, +} + +impl std::fmt::Display for FileCenterOfMassWithUniformDensity { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for FileCenterOfMassWithUniformDensity { + const LENGTH: usize = 10; + fn fields(&self) -> Vec { + vec![ + if let Some(center_of_mass) = &self.center_of_mass { + format!("{:?}", center_of_mass) + } else { + String::new() + }, + if let Some(completed_at) = &self.completed_at { + format!("{:?}", completed_at) + } else { + String::new() + }, + format!("{:?}", self.created_at), + if let Some(error) = &self.error { + format!("{:?}", error) + } else { + String::new() + }, + format!("{:?}", self.id), + format!("{:?}", self.src_format), + if let Some(started_at) = &self.started_at { + format!("{:?}", started_at) + } else { + String::new() + }, + format!("{:?}", self.status), + format!("{:?}", self.updated_at), + if let Some(user_id) = &self.user_id { + format!("{:?}", user_id) + } else { + String::new() + }, + ] + } + + fn headers() -> Vec { + vec![ + "center_of_mass".to_string(), + "completed_at".to_string(), + "created_at".to_string(), + "error".to_string(), + "id".to_string(), + "src_format".to_string(), + "started_at".to_string(), + "status".to_string(), + "updated_at".to_string(), + "user_id".to_string(), + ] + } +} + +#[doc = "A file conversion."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct FileConversion { + #[doc = "The time and date the API call was completed."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub completed_at: Option>, + #[doc = "The time and date the API call was created."] + pub created_at: chrono::DateTime, + #[doc = "The error the function returned, if any."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub error: Option, + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] + pub id: uuid::Uuid, + #[doc = "The converted file, if completed, base64 encoded."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub output: Option, + #[doc = "The output format of the file conversion."] + pub output_format: FileExportFormat, + #[doc = "The source format of the file conversion."] + pub src_format: FileImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the mass."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the mass was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the mass."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } -impl std::fmt::Display for FileMass { +impl std::fmt::Display for FileConversion { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { write!( f, @@ -4166,7 +4402,7 @@ impl std::fmt::Display for FileMass { } } -impl tabled::Tabled for FileMass { +impl tabled::Tabled for FileConversion { const LENGTH: usize = 11; fn fields(&self) -> Vec { vec![ @@ -4182,13 +4418,113 @@ impl tabled::Tabled for FileMass { String::new() }, format!("{:?}", self.id), - if let Some(mass) = &self.mass { - format!("{:?}", mass) + if let Some(output) = &self.output { + format!("{:?}", output) } else { String::new() }, - if let Some(material_density) = &self.material_density { - format!("{:?}", material_density) + format!("{:?}", self.output_format), + format!("{:?}", self.src_format), + if let Some(started_at) = &self.started_at { + format!("{:?}", started_at) + } else { + String::new() + }, + format!("{:?}", self.status), + format!("{:?}", self.updated_at), + if let Some(user_id) = &self.user_id { + format!("{:?}", user_id) + } else { + String::new() + }, + ] + } + + fn headers() -> Vec { + vec![ + "completed_at".to_string(), + "created_at".to_string(), + "error".to_string(), + "id".to_string(), + "output".to_string(), + "output_format".to_string(), + "src_format".to_string(), + "started_at".to_string(), + "status".to_string(), + "updated_at".to_string(), + "user_id".to_string(), + ] + } +} + +#[doc = "A file density result."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct FileDensity { + #[doc = "The time and date the API call was completed."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub completed_at: Option>, + #[doc = "The time and date the API call was created."] + pub created_at: chrono::DateTime, + #[doc = "The resulting density."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub density: Option, + #[doc = "The error the function returned, if any."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub error: Option, + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] + pub id: uuid::Uuid, + #[doc = "The material mass as denoted by the user."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub material_mass: Option, + #[doc = "The source format of the file."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub started_at: Option>, + #[doc = "The status of the API call."] + pub status: ApiCallStatus, + #[doc = "The time and date the API call was last updated."] + pub updated_at: chrono::DateTime, + #[doc = "The user ID of the user who created the API call."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user_id: Option, +} + +impl std::fmt::Display for FileDensity { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for FileDensity { + const LENGTH: usize = 11; + fn fields(&self) -> Vec { + vec![ + if let Some(completed_at) = &self.completed_at { + format!("{:?}", completed_at) + } else { + String::new() + }, + format!("{:?}", self.created_at), + if let Some(density) = &self.density { + format!("{:?}", density) + } else { + String::new() + }, + if let Some(error) = &self.error { + format!("{:?}", error) + } else { + String::new() + }, + format!("{:?}", self.id), + if let Some(material_mass) = &self.material_mass { + format!("{:?}", material_mass) } else { String::new() }, @@ -4212,10 +4548,10 @@ impl tabled::Tabled for FileMass { vec![ "completed_at".to_string(), "created_at".to_string(), + "density".to_string(), "error".to_string(), "id".to_string(), - "mass".to_string(), - "material_density".to_string(), + "material_mass".to_string(), "src_format".to_string(), "started_at".to_string(), "status".to_string(), @@ -4239,25 +4575,40 @@ impl tabled::Tabled for FileMass { parse_display :: FromStr, parse_display :: Display, )] -pub enum FileOutputFormat { - #[serde(rename = "stl")] - #[display("stl")] - Stl, - #[serde(rename = "obj")] - #[display("obj")] - Obj, +pub enum FileExportFormat { #[serde(rename = "dae")] #[display("dae")] Dae, - #[serde(rename = "step")] - #[display("step")] - Step, + #[serde(rename = "dxf")] + #[display("dxf")] + Dxf, #[serde(rename = "fbx")] #[display("fbx")] Fbx, #[serde(rename = "fbxb")] #[display("fbxb")] Fbxb, + #[serde(rename = "json")] + #[display("json")] + Json, + #[serde(rename = "obj")] + #[display("obj")] + Obj, + #[serde(rename = "obj_nomtl")] + #[display("obj_nomtl")] + ObjNomtl, + #[serde(rename = "ply")] + #[display("ply")] + Ply, + #[serde(rename = "step")] + #[display("step")] + Step, + #[serde(rename = "stl")] + #[display("stl")] + Stl, + #[serde(rename = "svg")] + #[display("svg")] + Svg, } #[doc = "The valid types of source file formats."] @@ -4274,22 +4625,141 @@ pub enum FileOutputFormat { parse_display :: FromStr, parse_display :: Display, )] -pub enum FileSourceFormat { - #[serde(rename = "stl")] - #[display("stl")] - Stl, - #[serde(rename = "obj")] - #[display("obj")] - Obj, +pub enum FileImportFormat { #[serde(rename = "dae")] #[display("dae")] Dae, - #[serde(rename = "step")] - #[display("step")] - Step, + #[serde(rename = "dxf")] + #[display("dxf")] + Dxf, #[serde(rename = "fbx")] #[display("fbx")] Fbx, + #[serde(rename = "obj_zip")] + #[display("obj_zip")] + ObjZip, + #[serde(rename = "obj")] + #[display("obj")] + Obj, + #[serde(rename = "obj_nomtl")] + #[display("obj_nomtl")] + ObjNomtl, + #[serde(rename = "ply")] + #[display("ply")] + Ply, + #[serde(rename = "step")] + #[display("step")] + Step, + #[serde(rename = "stl")] + #[display("stl")] + Stl, + #[serde(rename = "svg")] + #[display("svg")] + Svg, +} + +#[doc = "A file mass result."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct FileMass { + #[doc = "The time and date the API call was completed."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub completed_at: Option>, + #[doc = "The time and date the API call was created."] + pub created_at: chrono::DateTime, + #[doc = "The error the function returned, if any."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub error: Option, + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] + pub id: uuid::Uuid, + #[doc = "The resulting mass."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mass: Option, + #[doc = "The material density as denoted by the user."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub material_density: Option, + #[doc = "The source format of the file."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub started_at: Option>, + #[doc = "The status of the API call."] + pub status: ApiCallStatus, + #[doc = "The time and date the API call was last updated."] + pub updated_at: chrono::DateTime, + #[doc = "The user ID of the user who created the API call."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user_id: Option, +} + +impl std::fmt::Display for FileMass { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for FileMass { + const LENGTH: usize = 11; + fn fields(&self) -> Vec { + vec![ + if let Some(completed_at) = &self.completed_at { + format!("{:?}", completed_at) + } else { + String::new() + }, + format!("{:?}", self.created_at), + if let Some(error) = &self.error { + format!("{:?}", error) + } else { + String::new() + }, + format!("{:?}", self.id), + if let Some(mass) = &self.mass { + format!("{:?}", mass) + } else { + String::new() + }, + if let Some(material_density) = &self.material_density { + format!("{:?}", material_density) + } else { + String::new() + }, + format!("{:?}", self.src_format), + if let Some(started_at) = &self.started_at { + format!("{:?}", started_at) + } else { + String::new() + }, + format!("{:?}", self.status), + format!("{:?}", self.updated_at), + if let Some(user_id) = &self.user_id { + format!("{:?}", user_id) + } else { + String::new() + }, + ] + } + + fn headers() -> Vec { + vec![ + "completed_at".to_string(), + "created_at".to_string(), + "error".to_string(), + "id".to_string(), + "mass".to_string(), + "material_density".to_string(), + "src_format".to_string(), + "started_at".to_string(), + "status".to_string(), + "updated_at".to_string(), + "user_id".to_string(), + ] + } } #[doc = "A file surface area result."] @@ -4297,29 +4767,29 @@ pub enum FileSourceFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct FileSurfaceArea { - #[doc = "The time and date the density was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the density was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the density request.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The source format of the file."] - pub src_format: FileSourceFormat, - #[doc = "The time and date the density was started."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the density."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, #[doc = "The resulting surface area."] #[serde(default, skip_serializing_if = "Option::is_none")] pub surface_area: Option, - #[doc = "The time and date the density was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the density."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -4423,26 +4893,26 @@ impl tabled::Tabled for FileSystemMetadata { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct FileVolume { - #[doc = "The time and date the volume was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the volume was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the volume request.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The source format of the file."] - pub src_format: FileSourceFormat, - #[doc = "The time and date the volume was started."] + pub src_format: File3DImportFormat, + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the volume."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the volume was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the volume."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, #[doc = "The resulting volume."] @@ -4588,6 +5058,29 @@ impl tabled::Tabled for Gateway { } } +#[doc = "An enumeration."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, Eq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + tabled :: Tabled, + clap :: ValueEnum, + parse_display :: FromStr, + parse_display :: Display, +)] +pub enum ImageType { + #[serde(rename = "png")] + #[display("png")] + Png, + #[serde(rename = "jpg")] + #[display("jpg")] + Jpg, +} + #[doc = "IndexInfo contains information about a registry."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, @@ -5372,6 +5865,34 @@ impl tabled::Tabled for LeafNode { } } +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Mesh { + pub mesh: String, +} + +impl std::fmt::Display for Mesh { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for Mesh { + const LENGTH: usize = 1; + fn fields(&self) -> Vec { + vec![self.mesh.clone()] + } + + fn headers() -> Vec { + vec!["mesh".to_string()] + } +} + #[doc = "Jetstream statistics."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, @@ -5447,6 +5968,8 @@ pub struct Metadata { pub fs: FileSystemMetadata, #[doc = "The git hash of the server."] pub git_hash: String, + #[doc = "Metadata about our point-e instance."] + pub point_e: PointEMetadata, #[doc = "Metadata about our pub-sub connection."] pub pubsub: Connection, } @@ -5462,7 +5985,7 @@ impl std::fmt::Display for Metadata { } impl tabled::Tabled for Metadata { - const LENGTH: usize = 7; + const LENGTH: usize = 8; fn fields(&self) -> Vec { vec![ format!("{:?}", self.cache), @@ -5471,6 +5994,7 @@ impl tabled::Tabled for Metadata { format!("{:?}", self.executor), format!("{:?}", self.fs), self.git_hash.clone(), + format!("{:?}", self.point_e), format!("{:?}", self.pubsub), ] } @@ -5483,6 +6007,7 @@ impl tabled::Tabled for Metadata { "executor".to_string(), "fs".to_string(), "git_hash".to_string(), + "point_e".to_string(), "pubsub".to_string(), ] } @@ -5716,6 +6241,66 @@ impl std::default::Default for Oauth2GrantType { } } +#[doc = "Onboarding details"] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Onboarding { + #[doc = "When the user first called an endpoint from their machine (i.e. not a litterbox \ + execution)"] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_call_from_their_machine_date: Option, + #[doc = "When the user first used the litterbox"] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_litterbox_execute_date: Option, + #[doc = "When the user created their first token"] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_token_date: Option, +} + +impl std::fmt::Display for Onboarding { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for Onboarding { + const LENGTH: usize = 3; + fn fields(&self) -> Vec { + vec![ + if let Some(first_call_from_their_machine_date) = + &self.first_call_from_their_machine_date + { + format!("{:?}", first_call_from_their_machine_date) + } else { + String::new() + }, + if let Some(first_litterbox_execute_date) = &self.first_litterbox_execute_date { + format!("{:?}", first_litterbox_execute_date) + } else { + String::new() + }, + if let Some(first_token_date) = &self.first_token_date { + format!("{:?}", first_token_date) + } else { + String::new() + }, + ] + } + + fn headers() -> Vec { + vec![ + "first_call_from_their_machine_date".to_string(), + "first_litterbox_execute_date".to_string(), + "first_token_date".to_string(), + ] + } +} + #[doc = "Output file contents."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, @@ -5961,27 +6546,26 @@ impl std::default::Default for PaymentMethodType { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct PhysicsConstant { - #[doc = "The time and date the constant was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, #[doc = "The constant we are returning."] pub constant: PhysicsConstantName, - #[doc = "The time and date the constant was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the constant request.\n\nThis is the same as the API call \ - ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, - #[doc = "The time and date the constant was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the constant."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the constant was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the constant."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, #[doc = "The resulting value of the constant."] @@ -6077,15 +6661,15 @@ pub enum PhysicsConstantName { #[display("speed_of_light")] SpeedOfLight, G, - #[serde(rename = "newtonian_graviation")] - #[display("newtonian_graviation")] - NewtonianGraviation, + #[serde(rename = "newtonian_gravitation")] + #[display("newtonian_gravitation")] + NewtonianGravitation, #[serde(rename = "h")] #[display("h")] H, - #[serde(rename = "plank_const")] - #[display("plank_const")] - PlankConst, + #[serde(rename = "planck_const")] + #[display("planck_const")] + PlanckConst, #[serde(rename = "mu_0")] #[display("mu_0")] Mu0, @@ -6230,6 +6814,37 @@ impl tabled::Tabled for PluginsInfo { } } +#[doc = "Metadata about our point-e instance.\n\nThis is mostly used for internal purposes and \ + debugging."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct PointEMetadata { + #[doc = "If the point-e service returned an ok response from ping."] + pub ok: bool, +} + +impl std::fmt::Display for PointEMetadata { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for PointEMetadata { + const LENGTH: usize = 1; + fn fields(&self) -> Vec { + vec![format!("{:?}", self.ok)] + } + + fn headers() -> Vec { + vec!["ok".to_string()] + } +} + #[doc = "The response from the `/ping` endpoint."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Eq, Debug, Clone, schemars :: JsonSchema, @@ -6591,15 +7206,15 @@ pub enum SystemInfoIsolationEnum { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitAccelerationConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6611,14 +7226,14 @@ pub struct UnitAccelerationConversion { pub output_format: UnitAccelerationFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitAccelerationFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -6694,7 +7309,7 @@ impl tabled::Tabled for UnitAccelerationConversion { } } -#[doc = "The valid types of metric unit formats."] +#[doc = "The valid types of acceleration unit formats."] #[derive( serde :: Serialize, serde :: Deserialize, @@ -6725,15 +7340,15 @@ pub enum UnitAccelerationFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitAngleConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6745,14 +7360,14 @@ pub struct UnitAngleConversion { pub output_format: UnitAngleFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitAngleFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -6871,15 +7486,15 @@ pub enum UnitAngleFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitAngularVelocityConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6891,14 +7506,14 @@ pub struct UnitAngularVelocityConversion { pub output_format: UnitAngularVelocityFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitAngularVelocityFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7008,15 +7623,15 @@ pub enum UnitAngularVelocityFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitAreaConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7028,14 +7643,14 @@ pub struct UnitAreaConversion { pub output_format: UnitAreaFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitAreaFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7154,15 +7769,15 @@ pub enum UnitAreaFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitChargeConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7174,14 +7789,14 @@ pub struct UnitChargeConversion { pub output_format: UnitChargeFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitChargeFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7285,15 +7900,15 @@ pub enum UnitChargeFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitConcentrationConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7305,14 +7920,14 @@ pub struct UnitConcentrationConversion { pub output_format: UnitConcentrationFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitConcentrationFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7422,15 +8037,15 @@ pub enum UnitConcentrationFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitDataConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7442,14 +8057,14 @@ pub struct UnitDataConversion { pub output_format: UnitDataFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitDataFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7559,15 +8174,15 @@ pub enum UnitDataFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitDataTransferRateConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7579,14 +8194,14 @@ pub struct UnitDataTransferRateConversion { pub output_format: UnitDataTransferRateFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitDataTransferRateFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7696,15 +8311,15 @@ pub enum UnitDataTransferRateFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitDensityConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7716,14 +8331,14 @@ pub struct UnitDensityConversion { pub output_format: UnitDensityFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitDensityFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7851,15 +8466,15 @@ pub enum UnitDensityFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitEnergyConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -7871,14 +8486,14 @@ pub struct UnitEnergyConversion { pub output_format: UnitEnergyFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitEnergyFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -7975,6 +8590,12 @@ pub enum UnitEnergyFormat { #[serde(rename = "calorie")] #[display("calorie")] Calorie, + #[serde(rename = "kilowatt_hour")] + #[display("kilowatt_hour")] + KilowattHour, + #[serde(rename = "watt_hour")] + #[display("watt_hour")] + WattHour, #[serde(rename = "british_thermal_unit")] #[display("british_thermal_unit")] BritishThermalUnit, @@ -7984,6 +8605,9 @@ pub enum UnitEnergyFormat { #[serde(rename = "british_thermal_unit59")] #[display("british_thermal_unit59")] BritishThermalUnit59, + #[serde(rename = "therm")] + #[display("therm")] + Therm, #[serde(rename = "foot_pound")] #[display("foot_pound")] FootPound, @@ -7994,15 +8618,15 @@ pub enum UnitEnergyFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitForceConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8014,14 +8638,14 @@ pub struct UnitForceConversion { pub output_format: UnitForceFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitForceFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -8121,9 +8745,9 @@ pub enum UnitForceFormat { #[serde(rename = "dyne")] #[display("dyne")] Dyne, - #[serde(rename = "kilopound")] - #[display("kilopound")] - Kilopound, + #[serde(rename = "kilopond")] + #[display("kilopond")] + Kilopond, #[serde(rename = "poundal")] #[display("poundal")] Poundal, @@ -8134,15 +8758,15 @@ pub enum UnitForceFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitIlluminanceConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8154,14 +8778,14 @@ pub struct UnitIlluminanceConversion { pub output_format: UnitIlluminanceFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitIlluminanceFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -8271,15 +8895,15 @@ pub enum UnitIlluminanceFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitLengthConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8291,14 +8915,14 @@ pub struct UnitLengthConversion { pub output_format: UnitLengthFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitLengthFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -8389,21 +9013,24 @@ impl tabled::Tabled for UnitLengthConversion { parse_display :: Display, )] pub enum UnitLengthFormat { + #[serde(rename = "meter")] + #[display("meter")] + Meter, #[serde(rename = "millimeter")] #[display("millimeter")] Millimeter, #[serde(rename = "centimeter")] #[display("centimeter")] Centimeter, - #[serde(rename = "meter")] - #[display("meter")] - Meter, - #[serde(rename = "kilomter")] - #[display("kilomter")] - Kilomter, + #[serde(rename = "kilometer")] + #[display("kilometer")] + Kilometer, #[serde(rename = "foot")] #[display("foot")] Foot, + #[serde(rename = "mil")] + #[display("mil")] + Mil, #[serde(rename = "inch")] #[display("inch")] Inch, @@ -8416,6 +9043,15 @@ pub enum UnitLengthFormat { #[serde(rename = "astronomical_unit")] #[display("astronomical_unit")] AstronomicalUnit, + #[serde(rename = "lightyear")] + #[display("lightyear")] + Lightyear, + #[serde(rename = "parsec")] + #[display("parsec")] + Parsec, + #[serde(rename = "angstrom")] + #[display("angstrom")] + Angstrom, #[serde(rename = "cubit")] #[display("cubit")] Cubit, @@ -8447,15 +9083,15 @@ pub enum UnitLengthFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitMagneticFieldStrengthConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8467,14 +9103,14 @@ pub struct UnitMagneticFieldStrengthConversion { pub output_format: UnitMagneticFieldStrengthFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitMagneticFieldStrengthFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -8578,15 +9214,15 @@ pub enum UnitMagneticFieldStrengthFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitMagneticFluxConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8598,14 +9234,14 @@ pub struct UnitMagneticFluxConversion { pub output_format: UnitMagneticFluxFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitMagneticFluxFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -8709,15 +9345,15 @@ pub enum UnitMagneticFluxFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitMassConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8729,14 +9365,14 @@ pub struct UnitMassConversion { pub output_format: UnitMassFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitMassFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -8898,9 +9534,9 @@ pub enum UnitMetricPower { #[serde(rename = "deci")] #[display("deci")] Deci, - #[serde(rename = "metric_unit")] - #[display("metric_unit")] - MetricUnit, + #[serde(rename = "unit")] + #[display("unit")] + Unit, #[serde(rename = "deca")] #[display("deca")] Deca, @@ -8932,15 +9568,15 @@ pub enum UnitMetricPower { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitMetricPowerConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -8952,14 +9588,14 @@ pub struct UnitMetricPowerConversion { pub output_format: UnitMetricPower, #[doc = "The source format of the unit conversion."] pub src_format: UnitMetricPower, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9040,15 +9676,15 @@ impl tabled::Tabled for UnitMetricPowerConversion { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitMetricPowerCubedConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9060,14 +9696,14 @@ pub struct UnitMetricPowerCubedConversion { pub output_format: UnitMetricPower, #[doc = "The source format of the unit conversion."] pub src_format: UnitMetricPower, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9148,15 +9784,15 @@ impl tabled::Tabled for UnitMetricPowerCubedConversion { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitMetricPowerSquaredConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9168,14 +9804,14 @@ pub struct UnitMetricPowerSquaredConversion { pub output_format: UnitMetricPower, #[doc = "The source format of the unit conversion."] pub src_format: UnitMetricPower, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9256,15 +9892,15 @@ impl tabled::Tabled for UnitMetricPowerSquaredConversion { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitPowerConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9276,14 +9912,14 @@ pub struct UnitPowerConversion { pub output_format: UnitPowerFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitPowerFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9390,15 +10026,15 @@ pub enum UnitPowerFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitPressureConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9410,14 +10046,14 @@ pub struct UnitPressureConversion { pub output_format: UnitPressureFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitPressureFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9530,15 +10166,15 @@ pub enum UnitPressureFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitRadiationConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9550,14 +10186,14 @@ pub struct UnitRadiationConversion { pub output_format: UnitRadiationFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitRadiationFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9633,7 +10269,8 @@ impl tabled::Tabled for UnitRadiationConversion { } } -#[doc = "The valid types of radiation unit formats."] +#[doc = "The valid types of radiation unit formats. These describe the radiation energy absorbed \ + by a mass or material and/or how it affects the relative damage to the human body."] #[derive( serde :: Serialize, serde :: Deserialize, @@ -9659,20 +10296,155 @@ pub enum UnitRadiationFormat { Rad, } +#[doc = "A unit conversion."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct UnitRadioactivityConversion { + #[doc = "The time and date the API call was completed."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub completed_at: Option>, + #[doc = "The time and date the API call was created."] + pub created_at: chrono::DateTime, + #[doc = "The error the function returned, if any."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub error: Option, + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] + pub id: uuid::Uuid, + #[doc = "The input value."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub input: Option, + #[doc = "The resulting value."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub output: Option, + #[doc = "The output format of the unit conversion."] + pub output_format: UnitRadioactivityFormat, + #[doc = "The source format of the unit conversion."] + pub src_format: UnitRadioactivityFormat, + #[doc = "The time and date the API call was started."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub started_at: Option>, + #[doc = "The status of the API call."] + pub status: ApiCallStatus, + #[doc = "The time and date the API call was last updated."] + pub updated_at: chrono::DateTime, + #[doc = "The user ID of the user who created the API call."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub user_id: Option, +} + +impl std::fmt::Display for UnitRadioactivityConversion { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +impl tabled::Tabled for UnitRadioactivityConversion { + const LENGTH: usize = 12; + fn fields(&self) -> Vec { + vec![ + if let Some(completed_at) = &self.completed_at { + format!("{:?}", completed_at) + } else { + String::new() + }, + format!("{:?}", self.created_at), + if let Some(error) = &self.error { + format!("{:?}", error) + } else { + String::new() + }, + format!("{:?}", self.id), + if let Some(input) = &self.input { + format!("{:?}", input) + } else { + String::new() + }, + if let Some(output) = &self.output { + format!("{:?}", output) + } else { + String::new() + }, + format!("{:?}", self.output_format), + format!("{:?}", self.src_format), + if let Some(started_at) = &self.started_at { + format!("{:?}", started_at) + } else { + String::new() + }, + format!("{:?}", self.status), + format!("{:?}", self.updated_at), + if let Some(user_id) = &self.user_id { + format!("{:?}", user_id) + } else { + String::new() + }, + ] + } + + fn headers() -> Vec { + vec![ + "completed_at".to_string(), + "created_at".to_string(), + "error".to_string(), + "id".to_string(), + "input".to_string(), + "output".to_string(), + "output_format".to_string(), + "src_format".to_string(), + "started_at".to_string(), + "status".to_string(), + "updated_at".to_string(), + "user_id".to_string(), + ] + } +} + +#[doc = "The valid types of radioactivity unit formats. These describe the amount of radiation \ + emitted by a radioactive material."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, Eq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + tabled :: Tabled, + clap :: ValueEnum, + parse_display :: FromStr, + parse_display :: Display, +)] +pub enum UnitRadioactivityFormat { + #[serde(rename = "becquerel")] + #[display("becquerel")] + Becquerel, + #[serde(rename = "curie")] + #[display("curie")] + Curie, + #[serde(rename = "rutherford")] + #[display("rutherford")] + Rutherford, +} + #[doc = "A unit conversion."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitSolidAngleConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9684,14 +10456,14 @@ pub struct UnitSolidAngleConversion { pub output_format: UnitSolidAngleFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitSolidAngleFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9798,15 +10570,15 @@ pub enum UnitSolidAngleFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitTemperatureConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9818,14 +10590,14 @@ pub struct UnitTemperatureConversion { pub output_format: UnitTemperatureFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitTemperatureFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -9938,15 +10710,15 @@ pub enum UnitTemperatureFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitTimeConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -9958,14 +10730,14 @@ pub struct UnitTimeConversion { pub output_format: UnitTimeFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitTimeFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -10087,15 +10859,15 @@ pub enum UnitTimeFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitVelocityConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -10107,14 +10879,14 @@ pub struct UnitVelocityConversion { pub output_format: UnitVelocityFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitVelocityFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -10227,15 +10999,15 @@ pub enum UnitVelocityFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitVoltageConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -10247,14 +11019,14 @@ pub struct UnitVoltageConversion { pub output_format: UnitVoltageFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitVoltageFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -10361,15 +11133,15 @@ pub enum UnitVoltageFormat { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct UnitVolumeConversion { - #[doc = "The time and date the unit conversion was completed."] + #[doc = "The time and date the API call was completed."] #[serde(default, skip_serializing_if = "Option::is_none")] pub completed_at: Option>, - #[doc = "The time and date the unit conversion was created."] + #[doc = "The time and date the API call was created."] pub created_at: chrono::DateTime, #[doc = "The error the function returned, if any."] #[serde(default, skip_serializing_if = "Option::is_none")] pub error: Option, - #[doc = "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID."] + #[doc = "The unique identifier of the API call.\n\nThis is the same as the API call ID."] pub id: uuid::Uuid, #[doc = "The input value."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -10381,14 +11153,14 @@ pub struct UnitVolumeConversion { pub output_format: UnitVolumeFormat, #[doc = "The source format of the unit conversion."] pub src_format: UnitVolumeFormat, - #[doc = "The time and date the unit conversion was started."] + #[doc = "The time and date the API call was started."] #[serde(default, skip_serializing_if = "Option::is_none")] pub started_at: Option>, - #[doc = "The status of the unit conversion."] + #[doc = "The status of the API call."] pub status: ApiCallStatus, - #[doc = "The time and date the unit conversion was last updated."] + #[doc = "The time and date the API call was last updated."] pub updated_at: chrono::DateTime, - #[doc = "The user ID of the user who created the unit conversion."] + #[doc = "The user ID of the user who created the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub user_id: Option, } @@ -10479,21 +11251,24 @@ impl tabled::Tabled for UnitVolumeConversion { parse_display :: Display, )] pub enum UnitVolumeFormat { - #[serde(rename = "cubic_millimeter")] - #[display("cubic_millimeter")] - CubicMillimeter, - #[serde(rename = "cubic_centimeter")] - #[display("cubic_centimeter")] - CubicCentimeter, #[serde(rename = "cubic_meter")] #[display("cubic_meter")] CubicMeter, + #[serde(rename = "cubic_centimeter")] + #[display("cubic_centimeter")] + CubicCentimeter, + #[serde(rename = "cubic_millimeter")] + #[display("cubic_millimeter")] + CubicMillimeter, #[serde(rename = "cubic_kilometer")] #[display("cubic_kilometer")] CubicKilometer, #[serde(rename = "liter")] #[display("liter")] Liter, + #[serde(rename = "cubic_inch")] + #[display("cubic_inch")] + CubicInch, #[serde(rename = "cubic_foot")] #[display("cubic_foot")] CubicFoot, @@ -10503,6 +11278,69 @@ pub enum UnitVolumeFormat { #[serde(rename = "cubic_mile")] #[display("cubic_mile")] CubicMile, + #[serde(rename = "gallon")] + #[display("gallon")] + Gallon, + #[serde(rename = "quart")] + #[display("quart")] + Quart, + #[serde(rename = "pint")] + #[display("pint")] + Pint, + #[serde(rename = "cup")] + #[display("cup")] + Cup, + #[serde(rename = "fluid_ounce")] + #[display("fluid_ounce")] + FluidOunce, + #[serde(rename = "barrel")] + #[display("barrel")] + Barrel, + #[serde(rename = "bushel")] + #[display("bushel")] + Bushel, + #[serde(rename = "cord")] + #[display("cord")] + Cord, + #[serde(rename = "cubic_fathom")] + #[display("cubic_fathom")] + CubicFathom, + #[serde(rename = "tablespoon")] + #[display("tablespoon")] + Tablespoon, + #[serde(rename = "teaspoon")] + #[display("teaspoon")] + Teaspoon, + #[serde(rename = "pinch")] + #[display("pinch")] + Pinch, + #[serde(rename = "dash")] + #[display("dash")] + Dash, + #[serde(rename = "drop")] + #[display("drop")] + Drop, + #[serde(rename = "fifth")] + #[display("fifth")] + Fifth, + #[serde(rename = "dram")] + #[display("dram")] + Dram, + #[serde(rename = "gill")] + #[display("gill")] + Gill, + #[serde(rename = "peck")] + #[display("peck")] + Peck, + #[serde(rename = "sack")] + #[display("sack")] + Sack, + #[serde(rename = "shot")] + #[display("shot")] + Shot, + #[serde(rename = "strike")] + #[display("strike")] + Strike, } #[doc = "The user-modifiable parts of a User."] diff --git a/kittycad/src/unit.rs b/kittycad/src/unit.rs index 9ce5d241..efb5f6ca 100644 --- a/kittycad/src/unit.rs +++ b/kittycad/src/unit.rs @@ -43,8 +43,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -61,7 +60,7 @@ impl Unit { } } - #[doc = "Convert angle units.\n\nConvert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitAngleFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitAngleFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_angle_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngleConversion = client\n .unit()\n .get_angle_conversion(\n kittycad::types::UnitAngleFormat::Arcsecond,\n kittycad::types::UnitAngleFormat::Arcsecond,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert angle units.\n\nConvert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitAngleFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitAngleFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_angle_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngleConversion = client\n .unit()\n .get_angle_conversion(\n kittycad::types::UnitAngleFormat::Degree,\n kittycad::types::UnitAngleFormat::Arcminute,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_angle_conversion<'a>( &'a self, @@ -80,8 +79,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -98,7 +96,7 @@ impl Unit { } } - #[doc = "Convert angular velocity units.\n\nConvert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitAngularVelocityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitAngularVelocityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_angular_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngularVelocityConversion = client\n .unit()\n .get_angular_velocity_conversion(\n kittycad::types::UnitAngularVelocityFormat::MilliarcsecondsPerYear,\n kittycad::types::UnitAngularVelocityFormat::DegreesPerSecond,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert angular velocity units.\n\nConvert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitAngularVelocityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitAngularVelocityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_angular_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAngularVelocityConversion = client\n .unit()\n .get_angular_velocity_conversion(\n kittycad::types::UnitAngularVelocityFormat::RevolutionsPerMinute,\n kittycad::types::UnitAngularVelocityFormat::RevolutionsPerMinute,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_angular_velocity_conversion<'a>( &'a self, @@ -117,8 +115,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -135,7 +132,7 @@ impl Unit { } } - #[doc = "Convert area units.\n\nConvert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitAreaFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitAreaFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_area_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAreaConversion = client\n .unit()\n .get_area_conversion(\n kittycad::types::UnitAreaFormat::SquareMile,\n kittycad::types::UnitAreaFormat::Hectare,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert area units.\n\nConvert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitAreaFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitAreaFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_area_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitAreaConversion = client\n .unit()\n .get_area_conversion(\n kittycad::types::UnitAreaFormat::Hectare,\n kittycad::types::UnitAreaFormat::SquareKilometer,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_area_conversion<'a>( &'a self, @@ -154,8 +151,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -172,7 +168,7 @@ impl Unit { } } - #[doc = "Convert charge units.\n\nConvert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitChargeFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitChargeFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_charge_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitChargeConversion = client\n .unit()\n .get_charge_conversion(\n kittycad::types::UnitChargeFormat::AmpereHour,\n kittycad::types::UnitChargeFormat::AmpereHour,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert charge units.\n\nConvert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitChargeFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitChargeFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_charge_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitChargeConversion = client\n .unit()\n .get_charge_conversion(\n kittycad::types::UnitChargeFormat::AmpereHour,\n kittycad::types::UnitChargeFormat::Coulomb,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_charge_conversion<'a>( &'a self, @@ -191,8 +187,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -219,9 +214,9 @@ impl Unit { kittycad::Client::new_from_env();\n let result: \ kittycad::types::UnitConcentrationConversion = client\n .unit()\n \ .get_concentration_conversion(\n \ - kittycad::types::UnitConcentrationFormat::Percent,\n \ - kittycad::types::UnitConcentrationFormat::PartsPerTrillion,\n 3.14 as \ - f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + kittycad::types::UnitConcentrationFormat::PartsPerTrillion,\n \ + kittycad::types::UnitConcentrationFormat::Percent,\n 3.14 as f64,\n \ + )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_concentration_conversion<'a>( &'a self, @@ -240,8 +235,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -290,8 +284,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -308,7 +301,7 @@ impl Unit { } } - #[doc = "Convert data units.\n\nConvert a data unit value to another data unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitDataFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitDataFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_data_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDataConversion = client\n .unit()\n .get_data_conversion(\n kittycad::types::UnitDataFormat::Exabyte,\n kittycad::types::UnitDataFormat::Bit,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert data units.\n\nConvert a data unit value to another data unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitDataFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitDataFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_data_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDataConversion = client\n .unit()\n .get_data_conversion(\n kittycad::types::UnitDataFormat::Exabit,\n kittycad::types::UnitDataFormat::Exabit,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_data_conversion<'a>( &'a self, @@ -327,8 +320,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -345,7 +337,7 @@ impl Unit { } } - #[doc = "Convert density units.\n\nConvert a density unit value to another density unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitDensityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitDensityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_density_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDensityConversion = client\n .unit()\n .get_density_conversion(\n kittycad::types::UnitDensityFormat::KilogramsPerLiter,\n kittycad::types::UnitDensityFormat::KilogramsPerLiter,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert density units.\n\nConvert a density unit value to another density unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitDensityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitDensityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_density_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitDensityConversion = client\n .unit()\n .get_density_conversion(\n kittycad::types::UnitDensityFormat::GramsPerMilliliter,\n kittycad::types::UnitDensityFormat::OuncesPerGallon,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_density_conversion<'a>( &'a self, @@ -364,8 +356,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -382,7 +373,7 @@ impl Unit { } } - #[doc = "Convert energy units.\n\nConvert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitEnergyFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitEnergyFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_energy_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitEnergyConversion = client\n .unit()\n .get_energy_conversion(\n kittycad::types::UnitEnergyFormat::BritishThermalUnitIso,\n kittycad::types::UnitEnergyFormat::BritishThermalUnit59,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert energy units.\n\nConvert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitEnergyFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitEnergyFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_energy_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitEnergyConversion = client\n .unit()\n .get_energy_conversion(\n kittycad::types::UnitEnergyFormat::Calorie,\n kittycad::types::UnitEnergyFormat::FootPound,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_energy_conversion<'a>( &'a self, @@ -401,8 +392,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -419,7 +409,7 @@ impl Unit { } } - #[doc = "Convert force units.\n\nConvert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitForceFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitForceFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_force_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitForceConversion = client\n .unit()\n .get_force_conversion(\n kittycad::types::UnitForceFormat::Newton,\n kittycad::types::UnitForceFormat::Kilopound,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert force units.\n\nConvert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitForceFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitForceFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_force_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitForceConversion = client\n .unit()\n .get_force_conversion(\n kittycad::types::UnitForceFormat::Newton,\n kittycad::types::UnitForceFormat::Dyne,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_force_conversion<'a>( &'a self, @@ -438,8 +428,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -456,7 +445,19 @@ impl Unit { } } - #[doc = "Convert illuminance units.\n\nConvert a illuminance unit value to another illuminance unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitIlluminanceFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitIlluminanceFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_illuminance_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitIlluminanceConversion = client\n .unit()\n .get_illuminance_conversion(\n kittycad::types::UnitIlluminanceFormat::Footcandle,\n kittycad::types::UnitIlluminanceFormat::Footcandle,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert illuminance units.\n\nConvert a illuminance unit value to another illuminance \ + unit value. This is a nice endpoint to use for helper \ + functions.\n\n**Parameters:**\n\n- `output_format: \ + crate::types::UnitIlluminanceFormat`: The output format of the unit. (required)\n- \ + `src_format: crate::types::UnitIlluminanceFormat`: The source format of the unit. \ + (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn \ + example_unit_get_illuminance_conversion() -> anyhow::Result<()> {\n let client = \ + kittycad::Client::new_from_env();\n let result: \ + kittycad::types::UnitIlluminanceConversion = client\n .unit()\n \ + .get_illuminance_conversion(\n \ + kittycad::types::UnitIlluminanceFormat::LumensPerSquareInch,\n \ + kittycad::types::UnitIlluminanceFormat::LumensPerSquareInch,\n 3.14 as \ + f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_illuminance_conversion<'a>( &'a self, @@ -475,8 +476,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -493,7 +493,7 @@ impl Unit { } } - #[doc = "Convert length units.\n\nConvert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitLengthFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitLengthFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_length_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitLengthConversion = client\n .unit()\n .get_length_conversion(\n kittycad::types::UnitLengthFormat::Yard,\n kittycad::types::UnitLengthFormat::Yard,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert length units.\n\nConvert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitLengthFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitLengthFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_length_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitLengthConversion = client\n .unit()\n .get_length_conversion(\n kittycad::types::UnitLengthFormat::Chain,\n kittycad::types::UnitLengthFormat::Hand,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_length_conversion<'a>( &'a self, @@ -512,8 +512,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -530,7 +529,7 @@ impl Unit { } } - #[doc = "Convert magnetic field strength units.\n\nConvert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMagneticFieldStrengthFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMagneticFieldStrengthFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_magnetic_field_strength_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMagneticFieldStrengthConversion = client\n .unit()\n .get_magnetic_field_strength_conversion(\n kittycad::types::UnitMagneticFieldStrengthFormat::Tesla,\n kittycad::types::UnitMagneticFieldStrengthFormat::Gauss,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert magnetic field strength units.\n\nConvert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMagneticFieldStrengthFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMagneticFieldStrengthFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_magnetic_field_strength_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMagneticFieldStrengthConversion = client\n .unit()\n .get_magnetic_field_strength_conversion(\n kittycad::types::UnitMagneticFieldStrengthFormat::Gauss,\n kittycad::types::UnitMagneticFieldStrengthFormat::Gauss,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_magnetic_field_strength_conversion<'a>( &'a self, @@ -549,8 +548,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -577,8 +575,8 @@ impl Unit { kittycad::Client::new_from_env();\n let result: \ kittycad::types::UnitMagneticFluxConversion = client\n .unit()\n \ .get_magnetic_flux_conversion(\n \ - kittycad::types::UnitMagneticFluxFormat::Maxwell,\n \ - kittycad::types::UnitMagneticFluxFormat::Maxwell,\n 3.14 as f64,\n \ + kittycad::types::UnitMagneticFluxFormat::Weber,\n \ + kittycad::types::UnitMagneticFluxFormat::Weber,\n 3.14 as f64,\n \ )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_magnetic_flux_conversion<'a>( @@ -598,8 +596,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -616,7 +613,7 @@ impl Unit { } } - #[doc = "Convert mass units.\n\nConvert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMassFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMassFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_mass_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMassConversion = client\n .unit()\n .get_mass_conversion(\n kittycad::types::UnitMassFormat::Carat,\n kittycad::types::UnitMassFormat::Gram,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert mass units.\n\nConvert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMassFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMassFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_mass_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMassConversion = client\n .unit()\n .get_mass_conversion(\n kittycad::types::UnitMassFormat::ShortTon,\n kittycad::types::UnitMassFormat::Slug,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_mass_conversion<'a>( &'a self, @@ -635,8 +632,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -653,19 +649,7 @@ impl Unit { } } - #[doc = "Convert metric cubed units.\n\nConvert a metric cubed unit value to another metric \ - cubed unit value. This is a nice endpoint to use for helper \ - functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMetricPower`: \ - The output format of the unit. (required)\n- `src_format: \ - crate::types::UnitMetricPower`: The source format of the unit. (required)\n- `value: \ - f64`: The initial value. (required)\n\n```rust,no_run\nasync fn \ - example_unit_get_metric_power_cubed_conversion() -> anyhow::Result<()> {\n let \ - client = kittycad::Client::new_from_env();\n let result: \ - kittycad::types::UnitMetricPowerCubedConversion = client\n .unit()\n \ - .get_metric_power_cubed_conversion(\n \ - kittycad::types::UnitMetricPower::Deci,\n \ - kittycad::types::UnitMetricPower::Peta,\n 3.14 as f64,\n )\n \ - .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert metric cubed units.\n\nConvert a metric cubed unit value to another metric cubed unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_metric_power_cubed_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerCubedConversion = client\n .unit()\n .get_metric_power_cubed_conversion(\n kittycad::types::UnitMetricPower::Exa,\n kittycad::types::UnitMetricPower::Hecto,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_metric_power_cubed_conversion<'a>( &'a self, @@ -684,8 +668,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -702,7 +685,7 @@ impl Unit { } } - #[doc = "Convert metric units.\n\nConvert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_metric_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerConversion = client\n .unit()\n .get_metric_power_conversion(\n kittycad::types::UnitMetricPower::Deci,\n kittycad::types::UnitMetricPower::Femto,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert metric units.\n\nConvert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_metric_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerConversion = client\n .unit()\n .get_metric_power_conversion(\n kittycad::types::UnitMetricPower::Peta,\n kittycad::types::UnitMetricPower::Atto,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_metric_power_conversion<'a>( &'a self, @@ -721,8 +704,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -739,7 +721,19 @@ impl Unit { } } - #[doc = "Convert metric squared units.\n\nConvert a metric squared unit value to another metric squared unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMetricPower`: The output format of the unit. (required)\n- `src_format: crate::types::UnitMetricPower`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_metric_power_squared_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitMetricPowerSquaredConversion = client\n .unit()\n .get_metric_power_squared_conversion(\n kittycad::types::UnitMetricPower::Nano,\n kittycad::types::UnitMetricPower::MetricUnit,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert metric squared units.\n\nConvert a metric squared unit value to another \ + metric squared unit value. This is a nice endpoint to use for helper \ + functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitMetricPower`: \ + The output format of the unit. (required)\n- `src_format: \ + crate::types::UnitMetricPower`: The source format of the unit. (required)\n- `value: \ + f64`: The initial value. (required)\n\n```rust,no_run\nasync fn \ + example_unit_get_metric_power_squared_conversion() -> anyhow::Result<()> {\n let \ + client = kittycad::Client::new_from_env();\n let result: \ + kittycad::types::UnitMetricPowerSquaredConversion = client\n .unit()\n \ + .get_metric_power_squared_conversion(\n \ + kittycad::types::UnitMetricPower::Kilo,\n \ + kittycad::types::UnitMetricPower::Kilo,\n 3.14 as f64,\n )\n \ + .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_metric_power_squared_conversion<'a>( &'a self, @@ -758,8 +752,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -776,7 +769,7 @@ impl Unit { } } - #[doc = "Convert power units.\n\nConvert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitPowerFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitPowerFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPowerConversion = client\n .unit()\n .get_power_conversion(\n kittycad::types::UnitPowerFormat::Horsepower,\n kittycad::types::UnitPowerFormat::Watt,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert power units.\n\nConvert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitPowerFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitPowerFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_power_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPowerConversion = client\n .unit()\n .get_power_conversion(\n kittycad::types::UnitPowerFormat::Horsepower,\n kittycad::types::UnitPowerFormat::Horsepower,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_power_conversion<'a>( &'a self, @@ -795,8 +788,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -813,7 +805,7 @@ impl Unit { } } - #[doc = "Convert pressure units.\n\nConvert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitPressureFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitPressureFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_pressure_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPressureConversion = client\n .unit()\n .get_pressure_conversion(\n kittycad::types::UnitPressureFormat::PoundsPerSquareInch,\n kittycad::types::UnitPressureFormat::Bar,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert pressure units.\n\nConvert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitPressureFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitPressureFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_pressure_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitPressureConversion = client\n .unit()\n .get_pressure_conversion(\n kittycad::types::UnitPressureFormat::Bar,\n kittycad::types::UnitPressureFormat::Mbar,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_pressure_conversion<'a>( &'a self, @@ -832,8 +824,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -850,7 +841,7 @@ impl Unit { } } - #[doc = "Convert radiation units.\n\nConvert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitRadiationFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitRadiationFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_radiation_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitRadiationConversion = client\n .unit()\n .get_radiation_conversion(\n kittycad::types::UnitRadiationFormat::Sievert,\n kittycad::types::UnitRadiationFormat::Gray,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert radiation units.\n\nConvert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitRadiationFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitRadiationFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_radiation_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitRadiationConversion = client\n .unit()\n .get_radiation_conversion(\n kittycad::types::UnitRadiationFormat::Sievert,\n kittycad::types::UnitRadiationFormat::Rad,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_radiation_conversion<'a>( &'a self, @@ -869,8 +860,43 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; + req = req.query(&query_params); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + + #[doc = "Convert radioactivity units.\n\nConvert a radioactivity unit value to another radioactivity unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitRadioactivityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitRadioactivityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_radioactivity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitRadioactivityConversion = client\n .unit()\n .get_radioactivity_conversion(\n kittycad::types::UnitRadioactivityFormat::Rutherford,\n kittycad::types::UnitRadioactivityFormat::Rutherford,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn get_radioactivity_conversion<'a>( + &'a self, + output_format: crate::types::UnitRadioactivityFormat, + src_format: crate::types::UnitRadioactivityFormat, + value: f64, + ) -> Result { + let mut req = self.client.client.request( + http::Method::GET, + &format!( + "{}/{}", + self.client.base_url, + "unit/conversion/radioactivity/{src_format}/{output_format}" + .replace("{output_format}", &format!("{}", output_format)) + .replace("{src_format}", &format!("{}", src_format)) + ), + ); + req = req.bearer_auth(&self.client.token); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -918,8 +944,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -947,7 +972,7 @@ impl Unit { kittycad::types::UnitTemperatureConversion = client\n .unit()\n \ .get_temperature_conversion(\n \ kittycad::types::UnitTemperatureFormat::Kelvin,\n \ - kittycad::types::UnitTemperatureFormat::Kelvin,\n 3.14 as f64,\n \ + kittycad::types::UnitTemperatureFormat::Celsius,\n 3.14 as f64,\n \ )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_temperature_conversion<'a>( @@ -967,8 +992,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -985,7 +1009,7 @@ impl Unit { } } - #[doc = "Convert time units.\n\nConvert a time unit value to another time unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitTimeFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitTimeFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_time_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitTimeConversion = client\n .unit()\n .get_time_conversion(\n kittycad::types::UnitTimeFormat::Second,\n kittycad::types::UnitTimeFormat::Minute,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert time units.\n\nConvert a time unit value to another time unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitTimeFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitTimeFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_time_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitTimeConversion = client\n .unit()\n .get_time_conversion(\n kittycad::types::UnitTimeFormat::Week,\n kittycad::types::UnitTimeFormat::Day,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_time_conversion<'a>( &'a self, @@ -1004,8 +1028,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -1022,7 +1045,7 @@ impl Unit { } } - #[doc = "Convert velocity units.\n\nConvert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitVelocityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitVelocityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVelocityConversion = client\n .unit()\n .get_velocity_conversion(\n kittycad::types::UnitVelocityFormat::Knot,\n kittycad::types::UnitVelocityFormat::MetersPerSecond,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert velocity units.\n\nConvert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitVelocityFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitVelocityFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_velocity_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVelocityConversion = client\n .unit()\n .get_velocity_conversion(\n kittycad::types::UnitVelocityFormat::FeetPerSecond,\n kittycad::types::UnitVelocityFormat::Knot,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_velocity_conversion<'a>( &'a self, @@ -1041,8 +1064,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -1059,7 +1081,7 @@ impl Unit { } } - #[doc = "Convert voltage units.\n\nConvert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitVoltageFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitVoltageFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_voltage_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVoltageConversion = client\n .unit()\n .get_voltage_conversion(\n kittycad::types::UnitVoltageFormat::Abvolt,\n kittycad::types::UnitVoltageFormat::Statvolt,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert voltage units.\n\nConvert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitVoltageFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitVoltageFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_voltage_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVoltageConversion = client\n .unit()\n .get_voltage_conversion(\n kittycad::types::UnitVoltageFormat::Statvolt,\n kittycad::types::UnitVoltageFormat::Statvolt,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_voltage_conversion<'a>( &'a self, @@ -1078,8 +1100,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); @@ -1096,7 +1117,7 @@ impl Unit { } } - #[doc = "Convert volume units.\n\nConvert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitVolumeFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitVolumeFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_volume_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVolumeConversion = client\n .unit()\n .get_volume_conversion(\n kittycad::types::UnitVolumeFormat::CubicMillimeter,\n kittycad::types::UnitVolumeFormat::CubicFoot,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Convert volume units.\n\nConvert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.\n\n**Parameters:**\n\n- `output_format: crate::types::UnitVolumeFormat`: The output format of the unit. (required)\n- `src_format: crate::types::UnitVolumeFormat`: The source format of the unit. (required)\n- `value: f64`: The initial value. (required)\n\n```rust,no_run\nasync fn example_unit_get_volume_conversion() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UnitVolumeConversion = client\n .unit()\n .get_volume_conversion(\n kittycad::types::UnitVolumeFormat::Sack,\n kittycad::types::UnitVolumeFormat::FluidOunce,\n 3.14 as f64,\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_volume_conversion<'a>( &'a self, @@ -1115,8 +1136,7 @@ impl Unit { ), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); - query_params.push(("value", format!("{}", value))); + let query_params = vec![("value", format!("{}", value))]; req = req.query(&query_params); let resp = req.send().await?; let status = resp.status(); diff --git a/kittycad/src/users.rs b/kittycad/src/users.rs index d086d090..98e40285 100644 --- a/kittycad/src/users.rs +++ b/kittycad/src/users.rs @@ -114,6 +114,64 @@ impl Users { } } + #[doc = "Get your user's front verification hash.\n\nThis info is sent to front when \ + initialing the front chat, it prevents impersonations using js hacks in the \ + browser\n\n```rust,no_run\nasync fn example_users_get_front_hash_self() -> \ + anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ + result: String = client.users().get_front_hash_self().await?;\n println!(\"{:?}\", \ + result);\n Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn get_front_hash_self<'a>(&'a self) -> Result { + let mut req = self.client.client.request( + http::Method::GET, + &format!("{}/{}", self.client.base_url, "user/front-hash"), + ); + req = req.bearer_auth(&self.client.token); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + + #[doc = "Get your user's onboarding status.\n\nChecks key part of their api usage to determine \ + their onboarding progress\n\n```rust,no_run\nasync fn \ + example_users_get_onboarding_self() -> anyhow::Result<()> {\n let client = \ + kittycad::Client::new_from_env();\n let result: kittycad::types::Onboarding = \ + client.users().get_onboarding_self().await?;\n println!(\"{:?}\", result);\n \ + Ok(())\n}\n```"] + #[tracing::instrument] + pub async fn get_onboarding_self<'a>( + &'a self, + ) -> Result { + let mut req = self.client.client.request( + http::Method::GET, + &format!("{}/{}", self.client.base_url, "user/onboarding"), + ); + req = req.bearer_auth(&self.client.token); + let resp = req.send().await?; + let status = resp.status(); + if status.is_success() { + let text = resp.text().await.unwrap_or_default(); + serde_json::from_str(&text).map_err(|err| { + crate::types::error::Error::from_serde_error( + format_serde_error::SerdeError::new(text.to_string(), err), + status, + ) + }) + } else { + Err(crate::types::error::Error::UnexpectedResponse(resp)) + } + } + #[doc = "List users.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list<'a>( @@ -127,7 +185,7 @@ impl Users { &format!("{}/{}", self.client.base_url, "users"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } @@ -216,7 +274,7 @@ impl Users { .boxed() } - #[doc = "List users with extended information.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List users with extended information.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_extended<'a>( &'a self, @@ -229,7 +287,7 @@ impl Users { &format!("{}/{}", self.client.base_url, "users-extended"), ); req = req.bearer_auth(&self.client.token); - let mut query_params = Vec::new(); + let mut query_params = vec![]; if let Some(p) = limit { query_params.push(("limit", format!("{}", p))); } @@ -258,7 +316,7 @@ impl Users { } } - #[doc = "List users with extended information.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List users with extended information.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtAscending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub fn list_extended_stream<'a>( &'a self, diff --git a/openapitor/src/functions.rs b/openapitor/src/functions.rs index bdfe9e72..da819e1a 100644 --- a/openapitor/src/functions.rs +++ b/openapitor/src/functions.rs @@ -925,7 +925,8 @@ fn get_function_body( // Let's get the query parameters. let query_params = get_query_params(type_space, op, global_params)?; let query_params_code = if !query_params.is_empty() && !paginated { - let mut array = Vec::new(); + let mut required_params = Vec::new(); + let mut optional_params = Vec::new(); for (name, t) in &query_params { let cleaned_name = crate::types::clean_property_name(name); let name_ident = format_ident!("{}", cleaned_name); @@ -933,33 +934,33 @@ fn get_function_body( let type_text = crate::types::get_text(t)?; if t.is_vec()? { - array.push(quote! { - query_params.push((#name, itertools::join(#name_ident, ","))); + required_params.push(quote! { + (#name, itertools::join(#name_ident, ",")) }) } else if !t.is_option()? { if type_text == "String" { - array.push(quote! { - query_params.push((#name, #name_ident)); + required_params.push(quote! { + (#name, #name_ident) }) } else { - array.push(quote! { - query_params.push((#name, format!("{}", #name_ident))); + required_params.push(quote! { + (#name, format!("{}", #name_ident)) }) } } else if type_text == "Option" { - array.push(quote! { + optional_params.push(quote! { if let Some(p) = #name_ident { query_params.push((#name, p)); } }) } else if t.is_option_vec()? { - array.push(quote! { + optional_params.push(quote! { if let Some(p) = #name_ident { query_params.push((#name, itertools::join(p, ","))); } }) } else { - array.push(quote! { + optional_params.push(quote! { if let Some(p) = #name_ident { query_params.push((#name, format!("{}", p))); } @@ -967,9 +968,14 @@ fn get_function_body( } } + let is_mut = if optional_params.is_empty() { + quote!() + } else { + quote!(mut) + }; quote! { - let mut query_params = Vec::new(); - #(#array)* + let #is_mut query_params = vec![ #(#required_params),* ]; + #(#optional_params)* req = req.query(&query_params); } } else { diff --git a/openapitor/src/types/mod.rs b/openapitor/src/types/mod.rs index 7c0e8475..54a3145f 100644 --- a/openapitor/src/types/mod.rs +++ b/openapitor/src/types/mod.rs @@ -965,9 +965,10 @@ impl TypeSpace { Some(v) => v, None => { anyhow::bail!( - "no property `{}` in object, even through we thought we had content", - content - ); + "no property `{}` in object, even through we thought we had \ + content", + content + ); } }; From c1b3a508ae55a5a8a3a28b362bbb939b22bafb0e Mon Sep 17 00:00:00 2001 From: Adam Sunderland Date: Mon, 30 Jan 2023 15:01:00 -0500 Subject: [PATCH 3/3] Change step header --- assets/in_step.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/in_step.stp b/assets/in_step.stp index 6beaa9f4..4371a24d 100644 --- a/assets/in_step.stp +++ b/assets/in_step.stp @@ -2,7 +2,7 @@ ISO-10303-21; HEADER; FILE_DESCRIPTION (( 'STEP AP203' ), '1' ); -FILE_NAME ('in_test_step_needs_workaround.step'), +FILE_NAME ('in_test_step_needs_workaround.step', '2021-12-30T05:12:11', ( 'Administrator' ), ( 'Managed by Terraform' ),