diff --git a/spec.json b/spec.json index 7ea78a6..dbe5e98 100644 --- a/spec.json +++ b/spec.json @@ -69,68 +69,6 @@ } } }, - "/.well-known/ai-plugin.json": { - "get": { - "tags": [ - "meta", - "hidden" - ], - "summary": "Get AI plugin manifest.", - "operationId": "get_ai_plugin_manifest", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiPluginManifest" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, "/_meta/info": { "get": { "tags": [ @@ -1403,8 +1341,7 @@ "/file/center-of-mass": { "post": { "tags": [ - "file", - "beta" + "file" ], "summary": "Get CAD file center of mass.", "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cartesian coordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", @@ -1715,8 +1652,7 @@ "/file/density": { "post": { "tags": [ - "file", - "beta" + "file" ], "summary": "Get CAD file density.", "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", @@ -2036,8 +1972,7 @@ "/file/mass": { "post": { "tags": [ - "file", - "beta" + "file" ], "summary": "Get CAD file mass.", "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", @@ -2200,8 +2135,7 @@ "/file/surface-area": { "post": { "tags": [ - "file", - "beta" + "file" ], "summary": "Get CAD file surface area.", "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the square measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", @@ -2346,8 +2280,7 @@ "/file/volume": { "post": { "tags": [ - "file", - "beta" + "file" ], "summary": "Get CAD file volume.", "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cubic measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", @@ -3276,67 +3209,6 @@ } } }, - "/openai/openapi.json": { - "get": { - "tags": [ - "meta", - "hidden" - ], - "summary": "Get AI plugin OpenAPI schema.", - "description": "This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.", - "operationId": "get_openai_schema", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": {} - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, "/ping": { "get": { "tags": [ @@ -6418,8 +6290,7 @@ "/user/text-to-cad": { "get": { "tags": [ - "ai", - "beta" + "ai" ], "summary": "List text-to-CAD models you've generated.", "description": "This will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.", @@ -6451,6 +6322,15 @@ "schema": { "$ref": "#/components/schemas/CreatedAtSortMode" } + }, + { + "in": "query", + "name": "no_models", + "description": "If we should return the model file contents or just the metadata.", + "schema": { + "nullable": true, + "type": "boolean" + } } ], "responses": { @@ -6513,8 +6393,7 @@ "/user/text-to-cad/{id}": { "get": { "tags": [ - "ai", - "beta" + "ai" ], "summary": "Get a text-to-CAD response.", "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.", @@ -7332,185 +7211,6 @@ } ] }, - "AiPluginApi": { - "description": "AI plugin api information.", - "type": "object", - "properties": { - "is_user_authenticated": { - "description": "If the API is authenticated.", - "default": false, - "type": "boolean" - }, - "type": { - "description": "The type of API.", - "default": "openapi", - "allOf": [ - { - "$ref": "#/components/schemas/AiPluginApiType" - } - ] - }, - "url": { - "description": "The url to the API's schema.", - "type": "string", - "format": "uri" - } - }, - "required": [ - "url" - ] - }, - "AiPluginApiType": { - "description": "AI plugin api type.", - "oneOf": [ - { - "description": "An OpenAPI specification.", - "type": "string", - "enum": [ - "openapi" - ] - } - ] - }, - "AiPluginAuth": { - "description": "AI plugin auth information.", - "type": "object", - "properties": { - "authorization_type": { - "nullable": true, - "description": "The type of http authorization.", - "allOf": [ - { - "$ref": "#/components/schemas/AiPluginHttpAuthType" - } - ] - }, - "type": { - "description": "The type of authentication.", - "default": "none", - "allOf": [ - { - "$ref": "#/components/schemas/AiPluginAuthType" - } - ] - } - } - }, - "AiPluginAuthType": { - "description": "AI plugin auth type.", - "oneOf": [ - { - "description": "None.", - "type": "string", - "enum": [ - "none" - ] - }, - { - "description": "User http.", - "type": "string", - "enum": [ - "user_http" - ] - }, - { - "description": "Service http.", - "type": "string", - "enum": [ - "service_http" - ] - }, - { - "description": "OAuth.", - "type": "string", - "enum": [ - "oauth" - ] - } - ] - }, - "AiPluginHttpAuthType": { - "description": "AI plugin http auth type.", - "oneOf": [ - { - "description": "Basic.", - "type": "string", - "enum": [ - "basic" - ] - }, - { - "description": "Bearer.", - "type": "string", - "enum": [ - "bearer" - ] - } - ] - }, - "AiPluginManifest": { - "description": "AI plugin manifest.\n\nThis is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).", - "type": "object", - "properties": { - "api": { - "description": "API specification.", - "allOf": [ - { - "$ref": "#/components/schemas/AiPluginApi" - } - ] - }, - "auth": { - "description": "Authentication schema.", - "allOf": [ - { - "$ref": "#/components/schemas/AiPluginAuth" - } - ] - }, - "contact_email": { - "description": "Email contact for safety/moderation reachout, support, and deactivation.", - "type": "string", - "format": "email" - }, - "description_for_human": { - "description": "Human-readable description of the plugin.", - "type": "string" - }, - "description_for_model": { - "description": "Description better tailored to the model, such as token context length considerations or keyword usage for improved plugin prompting.", - "type": "string" - }, - "legal_info_url": { - "description": "Redirect URL for users to view plugin information.", - "type": "string", - "format": "uri" - }, - "logo_url": { - "description": "URL used to fetch the plugin's logo.", - "type": "string", - "format": "uri" - }, - "name_for_human": { - "description": "Human-readable name, such as the full company name.", - "type": "string" - }, - "name_for_model": { - "description": "Name the model will used to target the plugin.", - "type": "string" - }, - "schema_version": { - "description": "Manifest schema version.", - "type": "string" - } - }, - "required": [ - "api", - "auth", - "legal_info_url", - "logo_url" - ] - }, "AiPrompt": { "description": "An AI prompt.", "type": "object", @@ -9207,6 +8907,25 @@ } } }, + "BlockReason": { + "description": "The reason for blocking a user.", + "oneOf": [ + { + "description": "The user is missing a payment method and has exceeded their free API call credits for the month.", + "type": "string", + "enum": [ + "missing_payment_method" + ] + }, + { + "description": "The users payment method has failed.", + "type": "string", + "enum": [ + "payment_method_failed" + ] + } + ] + }, "CacheMetadata": { "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", "type": "object", @@ -9861,6 +9580,19 @@ "description": "Unique identifier for the object.", "type": "string" }, + "metadata": { + "description": "Set of key-value pairs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "nullable": true, + "description": "Name of the coupon displayed to customers on, for instance invoices, or receipts.\n\nBy default the `id` is shown if `name` is not set.", + "type": "string" + }, "percent_off": { "nullable": true, "description": "Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.\n\nFor example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.", @@ -10388,7 +10120,8 @@ "solid3d", "edge", "face", - "plane" + "plane", + "vertex" ] }, "Environment": { @@ -10541,9 +10274,18 @@ ] }, "ExtendedUser": { - "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front", + "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp | Stripe", "type": "object", "properties": { + "block": { + "nullable": true, + "description": "If the user should be blocked and the reason why.", + "allOf": [ + { + "$ref": "#/components/schemas/BlockReason" + } + ] + }, "company": { "description": "The user's company.", "type": "string" @@ -12055,13 +11797,6 @@ "InvoiceStatus": { "description": "An enum representing the possible values of an `Invoice`'s `status` field.", "oneOf": [ - { - "description": "Deleted.", - "type": "string", - "enum": [ - "deleted" - ] - }, { "description": "Draft.", "type": "string", @@ -14689,6 +14424,92 @@ "spacing", "type" ] + }, + { + "description": "When you select some entity with the current tool, what should happen to the entity?", + "type": "object", + "properties": { + "selection_type": { + "description": "What type of selection should occur when you select something?", + "allOf": [ + { + "$ref": "#/components/schemas/SceneSelectionType" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "set_selection_type" + ] + } + }, + "required": [ + "selection_type", + "type" + ] + }, + { + "description": "What kind of entities can be selected?", + "type": "object", + "properties": { + "filter": { + "description": "If vector is empty, clear all filters. If vector is non-empty, only the given entity types will be selectable.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityType" + } + }, + "type": { + "type": "string", + "enum": [ + "set_selection_filter" + ] + } + }, + "required": [ + "filter", + "type" + ] + }, + { + "description": "Use orthographic projection.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "default_camera_set_orthographic" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "Use perspective projection.", + "type": "object", + "properties": { + "parameters": { + "nullable": true, + "description": "If this is not given, use the same parameters as last time the perspective camera was used.", + "allOf": [ + { + "$ref": "#/components/schemas/PerspectiveCameraParameters" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "default_camera_set_perspective" + ] + } + }, + "required": [ + "type" + ] } ] }, @@ -15641,24 +15462,25 @@ "type": "object", "properties": { "first_call_from_modeling_app_date": { + "nullable": true, + "title": "DateTime", "description": "When the user first used the modeling app.", - "type": "string" + "type": "string", + "format": "date-time" }, "first_call_from_text_to_cad_date": { + "nullable": true, + "title": "DateTime", "description": "When the user first used text-to-CAD.", - "type": "string" - }, - "first_call_from_their_machine_date": { - "description": "When the user first called an endpoint from their machine (i.e. not a litterbox execution).", - "type": "string" - }, - "first_litterbox_execute_date": { - "description": "When the user first used the litterbox.", - "type": "string" + "type": "string", + "format": "date-time" }, "first_token_date": { + "nullable": true, + "title": "DateTime", "description": "When the user created their first token.", - "type": "string" + "type": "string", + "format": "date-time" } } }, @@ -16305,6 +16127,32 @@ } ] }, + "PerspectiveCameraParameters": { + "description": "Defines a perspective view.", + "type": "object", + "properties": { + "fov_y": { + "description": "Camera frustum vertical field of view.", + "type": "number", + "format": "float" + }, + "z_far": { + "description": "Camera frustum far plane.", + "type": "number", + "format": "float" + }, + "z_near": { + "description": "Camera frustum near plane.", + "type": "number", + "format": "float" + } + }, + "required": [ + "fov_y", + "z_far", + "z_near" + ] + }, "PlaneIntersectAndProject": { "description": "Corresponding coordinates of given window coordinates, intersected on given plane.", "type": "object", @@ -18971,6 +18819,15 @@ "description": "A user.", "type": "object", "properties": { + "block": { + "nullable": true, + "description": "If the user should be blocked and the reason why.", + "allOf": [ + { + "$ref": "#/components/schemas/BlockReason" + } + ] + }, "company": { "description": "The user's company.", "type": "string" @@ -19313,7 +19170,7 @@ "tags": [ { "name": "ai", - "description": "AI uses machine learning to generate 3D meshes.", + "description": "AI uses machine learning to generate CAD models.", "externalDocs": { "url": "https://docs.kittycad.io/api/ai" }