Update api spec (#313)
* 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
ee9f0029f4
commit
121575c8ae
File diff suppressed because it is too large
Load Diff
@ -36,6 +36,7 @@ from .camera_drag_end import CameraDragEnd
|
|||||||
from .camera_drag_interaction_type import CameraDragInteractionType
|
from .camera_drag_interaction_type import CameraDragInteractionType
|
||||||
from .camera_drag_move import CameraDragMove
|
from .camera_drag_move import CameraDragMove
|
||||||
from .camera_drag_start import CameraDragStart
|
from .camera_drag_start import CameraDragStart
|
||||||
|
from .camera_movement import CameraMovement
|
||||||
from .camera_settings import CameraSettings
|
from .camera_settings import CameraSettings
|
||||||
from .card_details import CardDetails
|
from .card_details import CardDetails
|
||||||
from .center_of_mass import CenterOfMass
|
from .center_of_mass import CenterOfMass
|
||||||
@ -60,6 +61,7 @@ from .curve_type import CurveType
|
|||||||
from .customer import Customer
|
from .customer import Customer
|
||||||
from .customer_balance import CustomerBalance
|
from .customer_balance import CustomerBalance
|
||||||
from .cut_type import CutType
|
from .cut_type import CutType
|
||||||
|
from .default_camera_center_to_scene import DefaultCameraCenterToScene
|
||||||
from .default_camera_center_to_selection import DefaultCameraCenterToSelection
|
from .default_camera_center_to_selection import DefaultCameraCenterToSelection
|
||||||
from .default_camera_focus_on import DefaultCameraFocusOn
|
from .default_camera_focus_on import DefaultCameraFocusOn
|
||||||
from .default_camera_get_settings import DefaultCameraGetSettings
|
from .default_camera_get_settings import DefaultCameraGetSettings
|
||||||
|
13
kittycad/models/camera_movement.py
Normal file
13
kittycad/models/camera_movement.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class CameraMovement(str, Enum):
|
||||||
|
"""A type of camera movement applied after certain camera operations""" # noqa: E501
|
||||||
|
|
||||||
|
"""# Adjusts the camera position during the camera operation """ # noqa: E501
|
||||||
|
VANTAGE = "vantage"
|
||||||
|
"""# Keeps the camera position in place """ # noqa: E501
|
||||||
|
NONE = "none"
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
7
kittycad/models/default_camera_center_to_scene.py
Normal file
7
kittycad/models/default_camera_center_to_scene.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
|
||||||
|
class DefaultCameraCenterToScene(BaseModel):
|
||||||
|
"""The response from the `DefaultCameraCenterToScene` endpoint."""
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
@ -7,6 +7,7 @@ from ..models.angle import Angle
|
|||||||
from ..models.annotation_options import AnnotationOptions
|
from ..models.annotation_options import AnnotationOptions
|
||||||
from ..models.annotation_type import AnnotationType
|
from ..models.annotation_type import AnnotationType
|
||||||
from ..models.camera_drag_interaction_type import CameraDragInteractionType
|
from ..models.camera_drag_interaction_type import CameraDragInteractionType
|
||||||
|
from ..models.camera_movement import CameraMovement
|
||||||
from ..models.color import Color
|
from ..models.color import Color
|
||||||
from ..models.cut_type import CutType
|
from ..models.cut_type import CutType
|
||||||
from ..models.distance_type import DistanceType
|
from ..models.distance_type import DistanceType
|
||||||
@ -1110,6 +1111,8 @@ class OptionCurveGetEndPoints(BaseModel):
|
|||||||
class OptionReconfigureStream(BaseModel):
|
class OptionReconfigureStream(BaseModel):
|
||||||
"""Reconfigure the stream."""
|
"""Reconfigure the stream."""
|
||||||
|
|
||||||
|
bitrate: Optional[int] = None
|
||||||
|
|
||||||
fps: int
|
fps: int
|
||||||
|
|
||||||
height: int
|
height: int
|
||||||
@ -1262,6 +1265,8 @@ class OptionDefaultCameraSetPerspective(BaseModel):
|
|||||||
class OptionDefaultCameraCenterToSelection(BaseModel):
|
class OptionDefaultCameraCenterToSelection(BaseModel):
|
||||||
"""Updates the camera to center to the center of the current selection (or the origin if nothing is selected)"""
|
"""Updates the camera to center to the center of the current selection (or the origin if nothing is selected)"""
|
||||||
|
|
||||||
|
camera_movement: CameraMovement = "vantage" # type: ignore
|
||||||
|
|
||||||
type: Literal["default_camera_center_to_selection"] = (
|
type: Literal["default_camera_center_to_selection"] = (
|
||||||
"default_camera_center_to_selection"
|
"default_camera_center_to_selection"
|
||||||
)
|
)
|
||||||
@ -1269,6 +1274,16 @@ class OptionDefaultCameraCenterToSelection(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class OptionDefaultCameraCenterToScene(BaseModel):
|
||||||
|
"""Updates the camera to center to the center of the current scene's bounds"""
|
||||||
|
|
||||||
|
camera_movement: CameraMovement = "vantage" # type: ignore
|
||||||
|
|
||||||
|
type: Literal["default_camera_center_to_scene"] = "default_camera_center_to_scene"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class OptionZoomToFit(BaseModel):
|
class OptionZoomToFit(BaseModel):
|
||||||
"""Fit the view to the specified object(s)."""
|
"""Fit the view to the specified object(s)."""
|
||||||
|
|
||||||
@ -1434,6 +1449,7 @@ ModelingCmd = RootModel[
|
|||||||
OptionDefaultCameraSetOrthographic,
|
OptionDefaultCameraSetOrthographic,
|
||||||
OptionDefaultCameraSetPerspective,
|
OptionDefaultCameraSetPerspective,
|
||||||
OptionDefaultCameraCenterToSelection,
|
OptionDefaultCameraCenterToSelection,
|
||||||
|
OptionDefaultCameraCenterToScene,
|
||||||
OptionZoomToFit,
|
OptionZoomToFit,
|
||||||
OptionViewIsometric,
|
OptionViewIsometric,
|
||||||
OptionSolid3DGetExtrusionFaceInfo,
|
OptionSolid3DGetExtrusionFaceInfo,
|
||||||
|
@ -12,6 +12,7 @@ from ..models.curve_get_control_points import CurveGetControlPoints
|
|||||||
from ..models.curve_get_end_points import CurveGetEndPoints
|
from ..models.curve_get_end_points import CurveGetEndPoints
|
||||||
from ..models.curve_get_type import CurveGetType
|
from ..models.curve_get_type import CurveGetType
|
||||||
from ..models.curve_set_constraint import CurveSetConstraint
|
from ..models.curve_set_constraint import CurveSetConstraint
|
||||||
|
from ..models.default_camera_center_to_scene import DefaultCameraCenterToScene
|
||||||
from ..models.default_camera_center_to_selection import DefaultCameraCenterToSelection
|
from ..models.default_camera_center_to_selection import DefaultCameraCenterToSelection
|
||||||
from ..models.default_camera_focus_on import DefaultCameraFocusOn
|
from ..models.default_camera_focus_on import DefaultCameraFocusOn
|
||||||
from ..models.default_camera_get_settings import DefaultCameraGetSettings
|
from ..models.default_camera_get_settings import DefaultCameraGetSettings
|
||||||
@ -670,6 +671,16 @@ class OptionDefaultCameraCenterToSelection(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class OptionDefaultCameraCenterToScene(BaseModel):
|
||||||
|
""""""
|
||||||
|
|
||||||
|
data: DefaultCameraCenterToScene
|
||||||
|
|
||||||
|
type: Literal["default_camera_center_to_scene"] = "default_camera_center_to_scene"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class OptionSelectClear(BaseModel):
|
class OptionSelectClear(BaseModel):
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
@ -1300,6 +1311,7 @@ OkModelingCmdResponse = RootModel[
|
|||||||
OptionDefaultCameraSetOrthographic,
|
OptionDefaultCameraSetOrthographic,
|
||||||
OptionDefaultCameraSetPerspective,
|
OptionDefaultCameraSetPerspective,
|
||||||
OptionDefaultCameraCenterToSelection,
|
OptionDefaultCameraCenterToSelection,
|
||||||
|
OptionDefaultCameraCenterToScene,
|
||||||
OptionSelectClear,
|
OptionSelectClear,
|
||||||
OptionExport,
|
OptionExport,
|
||||||
OptionSelectWithPoint,
|
OptionSelectWithPoint,
|
||||||
|
@ -79,6 +79,20 @@ class OptionTangentialArcTo(BaseModel):
|
|||||||
model_config = ConfigDict(protected_namespaces=())
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
|
class OptionArcTo(BaseModel):
|
||||||
|
"""Adds an arc from the current position that goes through the given interior point and ends at the given end position"""
|
||||||
|
|
||||||
|
end: Point3d
|
||||||
|
|
||||||
|
interior: Point3d
|
||||||
|
|
||||||
|
relative: bool
|
||||||
|
|
||||||
|
type: Literal["arc_to"] = "arc_to"
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
PathSegment = RootModel[
|
PathSegment = RootModel[
|
||||||
Annotated[
|
Annotated[
|
||||||
Union[
|
Union[
|
||||||
@ -87,6 +101,7 @@ PathSegment = RootModel[
|
|||||||
OptionBezier,
|
OptionBezier,
|
||||||
OptionTangentialArc,
|
OptionTangentialArc,
|
||||||
OptionTangentialArcTo,
|
OptionTangentialArcTo,
|
||||||
|
OptionArcTo,
|
||||||
],
|
],
|
||||||
Field(discriminator="type"),
|
Field(discriminator="type"),
|
||||||
]
|
]
|
||||||
|
119
spec.json
119
spec.json
@ -16646,6 +16646,25 @@
|
|||||||
"description": "The response from the `CameraDragStart` endpoint.",
|
"description": "The response from the `CameraDragStart` endpoint.",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"CameraMovement": {
|
||||||
|
"description": "A type of camera movement applied after certain camera operations",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "Adjusts the camera position during the camera operation",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"vantage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Keeps the camera position in place",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"none"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"CameraSettings": {
|
"CameraSettings": {
|
||||||
"description": "Camera settings including position, center, fov etc",
|
"description": "Camera settings including position, center, fov etc",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -17677,6 +17696,10 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"DefaultCameraCenterToScene": {
|
||||||
|
"description": "The response from the `DefaultCameraCenterToScene` endpoint.",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"DefaultCameraCenterToSelection": {
|
"DefaultCameraCenterToSelection": {
|
||||||
"description": "The response from the `DefaultCameraCenterToSelection` endpoint.",
|
"description": "The response from the `DefaultCameraCenterToSelection` endpoint.",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
@ -24039,6 +24062,13 @@
|
|||||||
"description": "Reconfigure the stream.",
|
"description": "Reconfigure the stream.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"bitrate": {
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Video feed's constant bitrate (CBR)",
|
||||||
|
"type": "integer",
|
||||||
|
"format": "uint32",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
"fps": {
|
"fps": {
|
||||||
"description": "Frames per second.",
|
"description": "Frames per second.",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -24433,6 +24463,15 @@
|
|||||||
"description": "Updates the camera to center to the center of the current selection (or the origin if nothing is selected)",
|
"description": "Updates the camera to center to the center of the current selection (or the origin if nothing is selected)",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"camera_movement": {
|
||||||
|
"description": "Dictates whether or not the camera position should be adjusted during this operation If no movement is requested, the camera will orbit around the new center from its current position",
|
||||||
|
"default": "vantage",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CameraMovement"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
@ -24444,6 +24483,30 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Updates the camera to center to the center of the current scene's bounds",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"camera_movement": {
|
||||||
|
"description": "Dictates whether or not the camera position should be adjusted during this operation If no movement is requested, the camera will orbit around the new center from its current position",
|
||||||
|
"default": "vantage",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CameraMovement"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_center_to_scene"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "Fit the view to the specified object(s).",
|
"description": "Fit the view to the specified object(s).",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -25689,6 +25752,24 @@
|
|||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/DefaultCameraCenterToScene"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"default_camera_center_to_scene"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -27900,6 +27981,44 @@
|
|||||||
"to",
|
"to",
|
||||||
"type"
|
"type"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Adds an arc from the current position that goes through the given interior point and ends at the given end position",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"end": {
|
||||||
|
"description": "End point of the arc.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Point3d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"interior": {
|
||||||
|
"description": "Interior point of the arc.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Point3d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"relative": {
|
||||||
|
"description": "Whether or not interior and end are relative to the previous path position",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"arc_to"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"end",
|
||||||
|
"interior",
|
||||||
|
"relative",
|
||||||
|
"type"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user