Compare commits

..

6 Commits

Author SHA1 Message Date
b3eeaef41d bump
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-22 13:43:15 -07:00
0ac4e4c9c0 Update api spec (#216)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-22 13:41:53 -07:00
35bbe91eb4 bump tag
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-22 11:39:19 -07:00
b4ce8e9642 Update api spec (#215)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-22 11:10:19 -07:00
479cf6a937 Update api spec (#214)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-18 14:44:34 -07:00
acea57bcba Update api spec (#213)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-17 09:49:04 -07:00
7 changed files with 915 additions and 718 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,8 @@ from ..models.point3d import Point3d
class GetSketchModePlane(BaseModel): class GetSketchModePlane(BaseModel):
"""The plane for sketch mode.""" """The plane for sketch mode."""
origin: Point3d
x_axis: Point3d x_axis: Point3d
y_axis: Point3d y_axis: Point3d

View File

@ -373,6 +373,20 @@ class entity_make_helix(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class entity_mirror(BaseModel):
"""Mirror the input entities over the specified axis. (Currently only supports sketches)"""
axis: Point3d
ids: List[str]
point: Point3d
type: Literal["entity_mirror"] = "entity_mirror"
model_config = ConfigDict(protected_namespaces=())
class edit_mode_enter(BaseModel): class edit_mode_enter(BaseModel):
"""Enter edit mode""" """Enter edit mode"""
@ -481,6 +495,16 @@ class update_annotation(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class edge_lines_visible(BaseModel):
"""Changes visibility of scene-wide edge lines on brep solids"""
hidden: bool
type: Literal["edge_lines_visible"] = "edge_lines_visible"
model_config = ConfigDict(protected_namespaces=())
class object_visible(BaseModel): class object_visible(BaseModel):
"""Hide or show an object""" """Hide or show an object"""
@ -1147,6 +1171,18 @@ class default_camera_set_perspective(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class zoom_to_fit(BaseModel):
"""Fit the view to the specified object(s)."""
object_ids: Optional[List[str]] = None
padding: float
type: Literal["zoom_to_fit"] = "zoom_to_fit"
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."""
@ -1219,6 +1255,7 @@ ModelingCmd = RootModel[
entity_linear_pattern, entity_linear_pattern,
entity_circular_pattern, entity_circular_pattern,
entity_make_helix, entity_make_helix,
entity_mirror,
edit_mode_enter, edit_mode_enter,
select_with_point, select_with_point,
select_add, select_add,
@ -1229,6 +1266,7 @@ ModelingCmd = RootModel[
highlight_set_entities, highlight_set_entities,
new_annotation, new_annotation,
update_annotation, update_annotation,
edge_lines_visible,
object_visible, object_visible,
object_bring_to_front, object_bring_to_front,
object_set_material_params_pbr, object_set_material_params_pbr,
@ -1285,6 +1323,7 @@ ModelingCmd = RootModel[
set_selection_filter, set_selection_filter,
default_camera_set_orthographic, default_camera_set_orthographic,
default_camera_set_perspective, default_camera_set_perspective,
zoom_to_fit,
solid3d_get_extrusion_face_info, solid3d_get_extrusion_face_info,
edit_mode_exit, edit_mode_exit,
select_clear, select_clear,

View File

@ -2,6 +2,7 @@ import datetime
from pydantic import BaseModel, ConfigDict from pydantic import BaseModel, ConfigDict
from ..models.uuid import Uuid
class Session(BaseModel): class Session(BaseModel):
@ -9,12 +10,14 @@ class Session(BaseModel):
created_at: datetime.datetime created_at: datetime.datetime
expires_at: datetime.datetime expires: datetime.datetime
token: str id: Uuid
session_token: Uuid
updated_at: datetime.datetime updated_at: datetime.datetime
user_id: str user_id: Uuid
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())

View File

@ -1,4 +1,4 @@
from typing import List, Literal, Optional, Union from typing import Dict, List, Literal, Optional, Union
from pydantic import BaseModel, ConfigDict, Field, RootModel from pydantic import BaseModel, ConfigDict, Field, RootModel
from typing_extensions import Annotated from typing_extensions import Annotated
@ -75,6 +75,16 @@ class metrics_response(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class headers(BaseModel):
"""Authentication header request."""
headers: Dict[str, str]
type: Literal["headers"] = "headers"
model_config = ConfigDict(protected_namespaces=())
WebSocketRequest = RootModel[ WebSocketRequest = RootModel[
Annotated[ Annotated[
Union[ Union[
@ -84,6 +94,7 @@ WebSocketRequest = RootModel[
modeling_cmd_batch_req, modeling_cmd_batch_req,
ping, ping,
metrics_response, metrics_response,
headers,
], ],
Field(discriminator="type"), Field(discriminator="type"),
] ]

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "kittycad" name = "kittycad"
version = "0.6.12" version = "0.6.14"
description = "A client library for accessing KittyCAD" description = "A client library for accessing KittyCAD"
authors = [] authors = []

158
spec.json
View File

@ -17100,6 +17100,14 @@
"description": "The plane for sketch mode.", "description": "The plane for sketch mode.",
"type": "object", "type": "object",
"properties": { "properties": {
"origin": {
"description": "The origin.",
"allOf": [
{
"$ref": "#/components/schemas/Point3d"
}
]
},
"x_axis": { "x_axis": {
"description": "The x axis.", "description": "The x axis.",
"allOf": [ "allOf": [
@ -17126,6 +17134,7 @@
} }
}, },
"required": [ "required": [
"origin",
"x_axis", "x_axis",
"y_axis", "y_axis",
"z_axis" "z_axis"
@ -19425,6 +19434,48 @@
"type" "type"
] ]
}, },
{
"description": "Mirror the input entities over the specified axis. (Currently only supports sketches)",
"type": "object",
"properties": {
"axis": {
"description": "Axis to use as mirror.",
"allOf": [
{
"$ref": "#/components/schemas/Point3d"
}
]
},
"ids": {
"description": "ID of the mirror entities.",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"point": {
"description": "Point through which the mirror axis passes.",
"allOf": [
{
"$ref": "#/components/schemas/Point3d"
}
]
},
"type": {
"type": "string",
"enum": [
"entity_mirror"
]
}
},
"required": [
"axis",
"ids",
"point",
"type"
]
},
{ {
"description": "Enter edit mode", "description": "Enter edit mode",
"type": "object", "type": "object",
@ -19689,6 +19740,26 @@
"type" "type"
] ]
}, },
{
"description": "Changes visibility of scene-wide edge lines on brep solids",
"type": "object",
"properties": {
"hidden": {
"description": "Whether or not the edge lines should be hidden.",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"edge_lines_visible"
]
}
},
"required": [
"hidden",
"type"
]
},
{ {
"description": "Hide or show an object", "description": "Hide or show an object",
"type": "object", "type": "object",
@ -21304,6 +21375,36 @@
"type" "type"
] ]
}, },
{
"description": "Fit the view to the specified object(s).",
"type": "object",
"properties": {
"object_ids": {
"description": "Which objects to fit camera to; if empty, fit to all non-default objects. Defaults to empty vector.",
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"padding": {
"description": "How much to pad the view frame by.",
"type": "number",
"format": "float"
},
"type": {
"type": "string",
"enum": [
"zoom_to_fit"
]
}
},
"required": [
"padding",
"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",
@ -24232,35 +24333,53 @@
"type": "object", "type": "object",
"properties": { "properties": {
"created_at": { "created_at": {
"title": "DateTime",
"description": "The date and time the session was created.", "description": "The date and time the session was created.",
"type": "string", "type": "string",
"format": "date-time" "format": "date-time"
}, },
"expires_at": { "expires": {
"title": "DateTime",
"description": "The date and time the session expires.", "description": "The date and time the session expires.",
"type": "string", "type": "string",
"format": "date-time" "format": "date-time"
}, },
"token": { "id": {
"description": "The unique identifier for the session.",
"allOf": [
{
"$ref": "#/components/schemas/Uuid"
}
]
},
"session_token": {
"description": "The session token.", "description": "The session token.",
"type": "string", "allOf": [
"format": "uuid" {
"$ref": "#/components/schemas/Uuid"
}
]
}, },
"updated_at": { "updated_at": {
"title": "DateTime",
"description": "The date and time the session was last updated.", "description": "The date and time the session was last updated.",
"type": "string", "type": "string",
"format": "date-time" "format": "date-time"
}, },
"user_id": { "user_id": {
"description": "The user ID of the user that the session belongs to.", "description": "The user ID of the user that the session belongs to.",
"type": "string", "allOf": [
"format": "uuid" {
"$ref": "#/components/schemas/Uuid"
}
]
} }
}, },
"required": [ "required": [
"created_at", "created_at",
"expires_at", "expires",
"token", "id",
"session_token",
"updated_at", "updated_at",
"user_id" "user_id"
] ]
@ -27239,6 +27358,29 @@
"metrics", "metrics",
"type" "type"
] ]
},
{
"description": "Authentication header request.",
"type": "object",
"properties": {
"headers": {
"description": "The authentication header.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"type": {
"type": "string",
"enum": [
"headers"
]
}
},
"required": [
"headers",
"type"
]
} }
] ]
}, },