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:
zoo-github-actions-auth[bot]
2024-10-29 17:42:26 -07:00
committed by GitHub
parent ee9f0029f4
commit 121575c8ae
8 changed files with 962 additions and 778 deletions

File diff suppressed because it is too large Load Diff

View File

@ -36,6 +36,7 @@ from .camera_drag_end import CameraDragEnd
from .camera_drag_interaction_type import CameraDragInteractionType
from .camera_drag_move import CameraDragMove
from .camera_drag_start import CameraDragStart
from .camera_movement import CameraMovement
from .camera_settings import CameraSettings
from .card_details import CardDetails
from .center_of_mass import CenterOfMass
@ -60,6 +61,7 @@ from .curve_type import CurveType
from .customer import Customer
from .customer_balance import CustomerBalance
from .cut_type import CutType
from .default_camera_center_to_scene import DefaultCameraCenterToScene
from .default_camera_center_to_selection import DefaultCameraCenterToSelection
from .default_camera_focus_on import DefaultCameraFocusOn
from .default_camera_get_settings import DefaultCameraGetSettings

View 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)

View File

@ -0,0 +1,7 @@
from pydantic import BaseModel, ConfigDict
class DefaultCameraCenterToScene(BaseModel):
"""The response from the `DefaultCameraCenterToScene` endpoint."""
model_config = ConfigDict(protected_namespaces=())

View File

@ -7,6 +7,7 @@ from ..models.angle import Angle
from ..models.annotation_options import AnnotationOptions
from ..models.annotation_type import AnnotationType
from ..models.camera_drag_interaction_type import CameraDragInteractionType
from ..models.camera_movement import CameraMovement
from ..models.color import Color
from ..models.cut_type import CutType
from ..models.distance_type import DistanceType
@ -1110,6 +1111,8 @@ class OptionCurveGetEndPoints(BaseModel):
class OptionReconfigureStream(BaseModel):
"""Reconfigure the stream."""
bitrate: Optional[int] = None
fps: int
height: int
@ -1262,6 +1265,8 @@ class OptionDefaultCameraSetPerspective(BaseModel):
class OptionDefaultCameraCenterToSelection(BaseModel):
"""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"] = (
"default_camera_center_to_selection"
)
@ -1269,6 +1274,16 @@ class OptionDefaultCameraCenterToSelection(BaseModel):
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):
"""Fit the view to the specified object(s)."""
@ -1434,6 +1449,7 @@ ModelingCmd = RootModel[
OptionDefaultCameraSetOrthographic,
OptionDefaultCameraSetPerspective,
OptionDefaultCameraCenterToSelection,
OptionDefaultCameraCenterToScene,
OptionZoomToFit,
OptionViewIsometric,
OptionSolid3DGetExtrusionFaceInfo,

View File

@ -12,6 +12,7 @@ from ..models.curve_get_control_points import CurveGetControlPoints
from ..models.curve_get_end_points import CurveGetEndPoints
from ..models.curve_get_type import CurveGetType
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_focus_on import DefaultCameraFocusOn
from ..models.default_camera_get_settings import DefaultCameraGetSettings
@ -670,6 +671,16 @@ class OptionDefaultCameraCenterToSelection(BaseModel):
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):
""""""
@ -1300,6 +1311,7 @@ OkModelingCmdResponse = RootModel[
OptionDefaultCameraSetOrthographic,
OptionDefaultCameraSetPerspective,
OptionDefaultCameraCenterToSelection,
OptionDefaultCameraCenterToScene,
OptionSelectClear,
OptionExport,
OptionSelectWithPoint,

View File

@ -79,6 +79,20 @@ class OptionTangentialArcTo(BaseModel):
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[
Annotated[
Union[
@ -87,6 +101,7 @@ PathSegment = RootModel[
OptionBezier,
OptionTangentialArc,
OptionTangentialArcTo,
OptionArcTo,
],
Field(discriminator="type"),
]

119
spec.json
View File

@ -16646,6 +16646,25 @@
"description": "The response from the `CameraDragStart` endpoint.",
"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": {
"description": "Camera settings including position, center, fov etc",
"type": "object",
@ -17677,6 +17696,10 @@
}
]
},
"DefaultCameraCenterToScene": {
"description": "The response from the `DefaultCameraCenterToScene` endpoint.",
"type": "object"
},
"DefaultCameraCenterToSelection": {
"description": "The response from the `DefaultCameraCenterToSelection` endpoint.",
"type": "object"
@ -24039,6 +24062,13 @@
"description": "Reconfigure the stream.",
"type": "object",
"properties": {
"bitrate": {
"nullable": true,
"description": "Video feed's constant bitrate (CBR)",
"type": "integer",
"format": "uint32",
"minimum": 0
},
"fps": {
"description": "Frames per second.",
"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)",
"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": [
@ -24444,6 +24483,30 @@
"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).",
"type": "object",
@ -25689,6 +25752,24 @@
"type"
]
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/DefaultCameraCenterToScene"
},
"type": {
"type": "string",
"enum": [
"default_camera_center_to_scene"
]
}
},
"required": [
"data",
"type"
]
},
{
"type": "object",
"properties": {
@ -27900,6 +27981,44 @@
"to",
"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"
]
}
]
},