Update api spec (#308)

* 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:
zoo-github-actions-auth[bot]
2024-10-23 09:32:21 -04:00
committed by GitHub
parent 1e8dd64cce
commit 924073c06c
6 changed files with 1008 additions and 910 deletions

File diff suppressed because it is too large Load Diff

View File

@ -84,6 +84,7 @@ from .email_authentication_form import EmailAuthenticationForm
from .empty import Empty
from .enable_dry_run import EnableDryRun
from .enable_sketch_mode import EnableSketchMode
from .engine_util_evaluate_path import EngineUtilEvaluatePath
from .entity_circular_pattern import EntityCircularPattern
from .entity_fade import EntityFade
from .entity_get_all_child_uuids import EntityGetAllChildUuids

View File

@ -0,0 +1,11 @@
from pydantic import BaseModel, ConfigDict
from ..models.point3d import Point3d
class EngineUtilEvaluatePath(BaseModel):
"""The response of the `EngineUtilEvaluatePath` endpoint"""
pos: Point3d
model_config = ConfigDict(protected_namespaces=())

View File

@ -33,6 +33,18 @@ from ..models.unit_mass import UnitMass
from ..models.unit_volume import UnitVolume
class OptionEngineUtilEvaluatePath(BaseModel):
"""Evaluates the position of a path in one shot (engine utility for kcl executor)"""
path_json: str
t: float
type: Literal["engine_util_evaluate_path"] = "engine_util_evaluate_path"
model_config = ConfigDict(protected_namespaces=())
class OptionStartPath(BaseModel):
"""Start a new path."""
@ -1264,7 +1276,7 @@ class OptionZoomToFit(BaseModel):
object_ids: List[str] = []
padding: float
padding: float = 0.0
type: Literal["zoom_to_fit"] = "zoom_to_fit"
@ -1320,6 +1332,7 @@ class OptionGetNumObjects(BaseModel):
ModelingCmd = RootModel[
Annotated[
Union[
OptionEngineUtilEvaluatePath,
OptionStartPath,
OptionMovePathPen,
OptionExtendPath,

View File

@ -27,6 +27,7 @@ from ..models.disable_dry_run import DisableDryRun
from ..models.edge_lines_visible import EdgeLinesVisible
from ..models.enable_dry_run import EnableDryRun
from ..models.enable_sketch_mode import EnableSketchMode
from ..models.engine_util_evaluate_path import EngineUtilEvaluatePath
from ..models.entity_circular_pattern import EntityCircularPattern
from ..models.entity_fade import EntityFade
from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids
@ -125,6 +126,16 @@ class OptionEmpty(BaseModel):
model_config = ConfigDict(protected_namespaces=())
class OptionEngineUtilEvaluatePath(BaseModel):
""""""
data: EngineUtilEvaluatePath
type: Literal["engine_util_evaluate_path"] = "engine_util_evaluate_path"
model_config = ConfigDict(protected_namespaces=())
class OptionStartPath(BaseModel):
""""""
@ -1235,6 +1246,7 @@ OkModelingCmdResponse = RootModel[
Annotated[
Union[
OptionEmpty,
OptionEngineUtilEvaluatePath,
OptionStartPath,
OptionMovePathPen,
OptionExtendPath,

View File

@ -17982,6 +17982,23 @@
"description": "The response from the `EnableSketchMode` endpoint.",
"type": "object"
},
"EngineUtilEvaluatePath": {
"description": "The response of the `EngineUtilEvaluatePath` endpoint",
"type": "object",
"properties": {
"pos": {
"description": "The evaluated path curve position",
"allOf": [
{
"$ref": "#/components/schemas/Point3d"
}
]
}
},
"required": [
"pos"
]
},
"EntityCircularPattern": {
"description": "The response from the `EntityCircularPattern` command.",
"type": "object",
@ -21288,6 +21305,32 @@
"ModelingCmd": {
"description": "Commands that the KittyCAD engine can execute.",
"oneOf": [
{
"description": "Evaluates the position of a path in one shot (engine utility for kcl executor)",
"type": "object",
"properties": {
"path_json": {
"description": "The path in json form (the serialized result of the kcl Sketch/Path object",
"type": "string"
},
"t": {
"description": "The evaluation parameter (path curve parameter in the normalized domain [0, 1])",
"type": "number",
"format": "double"
},
"type": {
"type": "string",
"enum": [
"engine_util_evaluate_path"
]
}
},
"required": [
"path_json",
"t",
"type"
]
},
{
"description": "Start a new path.",
"type": "object",
@ -24354,6 +24397,7 @@
},
"padding": {
"description": "How much to pad the view frame by, as a fraction of the object(s) bounding box size. Negative padding will crop the view of the object proportionally. e.g. padding = 0.2 means the view will span 120% of the object(s) bounding box, and padding = -0.2 means the view will span 80% of the object(s) bounding box.",
"default": 0.0,
"type": "number",
"format": "float"
},
@ -24365,7 +24409,6 @@
}
},
"required": [
"padding",
"type"
]
},
@ -24374,7 +24417,7 @@
"type": "object",
"properties": {
"padding": {
"description": "How much to pad the view frame by.",
"description": "How much to pad the view frame by, as a fraction of the object(s) bounding box size. Negative padding will crop the view of the object proportionally. e.g. padding = 0.2 means the view will span 120% of the object(s) bounding box, and padding = -0.2 means the view will span 80% of the object(s) bounding box.",
"default": 0.0,
"type": "number",
"format": "float"
@ -24607,6 +24650,24 @@
"type"
]
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/EngineUtilEvaluatePath"
},
"type": {
"type": "string",
"enum": [
"engine_util_evaluate_path"
]
}
},
"required": [
"data",
"type"
]
},
{
"type": "object",
"properties": {