Update api spec (#237)
* 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
87f9f38d5f
commit
40e278a550
File diff suppressed because it is too large
Load Diff
@ -169,6 +169,7 @@ from .output_format import OutputFormat
|
|||||||
from .path_command import PathCommand
|
from .path_command import PathCommand
|
||||||
from .path_component_constraint_bound import PathComponentConstraintBound
|
from .path_component_constraint_bound import PathComponentConstraintBound
|
||||||
from .path_component_constraint_type import PathComponentConstraintType
|
from .path_component_constraint_type import PathComponentConstraintType
|
||||||
|
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_vertex_uuids import PathGetVertexUuids
|
from .path_get_vertex_uuids import PathGetVertexUuids
|
||||||
@ -202,7 +203,7 @@ from .selection import Selection
|
|||||||
from .service_account import ServiceAccount
|
from .service_account import ServiceAccount
|
||||||
from .service_account_results_page import ServiceAccountResultsPage
|
from .service_account_results_page import ServiceAccountResultsPage
|
||||||
from .session import Session
|
from .session import Session
|
||||||
from .session_token_type import SessionTokenType
|
from .session_token_uuid import SessionTokenUuid
|
||||||
from .solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
|
from .solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
|
||||||
from .solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
|
from .solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
|
||||||
from .solid3d_get_extrusion_face_info import Solid3dGetExtrusionFaceInfo
|
from .solid3d_get_extrusion_face_info import Solid3dGetExtrusionFaceInfo
|
||||||
@ -211,6 +212,7 @@ from .solid3d_get_opposite_edge import Solid3dGetOppositeEdge
|
|||||||
from .solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge
|
from .solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge
|
||||||
from .stl_storage import StlStorage
|
from .stl_storage import StlStorage
|
||||||
from .store_coupon_params import StoreCouponParams
|
from .store_coupon_params import StoreCouponParams
|
||||||
|
from .string_uuid import StringUuid
|
||||||
from .subscription_tier_feature import SubscriptionTierFeature
|
from .subscription_tier_feature import SubscriptionTierFeature
|
||||||
from .subscription_tier_price import SubscriptionTierPrice
|
from .subscription_tier_price import SubscriptionTierPrice
|
||||||
from .subscription_tier_type import SubscriptionTierType
|
from .subscription_tier_type import SubscriptionTierType
|
||||||
|
@ -3,6 +3,7 @@ from typing import Optional
|
|||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.string_uuid import StringUuid
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
|
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ class ApiToken(BaseModel):
|
|||||||
|
|
||||||
label: Optional[str] = None
|
label: Optional[str] = None
|
||||||
|
|
||||||
token: Uuid
|
token: StringUuid
|
||||||
|
|
||||||
updated_at: datetime.datetime
|
updated_at: datetime.datetime
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ class entity_get_distance(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class entity_linear_pattern_transform(BaseModel):
|
class entity_linear_pattern_transform(BaseModel):
|
||||||
"""Create a linear pattern using this entity."""
|
"""Create a pattern using this entity by specifying the transform for each desired repetition."""
|
||||||
|
|
||||||
entity_id: str
|
entity_id: str
|
||||||
|
|
||||||
@ -383,6 +383,18 @@ class entity_mirror(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class entity_mirror_across_edge(BaseModel):
|
||||||
|
"""Mirror the input entities over the specified edge. (Currently only supports sketches)"""
|
||||||
|
|
||||||
|
edge_id: str
|
||||||
|
|
||||||
|
ids: List[str]
|
||||||
|
|
||||||
|
type: Literal["entity_mirror_across_edge"] = "entity_mirror_across_edge"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class edit_mode_enter(BaseModel):
|
class edit_mode_enter(BaseModel):
|
||||||
"""Enter edit mode"""
|
"""Enter edit mode"""
|
||||||
|
|
||||||
@ -939,6 +951,18 @@ class path_get_curve_uuids_for_vertices(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class path_get_curve_uuid(BaseModel):
|
||||||
|
"""Obtain curve id by index"""
|
||||||
|
|
||||||
|
index: int
|
||||||
|
|
||||||
|
path_id: str
|
||||||
|
|
||||||
|
type: Literal["path_get_curve_uuid"] = "path_get_curve_uuid"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class path_get_vertex_uuids(BaseModel):
|
class path_get_vertex_uuids(BaseModel):
|
||||||
"""Obtain vertex ids for a path"""
|
"""Obtain vertex ids for a path"""
|
||||||
|
|
||||||
@ -1260,6 +1284,7 @@ ModelingCmd = RootModel[
|
|||||||
entity_circular_pattern,
|
entity_circular_pattern,
|
||||||
entity_make_helix,
|
entity_make_helix,
|
||||||
entity_mirror,
|
entity_mirror,
|
||||||
|
entity_mirror_across_edge,
|
||||||
edit_mode_enter,
|
edit_mode_enter,
|
||||||
select_with_point,
|
select_with_point,
|
||||||
select_add,
|
select_add,
|
||||||
@ -1307,6 +1332,7 @@ ModelingCmd = RootModel[
|
|||||||
make_axes_gizmo,
|
make_axes_gizmo,
|
||||||
path_get_info,
|
path_get_info,
|
||||||
path_get_curve_uuids_for_vertices,
|
path_get_curve_uuids_for_vertices,
|
||||||
|
path_get_curve_uuid,
|
||||||
path_get_vertex_uuids,
|
path_get_vertex_uuids,
|
||||||
handle_mouse_drag_start,
|
handle_mouse_drag_start,
|
||||||
handle_mouse_drag_move,
|
handle_mouse_drag_move,
|
||||||
|
@ -36,6 +36,7 @@ from ..models.import_files import ImportFiles
|
|||||||
from ..models.imported_geometry import ImportedGeometry
|
from ..models.imported_geometry import ImportedGeometry
|
||||||
from ..models.mass import Mass
|
from ..models.mass import Mass
|
||||||
from ..models.mouse_click import MouseClick
|
from ..models.mouse_click import MouseClick
|
||||||
|
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_vertex_uuids import PathGetVertexUuids
|
from ..models.path_get_vertex_uuids import PathGetVertexUuids
|
||||||
@ -366,6 +367,16 @@ class path_get_curve_uuids_for_vertices(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class path_get_curve_uuid(BaseModel):
|
||||||
|
"""The response to the 'PathGetCurveUuid' endpoint"""
|
||||||
|
|
||||||
|
data: PathGetCurveUuid
|
||||||
|
|
||||||
|
type: Literal["path_get_curve_uuid"] = "path_get_curve_uuid"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class path_get_vertex_uuids(BaseModel):
|
class path_get_vertex_uuids(BaseModel):
|
||||||
"""The response to the 'PathGetVertexUuids' endpoint"""
|
"""The response to the 'PathGetVertexUuids' endpoint"""
|
||||||
|
|
||||||
@ -610,6 +621,7 @@ OkModelingCmdResponse = RootModel[
|
|||||||
path_get_info,
|
path_get_info,
|
||||||
path_segment_info,
|
path_segment_info,
|
||||||
path_get_curve_uuids_for_vertices,
|
path_get_curve_uuids_for_vertices,
|
||||||
|
path_get_curve_uuid,
|
||||||
path_get_vertex_uuids,
|
path_get_vertex_uuids,
|
||||||
curve_get_end_points,
|
curve_get_end_points,
|
||||||
face_is_planar,
|
face_is_planar,
|
||||||
|
11
kittycad/models/path_get_curve_uuid.py
Normal file
11
kittycad/models/path_get_curve_uuid.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class PathGetCurveUuid(BaseModel):
|
||||||
|
"""The response from the `PathGetCurveUuid` command."""
|
||||||
|
|
||||||
|
curve_id: str
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
@ -3,6 +3,7 @@ from typing import Optional
|
|||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.string_uuid import StringUuid
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ class ServiceAccount(BaseModel):
|
|||||||
|
|
||||||
org_id: Uuid
|
org_id: Uuid
|
||||||
|
|
||||||
token: Uuid
|
token: StringUuid
|
||||||
|
|
||||||
updated_at: datetime.datetime
|
updated_at: datetime.datetime
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import datetime
|
|||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
from ..models.session_token_type import SessionTokenType
|
from ..models.session_token_uuid import SessionTokenUuid
|
||||||
from ..models.uuid import Uuid
|
from ..models.uuid import Uuid
|
||||||
|
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ class Session(BaseModel):
|
|||||||
|
|
||||||
id: Uuid
|
id: Uuid
|
||||||
|
|
||||||
session_token: SessionTokenType
|
session_token: SessionTokenUuid
|
||||||
|
|
||||||
updated_at: datetime.datetime
|
updated_at: datetime.datetime
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ from pydantic import GetCoreSchemaHandler
|
|||||||
from pydantic_core import CoreSchema, core_schema
|
from pydantic_core import CoreSchema, core_schema
|
||||||
|
|
||||||
|
|
||||||
class SessionTokenType(str):
|
class SessionTokenUuid(str):
|
||||||
"""An auth token. A uuid with a prefix of ses-"""
|
"""An auth token. A uuid with a prefix of ses-"""
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
17
kittycad/models/string_uuid.py
Normal file
17
kittycad/models/string_uuid.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from pydantic import GetCoreSchemaHandler
|
||||||
|
from pydantic_core import CoreSchema, core_schema
|
||||||
|
|
||||||
|
|
||||||
|
class StringUuid(str):
|
||||||
|
"""An auth token. A UUIDv4"""
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __get_pydantic_core_schema__(
|
||||||
|
cls, source_type: Any, handler: GetCoreSchemaHandler
|
||||||
|
) -> CoreSchema:
|
||||||
|
return core_schema.no_info_after_validator_function(cls, handler(str))
|
107
spec.json
107
spec.json
@ -13210,7 +13210,7 @@
|
|||||||
"description": "The API token itself.",
|
"description": "The API token itself.",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/Uuid"
|
"$ref": "#/components/schemas/StringUuid"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -19384,7 +19384,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Create a linear pattern using this entity.",
|
"description": "Create a pattern using this entity by specifying the transform for each desired repetition.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity_id": {
|
"entity_id": {
|
||||||
@ -19393,7 +19393,7 @@
|
|||||||
"format": "uuid"
|
"format": "uuid"
|
||||||
},
|
},
|
||||||
"transform": {
|
"transform": {
|
||||||
"description": "How to transform each repeated solid. The total number of repetitions equals the size of this list.",
|
"description": "How to transform each repeated solid. The 0th transform will create the first copy of the entity. The total number of (optional) repetitions equals the size of this list.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/LinearTransform"
|
"$ref": "#/components/schemas/LinearTransform"
|
||||||
@ -19607,6 +19607,36 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Mirror the input entities over the specified edge. (Currently only supports sketches)",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"edge_id": {
|
||||||
|
"description": "The edge to use as the mirror axis, must be linear and lie in the plane of the solid",
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
},
|
||||||
|
"ids": {
|
||||||
|
"description": "ID of the mirror entities.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"entity_mirror_across_edge"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"edge_id",
|
||||||
|
"ids",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Enter edit mode",
|
"description": "Enter edit mode",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -20935,6 +20965,34 @@
|
|||||||
"vertex_ids"
|
"vertex_ids"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Obtain curve id by index",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"index": {
|
||||||
|
"description": "IDs of the vertices for which to obtain curve ids from",
|
||||||
|
"type": "integer",
|
||||||
|
"format": "uint32",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"path_id": {
|
||||||
|
"description": "Which path to query",
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"path_get_curve_uuid"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"index",
|
||||||
|
"path_id",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Obtain vertex ids for a path",
|
"description": "Obtain vertex ids for a path",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -22321,6 +22379,25 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "The response to the 'PathGetCurveUuid' endpoint",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/PathGetCurveUuid"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"path_get_curve_uuid"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "The response to the 'PathGetVertexUuids' endpoint",
|
"description": "The response to the 'PathGetVertexUuids' endpoint",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -23537,6 +23614,20 @@
|
|||||||
"angle_between"
|
"angle_between"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"PathGetCurveUuid": {
|
||||||
|
"description": "The response from the `PathGetCurveUuid` command.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"curve_id": {
|
||||||
|
"description": "The UUID of the curve entity.",
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"curve_id"
|
||||||
|
]
|
||||||
|
},
|
||||||
"PathGetCurveUuidsForVertices": {
|
"PathGetCurveUuidsForVertices": {
|
||||||
"description": "The response from the `PathGetCurveUuidsForVertices` command.",
|
"description": "The response from the `PathGetCurveUuidsForVertices` command.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -24559,7 +24650,7 @@
|
|||||||
"description": "The API token itself.",
|
"description": "The API token itself.",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/Uuid"
|
"$ref": "#/components/schemas/StringUuid"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -24628,7 +24719,7 @@
|
|||||||
"description": "The session token.",
|
"description": "The session token.",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/SessionTokenType"
|
"$ref": "#/components/schemas/SessionTokenUuid"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -24656,7 +24747,7 @@
|
|||||||
"user_id"
|
"user_id"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"SessionTokenType": {
|
"SessionTokenUuid": {
|
||||||
"description": "An auth token. A uuid with a prefix of ses-",
|
"description": "An auth token. A uuid with a prefix of ses-",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -24782,6 +24873,10 @@
|
|||||||
"percent_off"
|
"percent_off"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"StringUuid": {
|
||||||
|
"description": "An auth token. A UUIDv4",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"SubscriptionTierFeature": {
|
"SubscriptionTierFeature": {
|
||||||
"description": "A subscription tier feature.",
|
"description": "A subscription tier feature.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
Reference in New Issue
Block a user