Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
b3eeaef41d | |||
0ac4e4c9c0 | |||
35bbe91eb4 | |||
b4ce8e9642 | |||
479cf6a937 | |||
acea57bcba | |||
64e8aa2816 | |||
38801b52a7 | |||
e73f39cfa9 | |||
7536ca8683 | |||
493991edd1 | |||
29003eae80 |
3
.github/workflows/update-spec-for-docs.yml
vendored
3
.github/workflows/update-spec-for-docs.yml
vendored
@ -67,6 +67,9 @@ jobs:
|
||||
gh pr create --title "Update lang spec docs for python" \
|
||||
--body "Updating the generated docs for python" \
|
||||
--head "$NEW_BRANCH" \
|
||||
--reviewer jessfraz \
|
||||
--reviewer irev-dev \
|
||||
--reviewer franknoirot \
|
||||
--base main || true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
@ -482,7 +482,7 @@ from kittycad.types import Response
|
||||
# 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
|
||||
# solution, but alas, I am lazy.
|
||||
if endpoint_ref != "PrivacySettings":
|
||||
if endpoint_ref != "PrivacySettings" and endpoint_ref != "List[str]":
|
||||
example_imports = example_imports + (
|
||||
"""from kittycad.models import """
|
||||
+ endpoint_ref.replace("List[", "").replace("]", "")
|
||||
@ -846,6 +846,20 @@ async def test_"""
|
||||
"\t\t\tfor item in response.json()\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:
|
||||
raise Exception("Unknown array type")
|
||||
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")
|
||||
all_options.append(ref_name)
|
||||
|
||||
if isNestedObjectOneOf(schema):
|
||||
if isNestedObjectAnyOf(schema):
|
||||
# We want to write each of the nested objects.
|
||||
for any_of in schema["anyOf"]:
|
||||
# Get the nested object.
|
||||
@ -1312,6 +1326,47 @@ def generateAnyOfType(path: str, name: str, schema: dict, data: dict):
|
||||
f.write(object_code)
|
||||
f.write("\n")
|
||||
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.
|
||||
description = getAnyOfDescription(schema)
|
||||
@ -1728,8 +1783,13 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]:
|
||||
if "$ref" in items:
|
||||
ref = items["$ref"].replace("#/components/schemas/", "")
|
||||
refs.append("List[" + ref + "]")
|
||||
elif "type" in items:
|
||||
if items["type"] == "string":
|
||||
refs.append("List[str]")
|
||||
else:
|
||||
raise Exception("Unknown array type", items)
|
||||
else:
|
||||
raise Exception("Unknown array type")
|
||||
raise Exception("Unknown array type", items)
|
||||
elif json["type"] == "string":
|
||||
refs.append("str")
|
||||
elif (
|
||||
@ -1934,6 +1994,40 @@ def getOneOfRefType(schema: dict) -> str:
|
||||
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:
|
||||
if "oneOf" not in schema:
|
||||
return False
|
||||
@ -1942,7 +2036,8 @@ def isNestedObjectOneOf(schema: dict) -> bool:
|
||||
for one_of in schema["oneOf"]:
|
||||
# Check if each are an object w 1 property in it.
|
||||
if (
|
||||
one_of["type"] == "object"
|
||||
"type" in one_of
|
||||
and one_of["type"] == "object"
|
||||
and "properties" in one_of
|
||||
and len(one_of["properties"]) == 1
|
||||
):
|
||||
@ -1954,7 +2049,10 @@ def isNestedObjectOneOf(schema: dict) -> bool:
|
||||
is_nested_object = False
|
||||
break
|
||||
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
|
||||
else:
|
||||
|
File diff suppressed because it is too large
Load Diff
104
kittycad/api/meta/create_debug_uploads.py
Normal file
104
kittycad/api/meta/create_debug_uploads.py
Normal 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
|
@ -51,6 +51,7 @@ from kittycad.api.hidden import (
|
||||
post_auth_saml,
|
||||
)
|
||||
from kittycad.api.meta import (
|
||||
create_debug_uploads,
|
||||
create_event,
|
||||
get_ipinfo,
|
||||
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
|
||||
def test_create_event():
|
||||
# Create our client.
|
||||
|
@ -31,6 +31,7 @@ from .async_api_call_type import AsyncApiCallType
|
||||
from .auth_callback import AuthCallback
|
||||
from .axis import Axis
|
||||
from .axis_direction_pair import AxisDirectionPair
|
||||
from .batch_response import BatchResponse
|
||||
from .billing_info import BillingInfo
|
||||
from .block_reason import BlockReason
|
||||
from .cache_metadata import CacheMetadata
|
||||
|
24
kittycad/models/batch_response.py
Normal file
24
kittycad/models/batch_response.py
Normal 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,
|
||||
]
|
||||
]
|
@ -7,6 +7,8 @@ from ..models.point3d import Point3d
|
||||
class GetSketchModePlane(BaseModel):
|
||||
"""The plane for sketch mode."""
|
||||
|
||||
origin: Point3d
|
||||
|
||||
x_axis: Point3d
|
||||
|
||||
y_axis: Point3d
|
||||
|
@ -373,6 +373,20 @@ class entity_make_helix(BaseModel):
|
||||
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):
|
||||
"""Enter edit mode"""
|
||||
|
||||
@ -481,6 +495,16 @@ class update_annotation(BaseModel):
|
||||
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):
|
||||
"""Hide or show an object"""
|
||||
|
||||
@ -1147,6 +1171,18 @@ class default_camera_set_perspective(BaseModel):
|
||||
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):
|
||||
"""Get a concise description of all of an extrusion's faces."""
|
||||
|
||||
@ -1219,6 +1255,7 @@ ModelingCmd = RootModel[
|
||||
entity_linear_pattern,
|
||||
entity_circular_pattern,
|
||||
entity_make_helix,
|
||||
entity_mirror,
|
||||
edit_mode_enter,
|
||||
select_with_point,
|
||||
select_add,
|
||||
@ -1229,6 +1266,7 @@ ModelingCmd = RootModel[
|
||||
highlight_set_entities,
|
||||
new_annotation,
|
||||
update_annotation,
|
||||
edge_lines_visible,
|
||||
object_visible,
|
||||
object_bring_to_front,
|
||||
object_set_material_params_pbr,
|
||||
@ -1285,6 +1323,7 @@ ModelingCmd = RootModel[
|
||||
set_selection_filter,
|
||||
default_camera_set_orthographic,
|
||||
default_camera_set_perspective,
|
||||
zoom_to_fit,
|
||||
solid3d_get_extrusion_face_info,
|
||||
edit_mode_exit,
|
||||
select_clear,
|
||||
|
@ -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 typing_extensions import Annotated
|
||||
|
||||
from ..models.batch_response import BatchResponse
|
||||
from ..models.ice_server import IceServer
|
||||
from ..models.ok_modeling_cmd_response import OkModelingCmdResponse
|
||||
from ..models.raw_file import RawFile
|
||||
@ -82,6 +83,24 @@ class modeling(BaseModel):
|
||||
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):
|
||||
""""""
|
||||
|
||||
@ -139,6 +158,7 @@ OkWebSocketResponseData = RootModel[
|
||||
trickle_ice,
|
||||
sdp_answer,
|
||||
modeling,
|
||||
modeling_batch,
|
||||
export,
|
||||
metrics_request,
|
||||
pong,
|
||||
|
@ -2,6 +2,7 @@ import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
|
||||
|
||||
class Session(BaseModel):
|
||||
@ -9,12 +10,14 @@ class Session(BaseModel):
|
||||
|
||||
created_at: datetime.datetime
|
||||
|
||||
expires_at: datetime.datetime
|
||||
expires: datetime.datetime
|
||||
|
||||
token: str
|
||||
id: Uuid
|
||||
|
||||
session_token: Uuid
|
||||
|
||||
updated_at: datetime.datetime
|
||||
|
||||
user_id: str
|
||||
user_id: Uuid
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -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 typing_extensions import Annotated
|
||||
@ -75,6 +75,16 @@ class metrics_response(BaseModel):
|
||||
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[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -84,6 +94,7 @@ WebSocketRequest = RootModel[
|
||||
modeling_cmd_batch_req,
|
||||
ping,
|
||||
metrics_response,
|
||||
headers,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "kittycad"
|
||||
version = "0.6.10"
|
||||
version = "0.6.14"
|
||||
description = "A client library for accessing KittyCAD"
|
||||
|
||||
authors = []
|
||||
@ -11,6 +11,10 @@ packages = [
|
||||
]
|
||||
include = ["CHANGELOG.md", "kittycad/py.typed"]
|
||||
|
||||
[[tool.poetry.source]]
|
||||
name = "pypi-public"
|
||||
url = "https://pypi.org/simple/"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
attrs = ">=20.1.0,<24.0.0"
|
||||
httpx = ">=0.15.4,<0.26.0"
|
||||
|
359
spec.json
359
spec.json
@ -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": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@ -14125,6 +14257,44 @@
|
||||
"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": {
|
||||
"description": "The billing information for payments.",
|
||||
"type": "object",
|
||||
@ -16930,6 +17100,14 @@
|
||||
"description": "The plane for sketch mode.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"origin": {
|
||||
"description": "The origin.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Point3d"
|
||||
}
|
||||
]
|
||||
},
|
||||
"x_axis": {
|
||||
"description": "The x axis.",
|
||||
"allOf": [
|
||||
@ -16956,6 +17134,7 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"origin",
|
||||
"x_axis",
|
||||
"y_axis",
|
||||
"z_axis"
|
||||
@ -19255,6 +19434,48 @@
|
||||
"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",
|
||||
"type": "object",
|
||||
@ -19519,6 +19740,26 @@
|
||||
"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",
|
||||
"type": "object",
|
||||
@ -21134,6 +21375,36 @@
|
||||
"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.",
|
||||
"type": "object",
|
||||
@ -22335,6 +22606,37 @@
|
||||
"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.",
|
||||
"type": "object",
|
||||
@ -24031,35 +24333,53 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"title": "DateTime",
|
||||
"description": "The date and time the session was created.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"expires_at": {
|
||||
"expires": {
|
||||
"title": "DateTime",
|
||||
"description": "The date and time the session expires.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"token": {
|
||||
"id": {
|
||||
"description": "The unique identifier for the session.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Uuid"
|
||||
}
|
||||
]
|
||||
},
|
||||
"session_token": {
|
||||
"description": "The session token.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Uuid"
|
||||
}
|
||||
]
|
||||
},
|
||||
"updated_at": {
|
||||
"title": "DateTime",
|
||||
"description": "The date and time the session was last updated.",
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"user_id": {
|
||||
"description": "The user ID of the user that the session belongs to.",
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Uuid"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"created_at",
|
||||
"expires_at",
|
||||
"token",
|
||||
"expires",
|
||||
"id",
|
||||
"session_token",
|
||||
"updated_at",
|
||||
"user_id"
|
||||
]
|
||||
@ -27038,6 +27358,29 @@
|
||||
"metrics",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Reference in New Issue
Block a user