Update api spec (#240)

* 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-07-26 18:08:45 -07:00
committed by GitHub
parent 40e278a550
commit 552c647240
7 changed files with 948 additions and 767 deletions

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,7 @@ from .entity_get_child_uuid import EntityGetChildUuid
from .entity_get_distance import EntityGetDistance from .entity_get_distance import EntityGetDistance
from .entity_get_num_children import EntityGetNumChildren from .entity_get_num_children import EntityGetNumChildren
from .entity_get_parent_id import EntityGetParentId from .entity_get_parent_id import EntityGetParentId
from .entity_get_sketch_paths import EntityGetSketchPaths
from .entity_linear_pattern import EntityLinearPattern from .entity_linear_pattern import EntityLinearPattern
from .entity_linear_pattern_transform import EntityLinearPatternTransform from .entity_linear_pattern_transform import EntityLinearPatternTransform
from .entity_type import EntityType from .entity_type import EntityType
@ -172,6 +173,7 @@ from .path_component_constraint_type import PathComponentConstraintType
from .path_get_curve_uuid import PathGetCurveUuid from .path_get_curve_uuid import PathGetCurveUuid
from .path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices from .path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
from .path_get_info import PathGetInfo from .path_get_info import PathGetInfo
from .path_get_sketch_target_uuid import PathGetSketchTargetUuid
from .path_get_vertex_uuids import PathGetVertexUuids from .path_get_vertex_uuids import PathGetVertexUuids
from .path_segment import PathSegment from .path_segment import PathSegment
from .path_segment_info import PathSegmentInfo from .path_segment_info import PathSegmentInfo

View File

@ -0,0 +1,12 @@
from typing import List
from pydantic import BaseModel, ConfigDict
class EntityGetSketchPaths(BaseModel):
"""The response from the `EntityGetSketchPaths` command."""
entity_ids: List[str]
model_config = ConfigDict(protected_namespaces=())

View File

@ -289,6 +289,16 @@ class entity_get_all_child_uuids(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_sketch_paths(BaseModel):
"""What are all UUIDs of all the paths sketched on top of this entity?"""
entity_id: str
type: Literal["entity_get_sketch_paths"] = "entity_get_sketch_paths"
model_config = ConfigDict(protected_namespaces=())
class entity_get_distance(BaseModel): class entity_get_distance(BaseModel):
"""What is the distance between these two entities?""" """What is the distance between these two entities?"""
@ -973,6 +983,16 @@ class path_get_vertex_uuids(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_sketch_target_uuid(BaseModel):
"""Obtain the sketch target id (if the path was drawn in sketchmode) for a path"""
path_id: str
type: Literal["path_get_sketch_target_uuid"] = "path_get_sketch_target_uuid"
model_config = ConfigDict(protected_namespaces=())
class handle_mouse_drag_start(BaseModel): class handle_mouse_drag_start(BaseModel):
"""Start dragging the mouse.""" """Start dragging the mouse."""
@ -1278,6 +1298,7 @@ ModelingCmd = RootModel[
entity_get_num_children, entity_get_num_children,
entity_get_child_uuid, entity_get_child_uuid,
entity_get_all_child_uuids, entity_get_all_child_uuids,
entity_get_sketch_paths,
entity_get_distance, entity_get_distance,
entity_linear_pattern_transform, entity_linear_pattern_transform,
entity_linear_pattern, entity_linear_pattern,
@ -1334,6 +1355,7 @@ ModelingCmd = RootModel[
path_get_curve_uuids_for_vertices, path_get_curve_uuids_for_vertices,
path_get_curve_uuid, path_get_curve_uuid,
path_get_vertex_uuids, path_get_vertex_uuids,
path_get_sketch_target_uuid,
handle_mouse_drag_start, handle_mouse_drag_start,
handle_mouse_drag_move, handle_mouse_drag_move,
handle_mouse_drag_end, handle_mouse_drag_end,

View File

@ -20,6 +20,7 @@ from ..models.entity_get_child_uuid import EntityGetChildUuid
from ..models.entity_get_distance import EntityGetDistance from ..models.entity_get_distance import EntityGetDistance
from ..models.entity_get_num_children import EntityGetNumChildren from ..models.entity_get_num_children import EntityGetNumChildren
from ..models.entity_get_parent_id import EntityGetParentId from ..models.entity_get_parent_id import EntityGetParentId
from ..models.entity_get_sketch_paths import EntityGetSketchPaths
from ..models.entity_linear_pattern import EntityLinearPattern from ..models.entity_linear_pattern import EntityLinearPattern
from ..models.entity_linear_pattern_transform import EntityLinearPatternTransform from ..models.entity_linear_pattern_transform import EntityLinearPatternTransform
from ..models.export import Export from ..models.export import Export
@ -39,6 +40,7 @@ from ..models.mouse_click import MouseClick
from ..models.path_get_curve_uuid import PathGetCurveUuid from ..models.path_get_curve_uuid import PathGetCurveUuid
from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
from ..models.path_get_info import PathGetInfo from ..models.path_get_info import PathGetInfo
from ..models.path_get_sketch_target_uuid import PathGetSketchTargetUuid
from ..models.path_get_vertex_uuids import PathGetVertexUuids from ..models.path_get_vertex_uuids import PathGetVertexUuids
from ..models.path_segment_info import PathSegmentInfo from ..models.path_segment_info import PathSegmentInfo
from ..models.plane_intersect_and_project import PlaneIntersectAndProject from ..models.plane_intersect_and_project import PlaneIntersectAndProject
@ -135,6 +137,16 @@ class entity_get_all_child_uuids(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_get_sketch_paths(BaseModel):
"""The response to the 'EntityGetSketchPaths' endpoint"""
data: EntityGetSketchPaths
type: Literal["entity_get_sketch_paths"] = "entity_get_sketch_paths"
model_config = ConfigDict(protected_namespaces=())
class close_path(BaseModel): class close_path(BaseModel):
"""The response to the 'ClosePath' endpoint""" """The response to the 'ClosePath' endpoint"""
@ -387,6 +399,16 @@ class path_get_vertex_uuids(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class path_get_sketch_target_uuid(BaseModel):
"""The response to the 'PathGetSketchTargetUuid' endpoint"""
data: PathGetSketchTargetUuid
type: Literal["path_get_sketch_target_uuid"] = "path_get_sketch_target_uuid"
model_config = ConfigDict(protected_namespaces=())
class curve_get_end_points(BaseModel): class curve_get_end_points(BaseModel):
"""The response to the 'CurveGetEndPoints' endpoint""" """The response to the 'CurveGetEndPoints' endpoint"""
@ -598,6 +620,7 @@ OkModelingCmdResponse = RootModel[
entity_get_num_children, entity_get_num_children,
entity_get_parent_id, entity_get_parent_id,
entity_get_all_child_uuids, entity_get_all_child_uuids,
entity_get_sketch_paths,
close_path, close_path,
camera_drag_move, camera_drag_move,
camera_drag_end, camera_drag_end,
@ -623,6 +646,7 @@ OkModelingCmdResponse = RootModel[
path_get_curve_uuids_for_vertices, path_get_curve_uuids_for_vertices,
path_get_curve_uuid, path_get_curve_uuid,
path_get_vertex_uuids, path_get_vertex_uuids,
path_get_sketch_target_uuid,
curve_get_end_points, curve_get_end_points,
face_is_planar, face_is_planar,
face_get_position, face_get_position,

View File

@ -0,0 +1,12 @@
from typing import Optional
from pydantic import BaseModel, ConfigDict
class PathGetSketchTargetUuid(BaseModel):
"""The response from the `PathGetSketchTargetUuid` command."""
target_id: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

109
spec.json
View File

@ -15774,6 +15774,23 @@
"entity_id" "entity_id"
] ]
}, },
"EntityGetSketchPaths": {
"description": "The response from the `EntityGetSketchPaths` command.",
"type": "object",
"properties": {
"entity_ids": {
"description": "The UUIDs of the sketch paths.",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
}
},
"required": [
"entity_ids"
]
},
"EntityLinearPattern": { "EntityLinearPattern": {
"description": "The response from the `EntityLinearPattern` command.", "description": "The response from the `EntityLinearPattern` command.",
"type": "object", "type": "object",
@ -19347,6 +19364,27 @@
"type" "type"
] ]
}, },
{
"description": "What are all UUIDs of all the paths sketched on top of this entity?",
"type": "object",
"properties": {
"entity_id": {
"description": "ID of the entity being queried.",
"type": "string",
"format": "uuid"
},
"type": {
"type": "string",
"enum": [
"entity_get_sketch_paths"
]
}
},
"required": [
"entity_id",
"type"
]
},
{ {
"description": "What is the distance between these two entities?", "description": "What is the distance between these two entities?",
"type": "object", "type": "object",
@ -21014,6 +21052,27 @@
"type" "type"
] ]
}, },
{
"description": "Obtain the sketch target id (if the path was drawn in sketchmode) for a path",
"type": "object",
"properties": {
"path_id": {
"description": "Which path to query",
"type": "string",
"format": "uuid"
},
"type": {
"type": "string",
"enum": [
"path_get_sketch_target_uuid"
]
}
},
"required": [
"path_id",
"type"
]
},
{ {
"description": "Start dragging the mouse.", "description": "Start dragging the mouse.",
"type": "object", "type": "object",
@ -21942,6 +22001,25 @@
"type" "type"
] ]
}, },
{
"description": "The response to the 'EntityGetSketchPaths' endpoint",
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/EntityGetSketchPaths"
},
"type": {
"type": "string",
"enum": [
"entity_get_sketch_paths"
]
}
},
"required": [
"data",
"type"
]
},
{ {
"description": "The response to the 'ClosePath' endpoint", "description": "The response to the 'ClosePath' endpoint",
"type": "object", "type": "object",
@ -22417,6 +22495,25 @@
"type" "type"
] ]
}, },
{
"description": "The response to the 'PathGetSketchTargetUuid' endpoint",
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/PathGetSketchTargetUuid"
},
"type": {
"type": "string",
"enum": [
"path_get_sketch_target_uuid"
]
}
},
"required": [
"data",
"type"
]
},
{ {
"description": "The response to the 'CurveGetEndPoints' endpoint", "description": "The response to the 'CurveGetEndPoints' endpoint",
"type": "object", "type": "object",
@ -23661,6 +23758,18 @@
"segments" "segments"
] ]
}, },
"PathGetSketchTargetUuid": {
"description": "The response from the `PathGetSketchTargetUuid` command.",
"type": "object",
"properties": {
"target_id": {
"nullable": true,
"description": "The UUID of the sketch target.",
"type": "string",
"format": "uuid"
}
}
},
"PathGetVertexUuids": { "PathGetVertexUuids": {
"description": "The response from the `PathGetVertexUuids` command.", "description": "The response from the `PathGetVertexUuids` command.",
"type": "object", "type": "object",