Update api spec (#220)
* 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
dd2e3848cc
commit
ca84069e9a
File diff suppressed because it is too large
Load Diff
@ -89,6 +89,7 @@ from .extended_user import ExtendedUser
|
|||||||
from .extended_user_results_page import ExtendedUserResultsPage
|
from .extended_user_results_page import ExtendedUserResultsPage
|
||||||
from .extrusion_face_cap_type import ExtrusionFaceCapType
|
from .extrusion_face_cap_type import ExtrusionFaceCapType
|
||||||
from .extrusion_face_info import ExtrusionFaceInfo
|
from .extrusion_face_info import ExtrusionFaceInfo
|
||||||
|
from .face_get_center import FaceGetCenter
|
||||||
from .face_get_gradient import FaceGetGradient
|
from .face_get_gradient import FaceGetGradient
|
||||||
from .face_get_position import FaceGetPosition
|
from .face_get_position import FaceGetPosition
|
||||||
from .face_is_planar import FaceIsPlanar
|
from .face_is_planar import FaceIsPlanar
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
@ -6,7 +7,7 @@ from pydantic import BaseModel, ConfigDict
|
|||||||
class Error(BaseModel):
|
class Error(BaseModel):
|
||||||
"""Error information from a response."""
|
"""Error information from a response."""
|
||||||
|
|
||||||
error_code: str
|
error_code: Optional[str] = None
|
||||||
|
|
||||||
message: str
|
message: str
|
||||||
|
|
||||||
|
@ -10,6 +10,10 @@ class ErrorCode(str, Enum):
|
|||||||
INTERNAL_API = "internal_api"
|
INTERNAL_API = "internal_api"
|
||||||
"""# User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request. """ # noqa: E501
|
"""# User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request. """ # noqa: E501
|
||||||
BAD_REQUEST = "bad_request"
|
BAD_REQUEST = "bad_request"
|
||||||
|
"""# Auth token is missing from the request """ # noqa: E501
|
||||||
|
AUTH_TOKEN_MISSING = "auth_token_missing"
|
||||||
|
"""# Auth token is invalid in some way (expired, incorrect format, etc) """ # noqa: E501
|
||||||
|
AUTH_TOKEN_INVALID = "auth_token_invalid"
|
||||||
"""# Client sent invalid JSON. """ # noqa: E501
|
"""# Client sent invalid JSON. """ # noqa: E501
|
||||||
INVALID_JSON = "invalid_json"
|
INVALID_JSON = "invalid_json"
|
||||||
"""# Client sent invalid BSON. """ # noqa: E501
|
"""# Client sent invalid BSON. """ # noqa: E501
|
||||||
|
12
kittycad/models/face_get_center.py
Normal file
12
kittycad/models/face_get_center.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
from ..models.point3d import Point3d
|
||||||
|
|
||||||
|
|
||||||
|
class FaceGetCenter(BaseModel):
|
||||||
|
"""The 3D center of mass on the surface"""
|
||||||
|
|
||||||
|
pos: Point3d
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
@ -641,6 +641,16 @@ class face_get_position(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class face_get_center(BaseModel):
|
||||||
|
"""Obtains the surface \"center of mass\" """
|
||||||
|
|
||||||
|
object_id: str
|
||||||
|
|
||||||
|
type: Literal["face_get_center"] = "face_get_center"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class face_get_gradient(BaseModel):
|
class face_get_gradient(BaseModel):
|
||||||
"""Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v"""
|
"""Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v"""
|
||||||
|
|
||||||
@ -1137,6 +1147,16 @@ class zoom_to_fit(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class view_isometric(BaseModel):
|
||||||
|
"""Fit the view to the scene with an isometric view."""
|
||||||
|
|
||||||
|
padding: Optional[float] = None
|
||||||
|
|
||||||
|
type: Literal["view_isometric"] = "view_isometric"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class solid3d_get_extrusion_face_info(BaseModel):
|
class solid3d_get_extrusion_face_info(BaseModel):
|
||||||
"""Get a concise description of all of an extrusion's faces."""
|
"""Get a concise description of all of an extrusion's faces."""
|
||||||
|
|
||||||
@ -1232,6 +1252,7 @@ ModelingCmd = RootModel[
|
|||||||
solid3d_fillet_edge,
|
solid3d_fillet_edge,
|
||||||
face_is_planar,
|
face_is_planar,
|
||||||
face_get_position,
|
face_get_position,
|
||||||
|
face_get_center,
|
||||||
face_get_gradient,
|
face_get_gradient,
|
||||||
send_object,
|
send_object,
|
||||||
entity_set_opacity,
|
entity_set_opacity,
|
||||||
@ -1275,6 +1296,7 @@ ModelingCmd = RootModel[
|
|||||||
default_camera_set_orthographic,
|
default_camera_set_orthographic,
|
||||||
default_camera_set_perspective,
|
default_camera_set_perspective,
|
||||||
zoom_to_fit,
|
zoom_to_fit,
|
||||||
|
view_isometric,
|
||||||
solid3d_get_extrusion_face_info,
|
solid3d_get_extrusion_face_info,
|
||||||
edit_mode_exit,
|
edit_mode_exit,
|
||||||
select_clear,
|
select_clear,
|
||||||
|
@ -22,6 +22,7 @@ from ..models.entity_get_parent_id import EntityGetParentId
|
|||||||
from ..models.entity_linear_pattern import EntityLinearPattern
|
from ..models.entity_linear_pattern import EntityLinearPattern
|
||||||
from ..models.export import Export
|
from ..models.export import Export
|
||||||
from ..models.extrusion_face_info import ExtrusionFaceInfo
|
from ..models.extrusion_face_info import ExtrusionFaceInfo
|
||||||
|
from ..models.face_get_center import FaceGetCenter
|
||||||
from ..models.face_get_gradient import FaceGetGradient
|
from ..models.face_get_gradient import FaceGetGradient
|
||||||
from ..models.face_get_position import FaceGetPosition
|
from ..models.face_get_position import FaceGetPosition
|
||||||
from ..models.face_is_planar import FaceIsPlanar
|
from ..models.face_is_planar import FaceIsPlanar
|
||||||
@ -371,6 +372,16 @@ class face_get_position(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class face_get_center(BaseModel):
|
||||||
|
"""The response to the 'FaceGetCenter' endpoint"""
|
||||||
|
|
||||||
|
data: FaceGetCenter
|
||||||
|
|
||||||
|
type: Literal["face_get_center"] = "face_get_center"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class face_get_gradient(BaseModel):
|
class face_get_gradient(BaseModel):
|
||||||
"""The response to the 'FaceGetGradient' endpoint"""
|
"""The response to the 'FaceGetGradient' endpoint"""
|
||||||
|
|
||||||
@ -556,6 +567,7 @@ OkModelingCmdResponse = RootModel[
|
|||||||
curve_get_end_points,
|
curve_get_end_points,
|
||||||
face_is_planar,
|
face_is_planar,
|
||||||
face_get_position,
|
face_get_position,
|
||||||
|
face_get_center,
|
||||||
face_get_gradient,
|
face_get_gradient,
|
||||||
plane_intersect_and_project,
|
plane_intersect_and_project,
|
||||||
import_files,
|
import_files,
|
||||||
|
93
spec.json
93
spec.json
@ -15797,7 +15797,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"error_code",
|
|
||||||
"message",
|
"message",
|
||||||
"request_id"
|
"request_id"
|
||||||
]
|
]
|
||||||
@ -15826,6 +15825,20 @@
|
|||||||
"bad_request"
|
"bad_request"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Auth token is missing from the request",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"auth_token_missing"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Auth token is invalid in some way (expired, incorrect format, etc)",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"auth_token_invalid"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Client sent invalid JSON.",
|
"description": "Client sent invalid JSON.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -16164,6 +16177,23 @@
|
|||||||
"cap"
|
"cap"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"FaceGetCenter": {
|
||||||
|
"description": "The 3D center of mass on the surface",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pos": {
|
||||||
|
"description": "The 3D position on the surface center of mass",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Point3d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"pos"
|
||||||
|
]
|
||||||
|
},
|
||||||
"FaceGetGradient": {
|
"FaceGetGradient": {
|
||||||
"description": "The gradient (dFdu, dFdv) + normal vector on a brep face",
|
"description": "The gradient (dFdu, dFdv) + normal vector on a brep face",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -20089,6 +20119,27 @@
|
|||||||
"uv"
|
"uv"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Obtains the surface \"center of mass\"",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"object_id": {
|
||||||
|
"description": "Which face is being queried.",
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"face_get_center"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"object_id",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v",
|
"description": "Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -21302,6 +21353,27 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Fit the view to the scene with an isometric view.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"padding": {
|
||||||
|
"description": "How much to pad the view frame by.",
|
||||||
|
"default": 0.0,
|
||||||
|
"type": "number",
|
||||||
|
"format": "float"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"view_isometric"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Get a concise description of all of an extrusion's faces.",
|
"description": "Get a concise description of all of an extrusion's faces.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -22086,6 +22158,25 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "The response to the 'FaceGetCenter' endpoint",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/FaceGetCenter"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"face_get_center"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "The response to the 'FaceGetGradient' endpoint",
|
"description": "The response to the 'FaceGetGradient' endpoint",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
Reference in New Issue
Block a user