Update api spec (#261)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f32a32d1bc
commit
d2e9b0b865
File diff suppressed because it is too large
Load Diff
@ -133,6 +133,7 @@ from .kcl_code_completion_response import KclCodeCompletionResponse
|
||||
from .leaf_node import LeafNode
|
||||
from .length_unit import LengthUnit
|
||||
from .linear_transform import LinearTransform
|
||||
from .loft import Loft
|
||||
from .mass import Mass
|
||||
from .meta_cluster_info import MetaClusterInfo
|
||||
from .metadata import Metadata
|
||||
@ -235,6 +236,7 @@ from .text_to_cad_iteration import TextToCadIteration
|
||||
from .text_to_cad_iteration_body import TextToCadIterationBody
|
||||
from .text_to_cad_model import TextToCadModel
|
||||
from .text_to_cad_results_page import TextToCadResultsPage
|
||||
from .token_revoke_request_form import TokenRevokeRequestForm
|
||||
from .unit_angle import UnitAngle
|
||||
from .unit_angle_conversion import UnitAngleConversion
|
||||
from .unit_area import UnitArea
|
||||
|
11
kittycad/models/loft.py
Normal file
11
kittycad/models/loft.py
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class Loft(BaseModel):
|
||||
"""The response from the `Loft` command."""
|
||||
|
||||
solid_id: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -100,7 +100,7 @@ class revolve(BaseModel):
|
||||
|
||||
|
||||
class solid3d_shell_face(BaseModel):
|
||||
"""Command for revolving a solid 2d."""
|
||||
"""Command for shelling a solid3d face"""
|
||||
|
||||
face_ids: List[str]
|
||||
|
||||
@ -131,6 +131,24 @@ class revolve_about_edge(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class loft(BaseModel):
|
||||
"""Command for lofting sections to create a solid"""
|
||||
|
||||
base_curve_index: Optional[int] = None
|
||||
|
||||
bez_approximate_rational: bool
|
||||
|
||||
section_ids: List[str]
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
type: Literal["loft"] = "loft"
|
||||
|
||||
v_degree: int
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class close_path(BaseModel):
|
||||
"""Closes a path, converting it to a 2D solid."""
|
||||
|
||||
@ -1287,6 +1305,7 @@ ModelingCmd = RootModel[
|
||||
revolve,
|
||||
solid3d_shell_face,
|
||||
revolve_about_edge,
|
||||
loft,
|
||||
close_path,
|
||||
camera_drag_start,
|
||||
camera_drag_move,
|
||||
|
@ -35,6 +35,7 @@ from ..models.get_sketch_mode_plane import GetSketchModePlane
|
||||
from ..models.highlight_set_entity import HighlightSetEntity
|
||||
from ..models.import_files import ImportFiles
|
||||
from ..models.imported_geometry import ImportedGeometry
|
||||
from ..models.loft import Loft
|
||||
from ..models.mass import Mass
|
||||
from ..models.mouse_click import MouseClick
|
||||
from ..models.path_get_curve_uuid import PathGetCurveUuid
|
||||
@ -147,6 +148,16 @@ class entity_get_sketch_paths(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class loft(BaseModel):
|
||||
"""The response to the 'Loft' endpoint"""
|
||||
|
||||
data: Loft
|
||||
|
||||
type: Literal["loft"] = "loft"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class close_path(BaseModel):
|
||||
"""The response to the 'ClosePath' endpoint"""
|
||||
|
||||
@ -621,6 +632,7 @@ OkModelingCmdResponse = RootModel[
|
||||
entity_get_parent_id,
|
||||
entity_get_all_child_uuids,
|
||||
entity_get_sketch_paths,
|
||||
loft,
|
||||
close_path,
|
||||
camera_drag_move,
|
||||
camera_drag_end,
|
||||
|
16
kittycad/models/token_revoke_request_form.py
Normal file
16
kittycad/models/token_revoke_request_form.py
Normal file
@ -0,0 +1,16 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
|
||||
class TokenRevokeRequestForm(BaseModel):
|
||||
"""The request parameters for the OAuth 2.0 token revocation flow."""
|
||||
|
||||
client_id: str
|
||||
|
||||
client_secret: Optional[str] = None
|
||||
|
||||
token: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
204
spec.json
204
spec.json
@ -4507,6 +4507,98 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/oauth2/token/revoke": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"oauth2",
|
||||
"hidden"
|
||||
],
|
||||
"summary": "Revoke an OAuth2 token.",
|
||||
"description": "This endpoint is designed to be accessed from an *unauthenticated* API client.",
|
||||
"operationId": "oauth2_token_revoke",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/x-www-form-urlencoded": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TokenRevokeRequestForm"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"*/*": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"tags": [
|
||||
"hidden"
|
||||
],
|
||||
"summary": "OPTIONS endpoint.",
|
||||
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
|
||||
"operationId": "options_oauth2_token_revoke",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "successful operation, no content",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"X-Api-Call-Id": {
|
||||
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
|
||||
"style": "simple",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/Error"
|
||||
},
|
||||
"5XX": {
|
||||
"$ref": "#/components/responses/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/org": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@ -19845,6 +19937,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Loft": {
|
||||
"description": "The response from the `Loft` command.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"solid_id": {
|
||||
"description": "The UUID of the newly created solid loft.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"solid_id"
|
||||
]
|
||||
},
|
||||
"Mass": {
|
||||
"description": "The mass response.",
|
||||
"type": "object",
|
||||
@ -20579,7 +20685,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Command for revolving a solid 2d.",
|
||||
"description": "Command for shelling a solid3d face",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"face_ids": {
|
||||
@ -20670,6 +20776,58 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Command for lofting sections to create a solid",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"base_curve_index": {
|
||||
"nullable": true,
|
||||
"description": "This can be set to override the automatically determined topological base curve, which is usually the first section encountered.",
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 0
|
||||
},
|
||||
"bez_approximate_rational": {
|
||||
"description": "Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"section_ids": {
|
||||
"description": "The closed section curves to create a lofted solid from. Currently, these must be Solid2Ds",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"tolerance": {
|
||||
"description": "Tolerance",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/LengthUnit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"loft"
|
||||
]
|
||||
},
|
||||
"v_degree": {
|
||||
"description": "Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction.",
|
||||
"type": "integer",
|
||||
"format": "uint32",
|
||||
"minimum": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bez_approximate_rational",
|
||||
"section_ids",
|
||||
"tolerance",
|
||||
"type",
|
||||
"v_degree"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Closes a path, converting it to a 2D solid.",
|
||||
"type": "object",
|
||||
@ -23742,6 +23900,25 @@
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'Loft' endpoint",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/components/schemas/Loft"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"loft"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "The response to the 'ClosePath' endpoint",
|
||||
"type": "object",
|
||||
@ -27417,6 +27594,31 @@
|
||||
"items"
|
||||
]
|
||||
},
|
||||
"TokenRevokeRequestForm": {
|
||||
"description": "The request parameters for the OAuth 2.0 token revocation flow.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"client_id": {
|
||||
"description": "The client ID.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"client_secret": {
|
||||
"nullable": true,
|
||||
"description": "The client secret.",
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"description": "The token to revoke.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"client_id",
|
||||
"token"
|
||||
]
|
||||
},
|
||||
"UnitAngle": {
|
||||
"description": "The valid types of angle formats.",
|
||||
"oneOf": [
|
||||
|
Reference in New Issue
Block a user