Compare commits

..

11 Commits

Author SHA1 Message Date
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
64e8aa2816 Update api spec (#212)
* YOYO NEW API SPEC!

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
2024-04-12 12:03:34 -07:00
38801b52a7 fix
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-11 11:23:34 -07:00
e73f39cfa9 reviewers
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-11 11:16:11 -07:00
7536ca8683 assignee
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-11 11:05:49 -07:00
493991edd1 updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-10 18:36:19 -07:00
29003eae80 Update api spec (#211)
YOYO NEW API SPEC!

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-10 18:00:02 -07:00
79b977a55a fix test
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-04-05 13:30:47 -07:00
17 changed files with 1582 additions and 923 deletions

View File

@ -67,6 +67,9 @@ jobs:
gh pr create --title "Update lang spec docs for python" \ gh pr create --title "Update lang spec docs for python" \
--body "Updating the generated docs for python" \ --body "Updating the generated docs for python" \
--head "$NEW_BRANCH" \ --head "$NEW_BRANCH" \
--reviewer jessfraz \
--reviewer irev-dev \
--reviewer franknoirot \
--base main || true --base main || true
env: env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

View File

@ -154,10 +154,19 @@ class WebSocket:
self.ws = sync( self.ws = sync(
{% for arg in args %} {% for arg in args %}
{% if arg.in_query %} {% if arg.in_query %}
{% if arg.is_optional == False %}
{{arg.name}}, {{arg.name}},
{% endif %} {% endif %}
{% endif %}
{% endfor %} {% endfor %}
client=client, client=client,
{% for arg in args %}
{% if arg.in_query %}
{% if arg.is_optional %}
{{arg.name}}={{arg.name}},
{% endif %}
{% endif %}
{% endfor %}
) )
def __enter__(self, def __enter__(self,

View File

@ -482,7 +482,7 @@ from kittycad.types import Response
# it here. Obviously this is a hack and we should fix the root cause. # it here. Obviously this is a hack and we should fix the root cause.
# When this happens again with another struct there might be a more obvious # When this happens again with another struct there might be a more obvious
# solution, but alas, I am lazy. # solution, but alas, I am lazy.
if endpoint_ref != "PrivacySettings": if endpoint_ref != "PrivacySettings" and endpoint_ref != "List[str]":
example_imports = example_imports + ( example_imports = example_imports + (
"""from kittycad.models import """ """from kittycad.models import """
+ endpoint_ref.replace("List[", "").replace("]", "") + endpoint_ref.replace("List[", "").replace("]", "")
@ -846,6 +846,20 @@ async def test_"""
"\t\t\tfor item in response.json()\n" "\t\t\tfor item in response.json()\n"
) )
parse_response.write("\t\t]\n") parse_response.write("\t\t]\n")
elif "type" in items:
if items["type"] == "string":
parse_response.write(
"\t\tresponse_"
+ response_code
+ " = [\n"
)
parse_response.write("\t\t\tstr(**item)\n")
parse_response.write(
"\t\t\tfor item in response.json()\n"
)
parse_response.write("\t\t]\n")
else:
raise Exception("Unknown array type", items)
else: else:
raise Exception("Unknown array type") raise Exception("Unknown array type")
elif json["type"] == "string": elif json["type"] == "string":
@ -1256,7 +1270,7 @@ def generateAnyOfType(path: str, name: str, schema: dict, data: dict):
f.write("from ." + camel_to_snake(ref_name) + " import " + ref_name + "\n") f.write("from ." + camel_to_snake(ref_name) + " import " + ref_name + "\n")
all_options.append(ref_name) all_options.append(ref_name)
if isNestedObjectOneOf(schema): if isNestedObjectAnyOf(schema):
# We want to write each of the nested objects. # We want to write each of the nested objects.
for any_of in schema["anyOf"]: for any_of in schema["anyOf"]:
# Get the nested object. # Get the nested object.
@ -1312,6 +1326,47 @@ def generateAnyOfType(path: str, name: str, schema: dict, data: dict):
f.write(object_code) f.write(object_code)
f.write("\n") f.write("\n")
all_options.append(object_name) all_options.append(object_name)
else:
# We want to write each of the nested objects.
for any_of in schema["anyOf"]:
# Get the nested object.
if "properties" in any_of:
for prop_name in any_of["properties"]:
nested_object = any_of["properties"][prop_name]
if nested_object == {}:
f.write("from typing import Any\n")
f.write(prop_name + " = Any\n")
f.write("\n")
all_options.append(prop_name)
elif "$ref" in nested_object:
ref = nested_object["$ref"]
ref_name = ref[ref.rfind("/") + 1 :]
f.write(
"from ."
+ camel_to_snake(ref_name)
+ " import "
+ ref_name
+ "\n"
)
f.write("\n")
if prop_name != ref_name:
f.write(prop_name + " = " + ref_name + "\n")
f.write("\n")
all_options.append(prop_name)
else:
object_code = generateObjectTypeCode(
prop_name, nested_object, "object", data, None, None
)
f.write(object_code)
f.write("\n")
all_options.append(prop_name)
elif "type" in any_of and any_of["type"] == "string":
enum_code = generateEnumTypeCode(
any_of["enum"][0], any_of, "string", []
)
f.write(enum_code)
f.write("\n")
all_options.append(any_of["enum"][0])
# Write the sum type. # Write the sum type.
description = getAnyOfDescription(schema) description = getAnyOfDescription(schema)
@ -1728,8 +1783,13 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]:
if "$ref" in items: if "$ref" in items:
ref = items["$ref"].replace("#/components/schemas/", "") ref = items["$ref"].replace("#/components/schemas/", "")
refs.append("List[" + ref + "]") refs.append("List[" + ref + "]")
elif "type" in items:
if items["type"] == "string":
refs.append("List[str]")
else: else:
raise Exception("Unknown array type") raise Exception("Unknown array type", items)
else:
raise Exception("Unknown array type", items)
elif json["type"] == "string": elif json["type"] == "string":
refs.append("str") refs.append("str")
elif ( elif (
@ -1934,6 +1994,40 @@ def getOneOfRefType(schema: dict) -> str:
raise Exception("Cannot get oneOf ref type for schema: ", schema) raise Exception("Cannot get oneOf ref type for schema: ", schema)
def isNestedObjectAnyOf(schema: dict) -> bool:
if "anyOf" not in schema:
return False
is_nested_object = False
for any_of in schema["anyOf"]:
# Check if each are an object w 1 property in it.
if (
"type" in any_of
and any_of["type"] == "object"
and "properties" in any_of
and len(any_of["properties"]) == 1
):
for prop_name in any_of["properties"]:
nested_object = any_of["properties"][prop_name]
if "type" in nested_object and nested_object["type"] == "object":
is_nested_object = True
else:
is_nested_object = False
break
elif (
"type" in any_of
and any_of["type"] == "string"
and "enum" in any_of
and len(any_of["enum"]) == 1
):
is_nested_object = True
else:
is_nested_object = False
break
return is_nested_object
def isNestedObjectOneOf(schema: dict) -> bool: def isNestedObjectOneOf(schema: dict) -> bool:
if "oneOf" not in schema: if "oneOf" not in schema:
return False return False
@ -1942,7 +2036,8 @@ def isNestedObjectOneOf(schema: dict) -> bool:
for one_of in schema["oneOf"]: for one_of in schema["oneOf"]:
# Check if each are an object w 1 property in it. # Check if each are an object w 1 property in it.
if ( if (
one_of["type"] == "object" "type" in one_of
and one_of["type"] == "object"
and "properties" in one_of and "properties" in one_of
and len(one_of["properties"]) == 1 and len(one_of["properties"]) == 1
): ):
@ -1954,7 +2049,10 @@ def isNestedObjectOneOf(schema: dict) -> bool:
is_nested_object = False is_nested_object = False
break break
elif ( elif (
one_of["type"] == "string" and "enum" in one_of and len(one_of["enum"]) == 1 "type" in one_of
and one_of["type"] == "string"
and "enum" in one_of
and len(one_of["enum"]) == 1
): ):
is_nested_object = True is_nested_object = True
else: else:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,104 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/debug/uploads".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[List[str], Error]]:
if response.status_code == 201:
response_201 = [str(**item) for item in response.json()]
return response_201
if response.status_code == 400:
response_4XX = Error(**response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error(**response.json())
return response_5XX
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[List[str], Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[str], Error]]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[List[str], Error]]:
"""Do NOT send files here that you don't want to be public.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[str], Error]]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.post(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[List[str], Error]]:
"""Do NOT send files here that you don't want to be public.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -161,13 +161,13 @@ class WebSocket:
): ):
self.ws = sync( self.ws = sync(
fps, fps,
pool,
post_effect, post_effect,
unlocked_framerate, unlocked_framerate,
video_res_height, video_res_height,
video_res_width, video_res_width,
webrtc, webrtc,
client=client, client=client,
pool=pool,
) )
def __enter__( def __enter__(

View File

@ -39,6 +39,7 @@ from .models import (
ModelingCmd, ModelingCmd,
ModelingCmdId, ModelingCmdId,
Pong, Pong,
PostEffectType,
System, System,
TextToCad, TextToCad,
TextToCadCreateBody, TextToCadCreateBody,
@ -356,6 +357,7 @@ def test_ws_simple():
with modeling_commands_ws.WebSocket( with modeling_commands_ws.WebSocket(
client=client, client=client,
fps=30, fps=30,
post_effect=PostEffectType.NOEFFECT,
unlocked_framerate=False, unlocked_framerate=False,
video_res_height=360, video_res_height=360,
video_res_width=480, video_res_width=480,
@ -383,6 +385,7 @@ def test_ws_import():
with modeling_commands_ws.WebSocket( with modeling_commands_ws.WebSocket(
client=client, client=client,
fps=30, fps=30,
post_effect=PostEffectType.NOEFFECT,
unlocked_framerate=False, unlocked_framerate=False,
video_res_height=360, video_res_height=360,
video_res_width=480, video_res_width=480,

View File

@ -51,6 +51,7 @@ from kittycad.api.hidden import (
post_auth_saml, post_auth_saml,
) )
from kittycad.api.meta import ( from kittycad.api.meta import (
create_debug_uploads,
create_event, create_event,
get_ipinfo, get_ipinfo,
get_metadata, get_metadata,
@ -1275,6 +1276,49 @@ async def test_post_auth_saml_async():
) )
@pytest.mark.skip
def test_create_debug_uploads():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[List[str], Error]] = create_debug_uploads.sync(
client=client,
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: List[str] = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[Optional[Union[List[str], Error]]] = (
create_debug_uploads.sync_detailed(
client=client,
)
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_create_debug_uploads_async():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[List[str], Error]] = await create_debug_uploads.asyncio(
client=client,
)
# OR run async with more info
response: Response[Optional[Union[List[str], Error]]] = (
await create_debug_uploads.asyncio_detailed(
client=client,
)
)
@pytest.mark.skip @pytest.mark.skip
def test_create_event(): def test_create_event():
# Create our client. # Create our client.

View File

@ -31,6 +31,7 @@ from .async_api_call_type import AsyncApiCallType
from .auth_callback import AuthCallback from .auth_callback import AuthCallback
from .axis import Axis from .axis import Axis
from .axis_direction_pair import AxisDirectionPair from .axis_direction_pair import AxisDirectionPair
from .batch_response import BatchResponse
from .billing_info import BillingInfo from .billing_info import BillingInfo
from .block_reason import BlockReason from .block_reason import BlockReason
from .cache_metadata import CacheMetadata from .cache_metadata import CacheMetadata

View File

@ -0,0 +1,24 @@
from typing import Union
from pydantic import BaseModel, ConfigDict, RootModel
class response(BaseModel):
"""Response to the modeling command."""
model_config = ConfigDict(protected_namespaces=())
class errors(BaseModel):
"""Errors that occurred during the modeling command."""
model_config = ConfigDict(protected_namespaces=())
BatchResponse = RootModel[
Union[
response,
errors,
]
]

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

@ -481,6 +481,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 +1157,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."""
@ -1229,6 +1251,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 +1308,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

@ -1,8 +1,9 @@
from typing import List, Literal, Union from typing import Dict, List, Literal, 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
from ..models.batch_response import BatchResponse
from ..models.ice_server import IceServer from ..models.ice_server import IceServer
from ..models.ok_modeling_cmd_response import OkModelingCmdResponse from ..models.ok_modeling_cmd_response import OkModelingCmdResponse
from ..models.raw_file import RawFile from ..models.raw_file import RawFile
@ -82,6 +83,24 @@ class modeling(BaseModel):
model_config = ConfigDict(protected_namespaces=()) model_config = ConfigDict(protected_namespaces=())
class ModelingBatchData(BaseModel):
""""""
responses: Dict[str, BatchResponse]
model_config = ConfigDict(protected_namespaces=())
class modeling_batch(BaseModel):
"""Response to a ModelingBatch."""
data: ModelingBatchData
type: Literal["modeling_batch"] = "modeling_batch"
model_config = ConfigDict(protected_namespaces=())
class ExportData(BaseModel): class ExportData(BaseModel):
"""""" """"""
@ -139,6 +158,7 @@ OkWebSocketResponseData = RootModel[
trickle_ice, trickle_ice,
sdp_answer, sdp_answer,
modeling, modeling,
modeling_batch,
export, export,
metrics_request, metrics_request,
pong, pong,

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.9" version = "0.6.13"
description = "A client library for accessing KittyCAD" description = "A client library for accessing KittyCAD"
authors = [] authors = []
@ -11,6 +11,10 @@ packages = [
] ]
include = ["CHANGELOG.md", "kittycad/py.typed"] include = ["CHANGELOG.md", "kittycad/py.typed"]
[[tool.poetry.source]]
name = "pypi-public"
url = "https://pypi.org/simple/"
[tool.poetry.dependencies] [tool.poetry.dependencies]
attrs = ">=20.1.0,<24.0.0" attrs = ">=20.1.0,<24.0.0"
httpx = ">=0.15.4,<0.26.0" httpx = ">=0.15.4,<0.26.0"

317
spec.json
View File

@ -1746,6 +1746,138 @@
} }
} }
}, },
"/debug/uploads": {
"post": {
"tags": [
"meta",
"hidden"
],
"summary": "Uploads files to public blob storage for debugging purposes.",
"description": "Do NOT send files here that you don't want to be public.",
"operationId": "create_debug_uploads",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "successful creation",
"headers": {
"Access-Control-Allow-Credentials": {
"description": "Access-Control-Allow-Credentials header.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"Access-Control-Allow-Headers": {
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"Access-Control-Allow-Methods": {
"description": "Access-Control-Allow-Methods header.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"Access-Control-Allow-Origin": {
"description": "Access-Control-Allow-Origin header.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"title": "Array_of_Url",
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
},
"options": {
"tags": [
"hidden"
],
"summary": "OPTIONS endpoint.",
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
"operationId": "options_create_debug_uploads",
"responses": {
"204": {
"description": "successful operation, no content",
"headers": {
"Access-Control-Allow-Credentials": {
"description": "Access-Control-Allow-Credentials header.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"Access-Control-Allow-Headers": {
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"Access-Control-Allow-Methods": {
"description": "Access-Control-Allow-Methods header.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
},
"Access-Control-Allow-Origin": {
"description": "Access-Control-Allow-Origin header.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/events": { "/events": {
"post": { "post": {
"tags": [ "tags": [
@ -14125,6 +14257,44 @@
"direction" "direction"
] ]
}, },
"BatchResponse": {
"description": "Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.",
"anyOf": [
{
"description": "Response sent when a request succeeded.",
"type": "object",
"properties": {
"response": {
"description": "Response to the modeling command.",
"allOf": [
{
"$ref": "#/components/schemas/OkModelingCmdResponse"
}
]
}
},
"required": [
"response"
]
},
{
"description": "Response sent when a request did not succeed.",
"type": "object",
"properties": {
"errors": {
"description": "Errors that occurred during the modeling command.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"required": [
"errors"
]
}
]
},
"BillingInfo": { "BillingInfo": {
"description": "The billing information for payments.", "description": "The billing information for payments.",
"type": "object", "type": "object",
@ -16930,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": [
@ -16956,6 +17134,7 @@
} }
}, },
"required": [ "required": [
"origin",
"x_axis", "x_axis",
"y_axis", "y_axis",
"z_axis" "z_axis"
@ -19519,6 +19698,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",
@ -21134,6 +21333,36 @@
"type" "type"
] ]
}, },
{
"description": "Fit the view to the specified object(s).",
"type": "object",
"properties": {
"object_ids": {
"nullable": true,
"description": "Which objects to fit to",
"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",
@ -22335,6 +22564,37 @@
"type" "type"
] ]
}, },
{
"description": "Response to a ModelingBatch.",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"responses": {
"description": "For each request in the batch, maps its ID to the request's outcome.",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/BatchResponse"
}
}
},
"required": [
"responses"
]
},
"type": {
"type": "string",
"enum": [
"modeling_batch"
]
}
},
"required": [
"data",
"type"
]
},
{ {
"description": "The exported files.", "description": "The exported files.",
"type": "object", "type": "object",
@ -24031,35 +24291,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"
] ]
@ -27038,6 +27316,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"
]
} }
] ]
}, },