Compare commits
62 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb2718fb25 | |||
b922adf749 | |||
432e8546cc | |||
b70dd57f46 | |||
a0e3d35045 | |||
d634c501a8 | |||
57453f2cc3 | |||
37f2bad9c6 | |||
de63d26a12 | |||
f7aab457d6 | |||
ce12b8482a | |||
e3297b9b8f | |||
af55db8f70 | |||
cf383e2405 | |||
26cc03ef01 | |||
d81ecb7615 | |||
1afdcc70b5 | |||
c9ef09320d | |||
243ae12ed3 | |||
ed50b95b1e | |||
6b0cc4a2b1 | |||
9b8fab62c6 | |||
24e80f4568 | |||
1744ab6385 | |||
06a646e558 | |||
2fd4d315db | |||
04efe52feb | |||
0d44cc2c23 | |||
0e32cfdae8 | |||
7733b0658c | |||
cfcad06e60 | |||
6572a92004 | |||
2bd736096a | |||
c8a1761f16 | |||
282bffa217 | |||
d31c0f8428 | |||
4f8c3b25f4 | |||
bb348045ec | |||
b1b98b6954 | |||
983f812268 | |||
71dc1e9e00 | |||
583d5636aa | |||
cafa54f343 | |||
ea0afa0955 | |||
ab4eebfdb1 | |||
a7f6433735 | |||
d32c643b1e | |||
c071f4011b | |||
29926d6a92 | |||
c5733f8dc1 | |||
5711856363 | |||
7f453e7de8 | |||
ebcc2ff650 | |||
7663ef0a1a | |||
69b0706d4a | |||
7e5d830ef9 | |||
5164f71fef | |||
cfeea4d9a5 | |||
cbd2c2122d | |||
8d945dec10 | |||
8dc7cef38c | |||
aa1343af89 |
111
.github/dependabot.yml
vendored
111
.github/dependabot.yml
vendored
@ -1,21 +1,96 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
# DO NOT EDIT THIS FILE. This dependabot file was generated
|
||||
# by https://github.com/KittyCAD/ciso Changes to this file should be addressed in
|
||||
# the ciso repository.
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "pip" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
reviewers:
|
||||
- jessfraz
|
||||
- greg-kcio
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
reviewers:
|
||||
- jessfraz
|
||||
- greg-kcio
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: '03:00'
|
||||
timezone: America/Los_Angeles
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
security:
|
||||
applies-to: security-updates
|
||||
update-types:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
patch:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- patch
|
||||
major:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- major
|
||||
minor:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- minor
|
||||
- patch
|
||||
- package-ecosystem: pip
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: '03:00'
|
||||
timezone: America/Los_Angeles
|
||||
open-pull-requests-limit: 5
|
||||
reviewers:
|
||||
- greg-kcio
|
||||
- jessfraz
|
||||
groups:
|
||||
security:
|
||||
applies-to: security-updates
|
||||
update-types:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
patch:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- patch
|
||||
major:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- major
|
||||
minor:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- minor
|
||||
- patch
|
||||
- package-ecosystem: docker
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: '03:00'
|
||||
timezone: America/Los_Angeles
|
||||
open-pull-requests-limit: 5
|
||||
reviewers:
|
||||
- greg-kcio
|
||||
- jessfraz
|
||||
groups:
|
||||
security:
|
||||
applies-to: security-updates
|
||||
update-types:
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
patch:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- patch
|
||||
major:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- major
|
||||
minor:
|
||||
applies-to: version-updates
|
||||
update-types:
|
||||
- minor
|
||||
- patch
|
||||
|
2
.github/workflows/generate-docs.yml
vendored
2
.github/workflows/generate-docs.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||
run: echo "modified=$(if [[ -z $(git status --porcelain --untracked-files=no --ignore-submodules) ]]; then echo "false"; else echo "true"; fi)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Commit changes, if any
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
|
2
.github/workflows/generate.yml
vendored
2
.github/workflows/generate.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||
run: echo "modified=$(if [[ -z $(git status --porcelain --untracked-files=no --ignore-submodules) ]]; then echo "false"; else echo "true"; fi)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Commit changes, if any
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
|
2
.github/workflows/update-spec-for-docs.yml
vendored
2
.github/workflows/update-spec-for-docs.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
name: update-spec
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v1
|
||||
- uses: actions/create-github-app-token@v2
|
||||
id: app-token
|
||||
with:
|
||||
# required
|
||||
|
2
CODEOWNERS
Normal file
2
CODEOWNERS
Normal file
@ -0,0 +1,2 @@
|
||||
# CODEOWNERS migrated from dependabot reviewers
|
||||
* @jessfraz @maxammann @iterion
|
@ -1,4 +1,4 @@
|
||||
FROM python:3.9
|
||||
FROM python:3.13
|
||||
|
||||
RUN pip install \
|
||||
poetry
|
||||
|
@ -389,9 +389,9 @@ def generateTypeAndExamplePython(
|
||||
logging.error("schema: %s", json.dumps(schema, indent=4))
|
||||
raise Exception("Unknown parameter type")
|
||||
elif "oneOf" in schema and len(schema["oneOf"]) > 0:
|
||||
one_of = schema["oneOf"][0]
|
||||
if len(schema["oneOf"]) > 1:
|
||||
one_of = schema["oneOf"][1]
|
||||
# Choose a random one.
|
||||
index = random.randint(0, len(schema["oneOf"]) - 1)
|
||||
one_of = schema["oneOf"][index]
|
||||
|
||||
# Check if this is a nested object.
|
||||
if isNestedObjectOneOf(schema):
|
||||
@ -2377,7 +2377,8 @@ letters: List[str] = []
|
||||
def randletter() -> str:
|
||||
letter1 = chr(random.randint(ord("A"), ord("Z")))
|
||||
letter2 = chr(random.randint(ord("A"), ord("Z")))
|
||||
letter = letter1 + letter2
|
||||
letter3 = chr(random.randint(ord("A"), ord("Z")))
|
||||
letter = letter1 + letter2 + letter3
|
||||
while letter in letters:
|
||||
return randletter()
|
||||
letters.append(letter)
|
||||
|
File diff suppressed because it is too large
Load Diff
126
kittycad/api/file/create_file_conversion_options.py
Normal file
126
kittycad/api/file/create_file_conversion_options.py
Normal file
@ -0,0 +1,126 @@
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.conversion_params import ConversionParams
|
||||
from ...models.error import Error
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
body: ConversionParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/file/conversion".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(),
|
||||
"content": body.model_dump_json(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[FileConversion, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = FileConversion(**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[FileConversion, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: ConversionParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.post(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
body: ConversionParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileConversion, Error]]:
|
||||
"""This takes a HTTP multipart body with these fields in any order:
|
||||
|
||||
- The input and output format options (as JSON), name is 'body'. - The files to convert, in raw binary. Must supply filenames.
|
||||
|
||||
This starts a conversion job and returns the `id` of the operation. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: ConversionParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[FileConversion, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
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(
|
||||
body: ConversionParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[FileConversion, Error]]:
|
||||
"""This takes a HTTP multipart body with these fields in any order:
|
||||
|
||||
- The input and output format options (as JSON), name is 'body'. - The files to convert, in raw binary. Must supply filenames.
|
||||
|
||||
This starts a conversion job and returns the `id` of the operation. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
@ -3,8 +3,8 @@ from typing import Any, Dict, Optional, Union
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.auth_api_key_response import AuthApiKeyResponse
|
||||
from ...models.error import Error
|
||||
from ...models.onboarding import Onboarding
|
||||
from ...types import Response
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/onboarding".format(
|
||||
url = "{}/auth/api-key".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
@ -27,9 +27,11 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]]:
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[AuthApiKeyResponse, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Onboarding(**response.json())
|
||||
response_200 = AuthApiKeyResponse(**response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error(**response.json())
|
||||
@ -42,7 +44,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, E
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
) -> Response[Optional[Union[AuthApiKeyResponse, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -54,12 +56,12 @@ def _build_response(
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
) -> Response[Optional[Union[AuthApiKeyResponse, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.get(
|
||||
response = httpx.post(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
@ -70,8 +72,8 @@ def sync_detailed(
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Onboarding, Error]]:
|
||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||
) -> Optional[Union[AuthApiKeyResponse, Error]]:
|
||||
"""This returns a session token.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
@ -81,13 +83,13 @@ def sync(
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Onboarding, Error]]]:
|
||||
) -> Response[Optional[Union[AuthApiKeyResponse, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.get(**kwargs)
|
||||
response = await _client.post(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
@ -95,8 +97,8 @@ async def asyncio_detailed(
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Onboarding, Error]]:
|
||||
"""Checks key part of their api usage to determine their onboarding progress""" # noqa: E501
|
||||
) -> Optional[Union[AuthApiKeyResponse, Error]]:
|
||||
"""This returns a session token.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
@ -78,7 +78,7 @@ def sync(
|
||||
) -> Optional[Union[ApiToken, Error]]:
|
||||
"""This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.
|
||||
|
||||
You must be a Zoo employee to use this endpoint.""" # noqa: E501
|
||||
You must be a Zoo admin to use this endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
discord_id=discord_id,
|
||||
@ -109,7 +109,7 @@ async def asyncio(
|
||||
) -> Optional[Union[ApiToken, Error]]:
|
||||
"""This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.
|
||||
|
||||
You must be a Zoo employee to use this endpoint.""" # noqa: E501
|
||||
You must be a Zoo admin to use this endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
129
kittycad/api/ml/create_proprietary_to_kcl.py
Normal file
129
kittycad/api/ml/create_proprietary_to_kcl.py
Normal file
@ -0,0 +1,129 @@
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.code_option import CodeOption
|
||||
from ...models.error import Error
|
||||
from ...models.kcl_model import KclModel
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
code_option: CodeOption,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ml/convert/proprietary-to-kcl".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
if code_option is not None:
|
||||
if "?" in url:
|
||||
url = url + "&code_option=" + str(code_option)
|
||||
else:
|
||||
url = url + "?code_option=" + str(code_option)
|
||||
|
||||
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[KclModel, Error]]:
|
||||
if response.status_code == 201:
|
||||
response_201 = KclModel(**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[KclModel, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
code_option: CodeOption,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[KclModel, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
code_option=code_option,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.post(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
code_option: CodeOption,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[KclModel, Error]]:
|
||||
"""This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.
|
||||
|
||||
A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.
|
||||
|
||||
Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
code_option=code_option,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
code_option: CodeOption,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[KclModel, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
code_option=code_option,
|
||||
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(
|
||||
code_option: CodeOption,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[KclModel, Error]]:
|
||||
"""This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.
|
||||
|
||||
A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.
|
||||
|
||||
Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
code_option=code_option,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
@ -87,7 +87,9 @@ def sync(
|
||||
|
||||
You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.
|
||||
|
||||
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
|
||||
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
|
||||
|
||||
Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
@ -122,7 +124,9 @@ async def asyncio(
|
||||
|
||||
You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.
|
||||
|
||||
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
|
||||
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
|
||||
|
||||
Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
@ -27,11 +27,18 @@ def _get_kwargs(
|
||||
webrtc: bool,
|
||||
*,
|
||||
client: Client,
|
||||
api_call_id: Optional[str] = None,
|
||||
pool: Optional[str] = None,
|
||||
replay: Optional[str] = None,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
|
||||
|
||||
if api_call_id is not None:
|
||||
if "?" in url:
|
||||
url = url + "&api_call_id=" + str(api_call_id)
|
||||
else:
|
||||
url = url + "?api_call_id=" + str(api_call_id)
|
||||
|
||||
if fps is not None:
|
||||
if "?" in url:
|
||||
url = url + "&fps=" + str(fps)
|
||||
@ -107,12 +114,14 @@ def sync(
|
||||
webrtc: bool,
|
||||
*,
|
||||
client: Client,
|
||||
api_call_id: Optional[str] = None,
|
||||
pool: Optional[str] = None,
|
||||
replay: Optional[str] = None,
|
||||
) -> ClientConnectionSync:
|
||||
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
api_call_id=api_call_id,
|
||||
fps=fps,
|
||||
pool=pool,
|
||||
post_effect=post_effect,
|
||||
@ -143,12 +152,14 @@ async def asyncio(
|
||||
webrtc: bool,
|
||||
*,
|
||||
client: Client,
|
||||
api_call_id: Optional[str] = None,
|
||||
pool: Optional[str] = None,
|
||||
replay: Optional[str] = None,
|
||||
) -> ClientConnectionAsync:
|
||||
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
|
||||
|
||||
kwargs = _get_kwargs(
|
||||
api_call_id=api_call_id,
|
||||
fps=fps,
|
||||
pool=pool,
|
||||
post_effect=post_effect,
|
||||
@ -184,6 +195,7 @@ class WebSocket:
|
||||
video_res_width: int,
|
||||
webrtc: bool,
|
||||
client: Client,
|
||||
api_call_id: Optional[str] = None,
|
||||
pool: Optional[str] = None,
|
||||
replay: Optional[str] = None,
|
||||
):
|
||||
@ -196,6 +208,7 @@ class WebSocket:
|
||||
video_res_width,
|
||||
webrtc,
|
||||
client=client,
|
||||
api_call_id=api_call_id,
|
||||
pool=pool,
|
||||
replay=replay,
|
||||
)
|
||||
|
@ -85,7 +85,7 @@ def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||
"""You must be a Zoo employee to perform this request.""" # noqa: E501
|
||||
"""You must be a Zoo admin to perform this request.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
@ -118,7 +118,7 @@ async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||
"""You must be a Zoo employee to perform this request.""" # noqa: E501
|
||||
"""You must be a Zoo admin to perform this request.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
@ -10,6 +10,7 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
include_total_due: bool,
|
||||
id: Uuid,
|
||||
*,
|
||||
client: Client,
|
||||
@ -19,6 +20,12 @@ def _get_kwargs(
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
|
||||
if include_total_due is not None:
|
||||
if "?" in url:
|
||||
url = url + "&include_total_due=" + str(include_total_due).lower()
|
||||
else:
|
||||
url = url + "?include_total_due=" + str(include_total_due).lower()
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
@ -57,11 +64,13 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
include_total_due: bool,
|
||||
id: Uuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
include_total_due=include_total_due,
|
||||
id=id,
|
||||
client=client,
|
||||
)
|
||||
@ -75,6 +84,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
include_total_due: bool,
|
||||
id: Uuid,
|
||||
*,
|
||||
client: Client,
|
||||
@ -82,17 +92,20 @@ def sync(
|
||||
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
include_total_due=include_total_due,
|
||||
id=id,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
include_total_due: bool,
|
||||
id: Uuid,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
include_total_due=include_total_due,
|
||||
id=id,
|
||||
client=client,
|
||||
)
|
||||
@ -104,6 +117,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
include_total_due: bool,
|
||||
id: Uuid,
|
||||
*,
|
||||
client: Client,
|
||||
@ -112,6 +126,7 @@ async def asyncio(
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
include_total_due=include_total_due,
|
||||
id=id,
|
||||
client=client,
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -19,6 +20,12 @@ def _get_kwargs(
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
|
||||
if include_total_due is not None:
|
||||
if "?" in url:
|
||||
url = url + "&include_total_due=" + str(include_total_due).lower()
|
||||
else:
|
||||
url = url + "?include_total_due=" + str(include_total_due).lower()
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
@ -58,11 +65,13 @@ def _build_response(
|
||||
|
||||
def sync_detailed(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -76,6 +85,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
@ -83,17 +93,20 @@ def sync(
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -105,6 +118,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
@ -113,6 +127,7 @@ async def asyncio(
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
@ -9,6 +9,7 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -16,6 +17,12 @@ def _get_kwargs(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
if include_total_due is not None:
|
||||
if "?" in url:
|
||||
url = url + "&include_total_due=" + str(include_total_due).lower()
|
||||
else:
|
||||
url = url + "?include_total_due=" + str(include_total_due).lower()
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
@ -54,10 +61,12 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,21 +79,25 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
"""This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,6 +108,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
@ -102,6 +116,7 @@ async def asyncio(
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
@ -9,6 +9,7 @@ from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -16,6 +17,12 @@ def _get_kwargs(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
if include_total_due is not None:
|
||||
if "?" in url:
|
||||
url = url + "&include_total_due=" + str(include_total_due).lower()
|
||||
else:
|
||||
url = url + "?include_total_due=" + str(include_total_due).lower()
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
@ -54,10 +61,12 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -70,21 +79,25 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
"""This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,6 +108,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
include_total_due: bool,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[CustomerBalance, Error]]:
|
||||
@ -102,6 +116,7 @@ async def asyncio(
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
include_total_due=include_total_due,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
||||
|
@ -12,6 +12,7 @@ from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
id: Uuid,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
@ -21,6 +22,12 @@ def _get_kwargs(
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
|
||||
if include_total_due is not None:
|
||||
if "?" in url:
|
||||
url = url + "&include_total_due=" + str(include_total_due).lower()
|
||||
else:
|
||||
url = url + "?include_total_due=" + str(include_total_due).lower()
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
@ -61,12 +68,14 @@ def _build_response(
|
||||
|
||||
def sync_detailed(
|
||||
id: Uuid,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
@ -81,6 +90,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
id: Uuid,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
@ -89,6 +99,7 @@ def sync(
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
@ -96,12 +107,14 @@ def sync(
|
||||
|
||||
async def asyncio_detailed(
|
||||
id: Uuid,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
@ -114,6 +127,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
id: Uuid,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
@ -123,6 +137,7 @@ async def asyncio(
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
@ -12,6 +12,7 @@ from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
@ -21,6 +22,12 @@ def _get_kwargs(
|
||||
id=id,
|
||||
) # noqa: E501
|
||||
|
||||
if include_total_due is not None:
|
||||
if "?" in url:
|
||||
url = url + "&include_total_due=" + str(include_total_due).lower()
|
||||
else:
|
||||
url = url + "?include_total_due=" + str(include_total_due).lower()
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
@ -61,12 +68,14 @@ def _build_response(
|
||||
|
||||
def sync_detailed(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
@ -81,6 +90,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
@ -89,6 +99,7 @@ def sync(
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
@ -96,12 +107,14 @@ def sync(
|
||||
|
||||
async def asyncio_detailed(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[CustomerBalance, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
@ -114,6 +127,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
id: UserIdentifier,
|
||||
include_total_due: bool,
|
||||
body: UpdatePaymentBalance,
|
||||
*,
|
||||
client: Client,
|
||||
@ -123,6 +137,7 @@ async def asyncio(
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
id=id,
|
||||
include_total_due=include_total_due,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
@ -79,9 +79,7 @@ def sync(
|
||||
) -> Optional[Union[User, Error]]:
|
||||
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
|
||||
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
@ -112,9 +110,7 @@ async def asyncio(
|
||||
) -> Optional[Union[User, Error]]:
|
||||
"""To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.
|
||||
|
||||
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
@ -81,9 +81,7 @@ def sync(
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
|
||||
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
@ -114,9 +112,7 @@ async def asyncio(
|
||||
) -> Optional[Union[ExtendedUser, Error]]:
|
||||
"""To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.
|
||||
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.
|
||||
|
||||
To get information about any Zoo user, you must be a Zoo employee.""" # noqa: E501
|
||||
Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
107
kittycad/api/users/patch_user_crm.py
Normal file
107
kittycad/api/users/patch_user_crm.py
Normal file
@ -0,0 +1,107 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.crm_data import CrmData
|
||||
from ...models.error import Error
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
body: CrmData,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/crm".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(),
|
||||
"content": body.model_dump_json(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
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[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: CrmData,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.patch(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
body: CrmData,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: CrmData,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.patch(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
body: CrmData,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
@ -1,18 +1,19 @@
|
||||
from typing import Any, Dict, Optional, Union
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.metadata import Metadata
|
||||
from ...models.inquiry_form import InquiryForm
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/_meta/info".format(
|
||||
url = "{}/website/form".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
@ -24,13 +25,12 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"content": body.model_dump_json(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Metadata(**response.json())
|
||||
return response_200
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error(**response.json())
|
||||
return response_4XX
|
||||
@ -40,9 +40,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Err
|
||||
return Error(**response.json())
|
||||
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -52,14 +50,16 @@ def _build_response(
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.get(
|
||||
response = httpx.put(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
@ -68,42 +68,44 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Metadata, Error]]:
|
||||
"""This includes information on any of our other distributed systems it is connected to.
|
||||
|
||||
You must be a Zoo employee to perform this request.""" # noqa: E501
|
||||
) -> Optional[Error]:
|
||||
"""users and is not authenticated.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[Metadata, Error]]]:
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.get(**kwargs)
|
||||
response = await _client.put(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Metadata, Error]]:
|
||||
"""This includes information on any of our other distributed systems it is connected to.
|
||||
|
||||
You must be a Zoo employee to perform this request.""" # noqa: E501
|
||||
) -> Optional[Error]:
|
||||
"""users and is not authenticated.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
107
kittycad/api/users/put_public_subscribe.py
Normal file
107
kittycad/api/users/put_public_subscribe.py
Normal file
@ -0,0 +1,107 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.subscribe import Subscribe
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
body: Subscribe,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/website/subscribe".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(),
|
||||
"content": body.model_dump_json(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
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[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: Subscribe,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.put(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
body: Subscribe,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: Subscribe,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.put(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
body: Subscribe,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
111
kittycad/api/users/put_user_form_self.py
Normal file
111
kittycad/api/users/put_user_form_self.py
Normal file
@ -0,0 +1,111 @@
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.inquiry_form import InquiryForm
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/form".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(),
|
||||
"content": body.model_dump_json(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error]:
|
||||
return None
|
||||
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[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.put(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
"""It gets attached to the user's account.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.put(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
body: InquiryForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Error]:
|
||||
"""It gets attached to the user's account.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
131
kittycad/api/users/update_subscription_for_user.py
Normal file
131
kittycad/api/users/update_subscription_for_user.py
Normal file
@ -0,0 +1,131 @@
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.user_identifier import UserIdentifier
|
||||
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
|
||||
from ...models.zoo_product_subscriptions_user_request import (
|
||||
ZooProductSubscriptionsUserRequest,
|
||||
)
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
id: UserIdentifier,
|
||||
body: ZooProductSubscriptionsUserRequest,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/users/{id}/payment/subscriptions".format(
|
||||
client.base_url,
|
||||
id=id,
|
||||
) # 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(),
|
||||
"content": body.model_dump_json(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(
|
||||
*, response: httpx.Response
|
||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = ZooProductSubscriptions(**response.json())
|
||||
return response_200
|
||||
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[ZooProductSubscriptions, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
id: UserIdentifier,
|
||||
body: ZooProductSubscriptionsUserRequest,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.put(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
id: UserIdentifier,
|
||||
body: ZooProductSubscriptionsUserRequest,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||
"""You must be a Zoo admin to perform this request.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
id=id,
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
id: UserIdentifier,
|
||||
body: ZooProductSubscriptionsUserRequest,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.put(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
id: UserIdentifier,
|
||||
body: ZooProductSubscriptionsUserRequest,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[ZooProductSubscriptions, Error]]:
|
||||
"""You must be a Zoo admin to perform this request.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
id=id,
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@ from .account_provider import AccountProvider
|
||||
from .add_hole_from_offset import AddHoleFromOffset
|
||||
from .add_org_member import AddOrgMember
|
||||
from .address_details import AddressDetails
|
||||
from .adjacency_info import AdjacencyInfo
|
||||
from .angle import Angle
|
||||
from .annotation_line_end import AnnotationLineEnd
|
||||
from .annotation_line_end_options import AnnotationLineEndOptions
|
||||
@ -17,6 +18,7 @@ from .api_call_query_group_by import ApiCallQueryGroupBy
|
||||
from .api_call_status import ApiCallStatus
|
||||
from .api_call_with_price import ApiCallWithPrice
|
||||
from .api_call_with_price_results_page import ApiCallWithPriceResultsPage
|
||||
from .api_endpoint import ApiEndpoint
|
||||
from .api_error import ApiError
|
||||
from .api_token import ApiToken
|
||||
from .api_token_results_page import ApiTokenResultsPage
|
||||
@ -26,13 +28,16 @@ from .async_api_call import AsyncApiCall
|
||||
from .async_api_call_output import AsyncApiCallOutput
|
||||
from .async_api_call_results_page import AsyncApiCallResultsPage
|
||||
from .async_api_call_type import AsyncApiCallType
|
||||
from .auth_api_key_response import AuthApiKeyResponse
|
||||
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
|
||||
from .boolean_intersection import BooleanIntersection
|
||||
from .boolean_subtract import BooleanSubtract
|
||||
from .boolean_union import BooleanUnion
|
||||
from .camera_drag_end import CameraDragEnd
|
||||
from .camera_drag_interaction_type import CameraDragInteractionType
|
||||
from .camera_drag_move import CameraDragMove
|
||||
@ -44,17 +49,19 @@ from .card_details import CardDetails
|
||||
from .center_of_mass import CenterOfMass
|
||||
from .client_metrics import ClientMetrics
|
||||
from .close_path import ClosePath
|
||||
from .cluster import Cluster
|
||||
from .code_language import CodeLanguage
|
||||
from .code_option import CodeOption
|
||||
from .code_output import CodeOutput
|
||||
from .color import Color
|
||||
from .complementary_edges import ComplementaryEdges
|
||||
from .component_transform import ComponentTransform
|
||||
from .connection import Connection
|
||||
from .conversion_params import ConversionParams
|
||||
from .country_code import CountryCode
|
||||
from .coupon import Coupon
|
||||
from .create_shortlink_request import CreateShortlinkRequest
|
||||
from .create_shortlink_response import CreateShortlinkResponse
|
||||
from .created_at_sort_mode import CreatedAtSortMode
|
||||
from .crm_data import CrmData
|
||||
from .currency import Currency
|
||||
from .curve_get_control_points import CurveGetControlPoints
|
||||
from .curve_get_end_points import CurveGetEndPoints
|
||||
@ -63,6 +70,7 @@ from .curve_set_constraint import CurveSetConstraint
|
||||
from .curve_type import CurveType
|
||||
from .customer import Customer
|
||||
from .customer_balance import CustomerBalance
|
||||
from .cut_strategy import CutStrategy
|
||||
from .cut_type import CutType
|
||||
from .default_camera_center_to_scene import DefaultCameraCenterToScene
|
||||
from .default_camera_center_to_selection import DefaultCameraCenterToSelection
|
||||
@ -79,14 +87,15 @@ from .density import Density
|
||||
from .der_encoded_key_pair import DerEncodedKeyPair
|
||||
from .device_access_token_request_form import DeviceAccessTokenRequestForm
|
||||
from .device_access_token_uuid import DeviceAccessTokenUuid
|
||||
from .device_auth_confirm_params import DeviceAuthConfirmParams
|
||||
from .device_auth_request_form import DeviceAuthRequestForm
|
||||
from .device_auth_verify_params import DeviceAuthVerifyParams
|
||||
from .direction import Direction
|
||||
from .disable_dry_run import DisableDryRun
|
||||
from .discount import Discount
|
||||
from .discount_code import DiscountCode
|
||||
from .distance_type import DistanceType
|
||||
from .dxf_storage import DxfStorage
|
||||
from .edge_info import EdgeInfo
|
||||
from .edge_lines_visible import EdgeLinesVisible
|
||||
from .email_authentication_form import EmailAuthenticationForm
|
||||
from .empty import Empty
|
||||
@ -112,7 +121,6 @@ from .entity_mirror import EntityMirror
|
||||
from .entity_mirror_across_edge import EntityMirrorAcrossEdge
|
||||
from .entity_set_opacity import EntitySetOpacity
|
||||
from .entity_type import EntityType
|
||||
from .environment import Environment
|
||||
from .error import Error
|
||||
from .error_code import ErrorCode
|
||||
from .event import Event
|
||||
@ -127,6 +135,7 @@ from .extrude import Extrude
|
||||
from .extruded_face_info import ExtrudedFaceInfo
|
||||
from .extrusion_face_cap_type import ExtrusionFaceCapType
|
||||
from .extrusion_face_info import ExtrusionFaceInfo
|
||||
from .face_edge_info import FaceEdgeInfo
|
||||
from .face_get_center import FaceGetCenter
|
||||
from .face_get_gradient import FaceGetGradient
|
||||
from .face_get_position import FaceGetPosition
|
||||
@ -140,9 +149,7 @@ from .file_export_format import FileExportFormat
|
||||
from .file_import_format import FileImportFormat
|
||||
from .file_mass import FileMass
|
||||
from .file_surface_area import FileSurfaceArea
|
||||
from .file_system_metadata import FileSystemMetadata
|
||||
from .file_volume import FileVolume
|
||||
from .gateway import Gateway
|
||||
from .get_entity_type import GetEntityType
|
||||
from .get_num_objects import GetNumObjects
|
||||
from .get_sketch_mode_plane import GetSketchModePlane
|
||||
@ -161,26 +168,22 @@ from .import_file import ImportFile
|
||||
from .import_files import ImportFiles
|
||||
from .imported_geometry import ImportedGeometry
|
||||
from .input_format3d import InputFormat3d
|
||||
from .inquiry_form import InquiryForm
|
||||
from .inquiry_type import InquiryType
|
||||
from .invoice import Invoice
|
||||
from .invoice_line_item import InvoiceLineItem
|
||||
from .invoice_status import InvoiceStatus
|
||||
from .ip_addr_info import IpAddrInfo
|
||||
from .jetstream import Jetstream
|
||||
from .jetstream_api_stats import JetstreamApiStats
|
||||
from .jetstream_config import JetstreamConfig
|
||||
from .jetstream_stats import JetstreamStats
|
||||
from .kcl_code_completion_params import KclCodeCompletionParams
|
||||
from .kcl_code_completion_request import KclCodeCompletionRequest
|
||||
from .kcl_code_completion_response import KclCodeCompletionResponse
|
||||
from .leaf_node import LeafNode
|
||||
from .kcl_model import KclModel
|
||||
from .length_unit import LengthUnit
|
||||
from .loft import Loft
|
||||
from .make_axes_gizmo import MakeAxesGizmo
|
||||
from .make_offset_path import MakeOffsetPath
|
||||
from .make_plane import MakePlane
|
||||
from .mass import Mass
|
||||
from .meta_cluster_info import MetaClusterInfo
|
||||
from .metadata import Metadata
|
||||
from .method import Method
|
||||
from .ml_feedback import MlFeedback
|
||||
from .ml_prompt import MlPrompt
|
||||
@ -212,7 +215,8 @@ from .object_set_material_params_pbr import ObjectSetMaterialParamsPbr
|
||||
from .object_visible import ObjectVisible
|
||||
from .ok_modeling_cmd_response import OkModelingCmdResponse
|
||||
from .ok_web_socket_response_data import OkWebSocketResponseData
|
||||
from .onboarding import Onboarding
|
||||
from .opposite_for_angle import OppositeForAngle
|
||||
from .opposite_for_length_unit import OppositeForLengthUnit
|
||||
from .org import Org
|
||||
from .org_details import OrgDetails
|
||||
from .org_member import OrgMember
|
||||
@ -253,6 +257,7 @@ from .project_entity_to_plane import ProjectEntityToPlane
|
||||
from .project_points_to_plane import ProjectPointsToPlane
|
||||
from .raw_file import RawFile
|
||||
from .reconfigure_stream import ReconfigureStream
|
||||
from .relative_to import RelativeTo
|
||||
from .remove_scene_objects import RemoveSceneObjects
|
||||
from .revolve import Revolve
|
||||
from .revolve_about_edge import RevolveAboutEdge
|
||||
@ -281,7 +286,9 @@ from .session_uuid import SessionUuid
|
||||
from .set_background_color import SetBackgroundColor
|
||||
from .set_current_tool_properties import SetCurrentToolProperties
|
||||
from .set_default_system_properties import SetDefaultSystemProperties
|
||||
from .set_grid_auto_scale import SetGridAutoScale
|
||||
from .set_grid_reference_plane import SetGridReferencePlane
|
||||
from .set_grid_scale import SetGridScale
|
||||
from .set_object_transform import SetObjectTransform
|
||||
from .set_scene_units import SetSceneUnits
|
||||
from .set_selection_filter import SetSelectionFilter
|
||||
@ -293,6 +300,7 @@ from .side_face import SideFace
|
||||
from .sketch_mode_disable import SketchModeDisable
|
||||
from .solid2d_add_hole import Solid2dAddHole
|
||||
from .solid3d_fillet_edge import Solid3dFilletEdge
|
||||
from .solid3d_get_adjacency_info import Solid3dGetAdjacencyInfo
|
||||
from .solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
|
||||
from .solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
|
||||
from .solid3d_get_common_edge import Solid3dGetCommonEdge
|
||||
@ -307,6 +315,7 @@ from .source_range_prompt import SourceRangePrompt
|
||||
from .start_path import StartPath
|
||||
from .stl_storage import StlStorage
|
||||
from .store_coupon_params import StoreCouponParams
|
||||
from .subscribe import Subscribe
|
||||
from .subscription_tier_feature import SubscriptionTierFeature
|
||||
from .subscription_tier_price import SubscriptionTierPrice
|
||||
from .subscription_tier_type import SubscriptionTierType
|
||||
@ -329,6 +338,7 @@ from .token_revoke_request_form import TokenRevokeRequestForm
|
||||
from .transform import Transform
|
||||
from .transform_by_for_point3d import TransformByForPoint3d
|
||||
from .transform_by_for_point4d import TransformByForPoint4d
|
||||
from .twist_extrude import TwistExtrude
|
||||
from .unit_angle import UnitAngle
|
||||
from .unit_angle_conversion import UnitAngleConversion
|
||||
from .unit_area import UnitArea
|
||||
|
17
kittycad/models/adjacency_info.py
Normal file
17
kittycad/models/adjacency_info.py
Normal file
@ -0,0 +1,17 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.edge_info import EdgeInfo
|
||||
|
||||
|
||||
class AdjacencyInfo(BaseModel):
|
||||
"""Edge info struct (useful for maintaining mappings between edges and faces and adjacent/opposite edges)."""
|
||||
|
||||
adjacent_info: Optional[EdgeInfo] = None
|
||||
|
||||
opposite_info: Optional[EdgeInfo] = None
|
||||
|
||||
original_info: Optional[EdgeInfo] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
15
kittycad/models/api_endpoint.py
Normal file
15
kittycad/models/api_endpoint.py
Normal file
@ -0,0 +1,15 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ApiEndpoint(str, Enum):
|
||||
"""Types of API endpoints.""" # noqa: E501
|
||||
|
||||
"""# The modeling API. """ # noqa: E501
|
||||
MODELING = "modeling"
|
||||
"""# Machine learning API. """ # noqa: E501
|
||||
ML = "ml"
|
||||
"""# File API. """ # noqa: E501
|
||||
FILE = "file"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -305,12 +305,18 @@ class OptionTextToCadMultiFileIteration(BaseModel):
|
||||
|
||||
id: Uuid
|
||||
|
||||
kcl_version: Optional[str] = None
|
||||
|
||||
model: TextToCadModel
|
||||
|
||||
model_version: str
|
||||
|
||||
outputs: Optional[Dict[str, str]] = None
|
||||
|
||||
project_name: Optional[str] = None
|
||||
|
||||
prompt: Optional[str] = None
|
||||
|
||||
source_ranges: List[SourceRangePrompt]
|
||||
|
||||
started_at: Optional[datetime.datetime] = None
|
||||
|
9
kittycad/models/auth_api_key_response.py
Normal file
9
kittycad/models/auth_api_key_response.py
Normal file
@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class AuthApiKeyResponse(BaseModel):
|
||||
"""The response from the `/auth/api-key` endpoint."""
|
||||
|
||||
session_token: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
11
kittycad/models/boolean_intersection.py
Normal file
11
kittycad/models/boolean_intersection.py
Normal file
@ -0,0 +1,11 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class BooleanIntersection(BaseModel):
|
||||
"""The response from the 'BooleanIntersection'."""
|
||||
|
||||
extra_solid_ids: Optional[List[str]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
11
kittycad/models/boolean_subtract.py
Normal file
11
kittycad/models/boolean_subtract.py
Normal file
@ -0,0 +1,11 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class BooleanSubtract(BaseModel):
|
||||
"""The response from the 'BooleanSubtract'."""
|
||||
|
||||
extra_solid_ids: Optional[List[str]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
11
kittycad/models/boolean_union.py
Normal file
11
kittycad/models/boolean_union.py
Normal file
@ -0,0 +1,11 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class BooleanUnion(BaseModel):
|
||||
"""The response from the 'BooleanUnion'."""
|
||||
|
||||
extra_solid_ids: Optional[List[str]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,11 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class CacheMetadata(BaseModel):
|
||||
"""Metadata about our cache.
|
||||
|
||||
This is mostly used for internal purposes and debugging."""
|
||||
|
||||
ok: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,7 +1,7 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
from ..models.point4d import Point4d
|
||||
from ..models.world_coordinate_system import WorldCoordinateSystem
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@ class CameraViewState(BaseModel):
|
||||
|
||||
ortho_scale_factor: float
|
||||
|
||||
pivot_position: List[float]
|
||||
pivot_position: Point3d
|
||||
|
||||
pivot_rotation: List[float]
|
||||
pivot_rotation: Point4d
|
||||
|
||||
world_coord_system: WorldCoordinateSystem
|
||||
|
||||
|
@ -1,23 +1,39 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class ClientMetrics(BaseModel):
|
||||
"""ClientMetrics contains information regarding the state of the peer."""
|
||||
|
||||
rtc_frames_decoded: int
|
||||
rtc_frame_height: Optional[int] = None
|
||||
|
||||
rtc_frames_dropped: int
|
||||
rtc_frame_width: Optional[int] = None
|
||||
|
||||
rtc_frames_per_second: int
|
||||
rtc_frames_decoded: Optional[int] = None
|
||||
|
||||
rtc_frames_received: int
|
||||
rtc_frames_dropped: Optional[int] = None
|
||||
|
||||
rtc_freeze_count: int
|
||||
rtc_frames_per_second: Optional[int] = None
|
||||
|
||||
rtc_jitter_sec: float
|
||||
rtc_frames_received: Optional[int] = None
|
||||
|
||||
rtc_keyframes_decoded: int
|
||||
rtc_freeze_count: Optional[int] = None
|
||||
|
||||
rtc_total_freezes_duration_sec: float
|
||||
rtc_jitter_sec: Optional[float] = None
|
||||
|
||||
rtc_keyframes_decoded: Optional[int] = None
|
||||
|
||||
rtc_packets_lost: Optional[int] = None
|
||||
|
||||
rtc_pause_count: Optional[int] = None
|
||||
|
||||
rtc_pli_count: Optional[int] = None
|
||||
|
||||
rtc_stun_rtt_sec: Optional[float] = None
|
||||
|
||||
rtc_total_freezes_duration_sec: Optional[float] = None
|
||||
|
||||
rtc_total_pauses_duration_sec: Optional[float] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,21 +0,0 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class Cluster(BaseModel):
|
||||
"""Cluster information."""
|
||||
|
||||
addr: Optional[str] = None
|
||||
|
||||
auth_timeout: int = 0
|
||||
|
||||
cluster_port: int = 0
|
||||
|
||||
name: str = ""
|
||||
|
||||
tls_timeout: int = 0
|
||||
|
||||
urls: List[str] = []
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
17
kittycad/models/code_option.py
Normal file
17
kittycad/models/code_option.py
Normal file
@ -0,0 +1,17 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CodeOption(str, Enum):
|
||||
"""Code option for running and verifying kcl.
|
||||
|
||||
<details><summary>JSON schema</summary>
|
||||
|
||||
```json { "title": "CodeOption", "description": "Code option for running and verifying kcl.", "type": "string", "enum": [ "parse", "execute", "cleanup", "mock_execute" ] } ``` </details>""" # noqa: E501
|
||||
|
||||
PARSE = "parse"
|
||||
EXECUTE = "execute"
|
||||
CLEANUP = "cleanup"
|
||||
MOCK_EXECUTE = "mock_execute"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
13
kittycad/models/complementary_edges.py
Normal file
13
kittycad/models/complementary_edges.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class ComplementaryEdges(BaseModel):
|
||||
"""Struct to contain the edge information of a wall of an extrude/rotate/loft/sweep."""
|
||||
|
||||
adjacent_ids: List[str]
|
||||
|
||||
opposite_id: Optional[str] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -7,7 +7,7 @@ from ..models.transform_by_for_point4d import TransformByForPoint4d
|
||||
|
||||
|
||||
class ComponentTransform(BaseModel):
|
||||
"""Container that holds a translate, rotate and scale."""
|
||||
"""Container that holds a translate, rotate and scale. Defaults to no change, everything stays the same (i.e. the identity function)."""
|
||||
|
||||
rotate_angle_axis: Optional[TransformByForPoint4d] = None
|
||||
|
||||
|
@ -1,134 +0,0 @@
|
||||
import datetime
|
||||
from typing import Dict
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.cluster import Cluster
|
||||
from ..models.gateway import Gateway
|
||||
from ..models.jetstream import Jetstream
|
||||
from ..models.leaf_node import LeafNode
|
||||
|
||||
|
||||
class Connection(BaseModel):
|
||||
"""Metadata about a pub-sub connection.
|
||||
|
||||
This is mostly used for internal purposes and debugging."""
|
||||
|
||||
auth_timeout: int = 0
|
||||
|
||||
cluster: Cluster = {
|
||||
"addr": None,
|
||||
"auth_timeout": 0,
|
||||
"cluster_port": 0,
|
||||
"name": "",
|
||||
"tls_timeout": 0,
|
||||
"urls": [],
|
||||
} # type: ignore
|
||||
|
||||
config_load_time: datetime.datetime
|
||||
|
||||
connections: int = 0
|
||||
|
||||
cores: int = 0
|
||||
|
||||
cpu: float = 0.0
|
||||
|
||||
gateway: Gateway = {
|
||||
"auth_timeout": 0,
|
||||
"host": "",
|
||||
"name": "",
|
||||
"port": 0,
|
||||
"tls_timeout": 0,
|
||||
} # type: ignore
|
||||
|
||||
git_commit: str = ""
|
||||
|
||||
go: str = ""
|
||||
|
||||
gomaxprocs: int = 0
|
||||
|
||||
host: str
|
||||
|
||||
http_base_path: str = ""
|
||||
|
||||
http_host: str = ""
|
||||
|
||||
http_port: int = 0
|
||||
|
||||
http_req_stats: Dict[str, int]
|
||||
|
||||
https_port: int = 0
|
||||
|
||||
in_bytes: int = 0
|
||||
|
||||
in_msgs: int = 0
|
||||
|
||||
jetstream: Jetstream = {
|
||||
"config": {"domain": "", "max_memory": 0, "max_storage": 0, "store_dir": ""},
|
||||
"meta": {"cluster_size": 0, "leader": "", "name": ""},
|
||||
"stats": {
|
||||
"accounts": 0,
|
||||
"api": {"errors": 0, "inflight": 0, "total": 0},
|
||||
"ha_assets": 0,
|
||||
"memory": 0,
|
||||
"reserved_memory": 0,
|
||||
"reserved_store": 0,
|
||||
"store": 0,
|
||||
},
|
||||
} # type: ignore
|
||||
|
||||
leaf: LeafNode = {"auth_timeout": 0, "host": "", "port": 0, "tls_timeout": 0} # type: ignore
|
||||
|
||||
leafnodes: int = 0
|
||||
|
||||
max_connections: int = 0
|
||||
|
||||
max_control_line: int = 0
|
||||
|
||||
max_payload: int = 0
|
||||
|
||||
max_pending: int = 0
|
||||
|
||||
mem: int = 0
|
||||
|
||||
now: datetime.datetime
|
||||
|
||||
out_bytes: int = 0
|
||||
|
||||
out_msgs: int = 0
|
||||
|
||||
ping_interval: int = 0
|
||||
|
||||
ping_max: int = 0
|
||||
|
||||
port: int = 0
|
||||
|
||||
proto: int = 0
|
||||
|
||||
remotes: int = 0
|
||||
|
||||
routes: int = 0
|
||||
|
||||
server_id: str = ""
|
||||
|
||||
server_name: str = ""
|
||||
|
||||
slow_consumers: int = 0
|
||||
|
||||
start: datetime.datetime
|
||||
|
||||
subscriptions: int = 0
|
||||
|
||||
system_account: str = ""
|
||||
|
||||
tls_timeout: int = 0
|
||||
|
||||
total_connections: int = 0
|
||||
|
||||
uptime: str = ""
|
||||
|
||||
version: str = ""
|
||||
|
||||
write_deadline: int = 0
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
14
kittycad/models/conversion_params.py
Normal file
14
kittycad/models/conversion_params.py
Normal file
@ -0,0 +1,14 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.input_format3d import InputFormat3d
|
||||
from ..models.output_format3d import OutputFormat3d
|
||||
|
||||
|
||||
class ConversionParams(BaseModel):
|
||||
"""Describes the file to convert (src) and what it should be converted into (output)."""
|
||||
|
||||
output_format: OutputFormat3d
|
||||
|
||||
src_format: InputFormat3d
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
15
kittycad/models/crm_data.py
Normal file
15
kittycad/models/crm_data.py
Normal file
@ -0,0 +1,15 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class CrmData(BaseModel):
|
||||
"""The data for subscribing a user to the newsletter."""
|
||||
|
||||
cad_industry: Optional[str] = None
|
||||
|
||||
cad_user_type: Optional[str] = None
|
||||
|
||||
number_of_cad_users: Optional[str] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -21,17 +21,19 @@ class CustomerBalance(BaseModel):
|
||||
|
||||
modeling_app_enterprise_price: Optional[SubscriptionTierPrice] = None
|
||||
|
||||
monthly_credits_remaining: float
|
||||
monthly_api_credits_remaining: int
|
||||
|
||||
pre_pay_cash_remaining: float
|
||||
monthly_api_credits_remaining_monetary_value: float
|
||||
|
||||
pre_pay_credits_remaining: float
|
||||
stable_api_credits_remaining: int
|
||||
|
||||
stable_api_credits_remaining_monetary_value: float
|
||||
|
||||
subscription_details: Optional[ZooProductSubscriptions] = None
|
||||
|
||||
subscription_id: Optional[str] = None
|
||||
|
||||
total_due: float
|
||||
total_due: Optional[float] = None
|
||||
|
||||
updated_at: datetime.datetime
|
||||
|
||||
|
15
kittycad/models/cut_strategy.py
Normal file
15
kittycad/models/cut_strategy.py
Normal file
@ -0,0 +1,15 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CutStrategy(str, Enum):
|
||||
"""What strategy (algorithm) should be used for cutting? Defaults to Automatic.""" # noqa: E501
|
||||
|
||||
"""# Basic fillet cut. This has limitations, like the filletted edges can't touch each other. But it's very fast and simple. """ # noqa: E501
|
||||
BASIC = "basic"
|
||||
"""# More complicated fillet cut. It works for more use-cases, like edges that touch each other. But it's slower than the Basic method. """ # noqa: E501
|
||||
CSG = "csg"
|
||||
"""# Tries the Basic method, and if that doesn't work, tries the CSG strategy. """ # noqa: E501
|
||||
AUTOMATIC = "automatic"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
9
kittycad/models/device_auth_confirm_params.py
Normal file
9
kittycad/models/device_auth_confirm_params.py
Normal file
@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class DeviceAuthConfirmParams(BaseModel):
|
||||
"""The request parameters to confirm the `user_code` for the OAuth 2.0 Device Authorization Grant."""
|
||||
|
||||
user_code: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,9 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class DeviceAuthVerifyParams(BaseModel):
|
||||
"""The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant."""
|
||||
|
||||
user_code: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
13
kittycad/models/edge_info.py
Normal file
13
kittycad/models/edge_info.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class EdgeInfo(BaseModel):
|
||||
"""A list of faces for a specific edge."""
|
||||
|
||||
edge_id: str
|
||||
|
||||
faces: List[str]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,11 +1,13 @@
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
|
||||
|
||||
class EntityCircularPattern(BaseModel):
|
||||
"""The response from the `EntityCircularPattern` command."""
|
||||
|
||||
entity_ids: List[str]
|
||||
entity_face_edge_ids: Optional[List[FaceEdgeInfo]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,7 +1,13 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
|
||||
|
||||
class EntityClone(BaseModel):
|
||||
"""The response from the `EntityClone` command."""
|
||||
|
||||
face_edge_ids: Optional[List[FaceEdgeInfo]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,11 +1,13 @@
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
|
||||
|
||||
class EntityLinearPattern(BaseModel):
|
||||
"""The response from the `EntityLinearPattern` command."""
|
||||
|
||||
entity_ids: List[str]
|
||||
entity_face_edge_ids: Optional[List[FaceEdgeInfo]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,11 +1,13 @@
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
|
||||
|
||||
class EntityLinearPatternTransform(BaseModel):
|
||||
"""The response from the `EntityLinearPatternTransform` command."""
|
||||
|
||||
entity_ids: List[str]
|
||||
entity_face_edge_ids: Optional[List[FaceEdgeInfo]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,11 +1,13 @@
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
|
||||
|
||||
class EntityMirror(BaseModel):
|
||||
"""The response from the `EntityMirror` endpoint."""
|
||||
|
||||
entity_ids: List[str]
|
||||
entity_face_edge_ids: Optional[List[FaceEdgeInfo]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,11 +1,13 @@
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
|
||||
|
||||
class EntityMirrorAcrossEdge(BaseModel):
|
||||
"""The response from the `EntityMirrorAcrossEdge` endpoint."""
|
||||
|
||||
entity_ids: List[str]
|
||||
entity_face_edge_ids: Optional[List[FaceEdgeInfo]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,15 +0,0 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class Environment(str, Enum):
|
||||
"""The environment the server is running in.""" # noqa: E501
|
||||
|
||||
"""# The development environment. This is for running locally. """ # noqa: E501
|
||||
DEVELOPMENT = "DEVELOPMENT"
|
||||
"""# The preview environment. This is when PRs are created and a service is deployed for testing. """ # noqa: E501
|
||||
PREVIEW = "PREVIEW"
|
||||
"""# The production environment. """ # noqa: E501
|
||||
PRODUCTION = "PRODUCTION"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -20,6 +20,8 @@ class ExtendedUser(BaseModel):
|
||||
|
||||
created_at: datetime.datetime
|
||||
|
||||
deletion_scheduled: bool = False
|
||||
|
||||
discord: Optional[str] = None
|
||||
|
||||
email: Optional[str] = None
|
||||
@ -36,6 +38,8 @@ class ExtendedUser(BaseModel):
|
||||
|
||||
image: str
|
||||
|
||||
is_onboarded: bool = False
|
||||
|
||||
is_service_account: bool = False
|
||||
|
||||
last_name: Optional[str] = None
|
||||
|
15
kittycad/models/face_edge_info.py
Normal file
15
kittycad/models/face_edge_info.py
Normal file
@ -0,0 +1,15 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class FaceEdgeInfo(BaseModel):
|
||||
"""Faces and edges id info (most used in identifying geometry in patterned and mirrored objects)."""
|
||||
|
||||
edges: List[str]
|
||||
|
||||
faces: List[str]
|
||||
|
||||
object_id: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,11 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class FileSystemMetadata(BaseModel):
|
||||
"""Metadata about our file system.
|
||||
|
||||
This is mostly used for internal purposes and debugging."""
|
||||
|
||||
ok: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,17 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class Gateway(BaseModel):
|
||||
"""Gateway information."""
|
||||
|
||||
auth_timeout: int = 0
|
||||
|
||||
host: str = ""
|
||||
|
||||
name: str = ""
|
||||
|
||||
port: int = 0
|
||||
|
||||
tls_timeout: int = 0
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
27
kittycad/models/inquiry_form.py
Normal file
27
kittycad/models/inquiry_form.py
Normal file
@ -0,0 +1,27 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.inquiry_type import InquiryType
|
||||
|
||||
|
||||
class InquiryForm(BaseModel):
|
||||
"""The form for a public inquiry submission."""
|
||||
|
||||
company: Optional[str] = None
|
||||
|
||||
email: str
|
||||
|
||||
first_name: str
|
||||
|
||||
industry: Optional[str] = None
|
||||
|
||||
inquiry_type: InquiryType
|
||||
|
||||
last_name: str
|
||||
|
||||
message: str
|
||||
|
||||
phone: Optional[str] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
25
kittycad/models/inquiry_type.py
Normal file
25
kittycad/models/inquiry_type.py
Normal file
@ -0,0 +1,25 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class InquiryType(str, Enum):
|
||||
"""The type of inquiry.""" # noqa: E501
|
||||
|
||||
"""# General inquiry about the service or product. """ # noqa: E501
|
||||
GENERAL_INQUIRY = "general_inquiry"
|
||||
"""# Questions related to sales or purchasing. """ # noqa: E501
|
||||
SALES_QUESTION = "sales_question"
|
||||
"""# Inquiry from a developer, typically technical in nature. """ # noqa: E501
|
||||
DEVELOPER_INQUIRY = "developer_inquiry"
|
||||
"""# Opportunity for partnership or collaboration. """ # noqa: E501
|
||||
PARTNERSHIP_OPPORTUNITY = "partnership_opportunity"
|
||||
"""# Other inquiries related to sales that do not fit predefined categories. """ # noqa: E501
|
||||
OTHER_SALES_INQUIRY = "other_sales_inquiry"
|
||||
"""# Request for technical support or troubleshooting. """ # noqa: E501
|
||||
TECHNICAL_SUPPORT = "technical_support"
|
||||
"""# Questions or requests related to account management. """ # noqa: E501
|
||||
ACCOUNT_MANAGEMENT = "account_management"
|
||||
"""# Other support-related inquiries that do not fit predefined categories. """ # noqa: E501
|
||||
OTHER_SUPPORT_INQUIRY = "other_support_inquiry"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -1,30 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.jetstream_config import JetstreamConfig
|
||||
from ..models.jetstream_stats import JetstreamStats
|
||||
from ..models.meta_cluster_info import MetaClusterInfo
|
||||
|
||||
|
||||
class Jetstream(BaseModel):
|
||||
"""Jetstream information."""
|
||||
|
||||
config: JetstreamConfig = {
|
||||
"domain": "",
|
||||
"max_memory": 0,
|
||||
"max_storage": 0,
|
||||
"store_dir": "",
|
||||
} # type: ignore
|
||||
|
||||
meta: MetaClusterInfo = {"cluster_size": 0, "leader": "", "name": ""} # type: ignore
|
||||
|
||||
stats: JetstreamStats = {
|
||||
"accounts": 0,
|
||||
"api": {"errors": 0, "inflight": 0, "total": 0},
|
||||
"ha_assets": 0,
|
||||
"memory": 0,
|
||||
"reserved_memory": 0,
|
||||
"reserved_store": 0,
|
||||
"store": 0,
|
||||
} # type: ignore
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,13 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class JetstreamApiStats(BaseModel):
|
||||
"""Jetstream API statistics."""
|
||||
|
||||
errors: int = 0
|
||||
|
||||
inflight: int = 0
|
||||
|
||||
total: int = 0
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,15 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class JetstreamConfig(BaseModel):
|
||||
"""Jetstream configuration."""
|
||||
|
||||
domain: str = ""
|
||||
|
||||
max_memory: int = 0
|
||||
|
||||
max_storage: int = 0
|
||||
|
||||
store_dir: str = ""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,23 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.jetstream_api_stats import JetstreamApiStats
|
||||
|
||||
|
||||
class JetstreamStats(BaseModel):
|
||||
"""Jetstream statistics."""
|
||||
|
||||
accounts: int = 0
|
||||
|
||||
api: JetstreamApiStats = {"errors": 0, "inflight": 0, "total": 0} # type: ignore
|
||||
|
||||
ha_assets: int = 0
|
||||
|
||||
memory: int = 0
|
||||
|
||||
reserved_memory: int = 0
|
||||
|
||||
reserved_store: int = 0
|
||||
|
||||
store: int = 0
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
9
kittycad/models/kcl_model.py
Normal file
9
kittycad/models/kcl_model.py
Normal file
@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class KclModel(BaseModel):
|
||||
"""The response containing the KCL code."""
|
||||
|
||||
code: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,15 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class LeafNode(BaseModel):
|
||||
"""Leaf node information."""
|
||||
|
||||
auth_timeout: int = 0
|
||||
|
||||
host: str = ""
|
||||
|
||||
port: int = 0
|
||||
|
||||
tls_timeout: int = 0
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,13 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class MetaClusterInfo(BaseModel):
|
||||
"""Jetstream statistics."""
|
||||
|
||||
cluster_size: int = 0
|
||||
|
||||
leader: str = ""
|
||||
|
||||
name: str = ""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -1,24 +0,0 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.cache_metadata import CacheMetadata
|
||||
from ..models.connection import Connection
|
||||
from ..models.environment import Environment
|
||||
from ..models.file_system_metadata import FileSystemMetadata
|
||||
|
||||
|
||||
class Metadata(BaseModel):
|
||||
"""Metadata about our currently running server.
|
||||
|
||||
This is mostly used for internal purposes and debugging."""
|
||||
|
||||
cache: CacheMetadata
|
||||
|
||||
environment: Environment
|
||||
|
||||
fs: FileSystemMetadata
|
||||
|
||||
git_hash: str
|
||||
|
||||
pubsub: Connection
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -2,6 +2,7 @@ from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.api_endpoint import ApiEndpoint
|
||||
from ..models.modeling_app_share_links import ModelingAppShareLinks
|
||||
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
|
||||
from ..models.subscription_tier_feature import SubscriptionTierFeature
|
||||
@ -21,11 +22,17 @@ class ModelingAppSubscriptionTier(BaseModel):
|
||||
|
||||
description: str
|
||||
|
||||
endpoints_included: Optional[List[ApiEndpoint]] = None
|
||||
|
||||
features: Optional[List[SubscriptionTierFeature]] = None
|
||||
|
||||
monthly_pay_as_you_go_api_credits: int = 0
|
||||
|
||||
monthly_pay_as_you_go_api_credits_monetary_value: float
|
||||
|
||||
name: ModelingAppSubscriptionTierName
|
||||
|
||||
pay_as_you_go_credits: float
|
||||
pay_as_you_go_api_credit_price: float = 0.0
|
||||
|
||||
price: SubscriptionTierPrice
|
||||
|
||||
|
@ -11,6 +11,7 @@ from ..models.camera_movement import CameraMovement
|
||||
from ..models.camera_view_state import CameraViewState
|
||||
from ..models.color import Color
|
||||
from ..models.component_transform import ComponentTransform
|
||||
from ..models.cut_strategy import CutStrategy
|
||||
from ..models.cut_type import CutType
|
||||
from ..models.distance_type import DistanceType
|
||||
from ..models.entity_type import EntityType
|
||||
@ -20,6 +21,8 @@ from ..models.import_file import ImportFile
|
||||
from ..models.input_format3d import InputFormat3d
|
||||
from ..models.length_unit import LengthUnit
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.opposite_for_angle import OppositeForAngle
|
||||
from ..models.opposite_for_length_unit import OppositeForLengthUnit
|
||||
from ..models.output_format2d import OutputFormat2d
|
||||
from ..models.output_format3d import OutputFormat3d
|
||||
from ..models.path_component_constraint_bound import PathComponentConstraintBound
|
||||
@ -28,6 +31,7 @@ from ..models.path_segment import PathSegment
|
||||
from ..models.perspective_camera_parameters import PerspectiveCameraParameters
|
||||
from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
from ..models.relative_to import RelativeTo
|
||||
from ..models.scene_selection_type import SceneSelectionType
|
||||
from ..models.scene_tool_type import SceneToolType
|
||||
from ..models.transform import Transform
|
||||
@ -89,6 +93,8 @@ class OptionExtrude(BaseModel):
|
||||
|
||||
faces: Optional[ExtrudedFaceInfo] = None
|
||||
|
||||
opposite: OppositeForLengthUnit = "None" # type: ignore
|
||||
|
||||
target: ModelingCmdId
|
||||
|
||||
type: Literal["extrude"] = "extrude"
|
||||
@ -96,9 +102,33 @@ class OptionExtrude(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionTwistExtrude(BaseModel):
|
||||
"""Command for twist extruding a solid 2d."""
|
||||
|
||||
angle_step_size: Angle = {"unit": "degrees", "value": 15.0} # type: ignore
|
||||
|
||||
center_2d: Point2d = {"x": 0.0, "y": 0.0} # type: ignore
|
||||
|
||||
distance: LengthUnit
|
||||
|
||||
faces: Optional[ExtrudedFaceInfo] = None
|
||||
|
||||
target: ModelingCmdId
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
total_rotation_angle: Angle
|
||||
|
||||
type: Literal["twist_extrude"] = "twist_extrude"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSweep(BaseModel):
|
||||
"""Extrude the object along a path."""
|
||||
|
||||
relative_to: RelativeTo = "sketch_plane" # type: ignore
|
||||
|
||||
sectional: bool
|
||||
|
||||
target: ModelingCmdId
|
||||
@ -121,6 +151,8 @@ class OptionRevolve(BaseModel):
|
||||
|
||||
axis_is_2d: bool
|
||||
|
||||
opposite: OppositeForAngle = "None" # type: ignore
|
||||
|
||||
origin: Point3d
|
||||
|
||||
target: ModelingCmdId
|
||||
@ -155,6 +187,8 @@ class OptionRevolveAboutEdge(BaseModel):
|
||||
|
||||
edge_id: str
|
||||
|
||||
opposite: OppositeForAngle = "None" # type: ignore
|
||||
|
||||
target: ModelingCmdId
|
||||
|
||||
tolerance: LengthUnit
|
||||
@ -809,14 +843,18 @@ class OptionSolid3DFilletEdge(BaseModel):
|
||||
|
||||
cut_type: CutType = "fillet" # type: ignore
|
||||
|
||||
edge_id: str
|
||||
edge_id: Optional[str] = None
|
||||
|
||||
face_id: Optional[str] = None
|
||||
edge_ids: List[str] = []
|
||||
|
||||
extra_face_ids: List[str] = []
|
||||
|
||||
object_id: str
|
||||
|
||||
radius: LengthUnit
|
||||
|
||||
strategy: CutStrategy = "automatic" # type: ignore
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
type: Literal["solid3d_fillet_edge"] = "solid3d_fillet_edge"
|
||||
@ -1480,6 +1518,18 @@ class OptionSolid3DGetExtrusionFaceInfo(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSolid3DGetAdjacencyInfo(BaseModel):
|
||||
"""Get a concise description of all of solids edges."""
|
||||
|
||||
edge_id: str
|
||||
|
||||
object_id: str
|
||||
|
||||
type: Literal["solid3d_get_adjacency_info"] = "solid3d_get_adjacency_info"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSelectClear(BaseModel):
|
||||
"""Clear the selection"""
|
||||
|
||||
@ -1516,6 +1566,44 @@ class OptionSetObjectTransform(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionBooleanUnion(BaseModel):
|
||||
"""Create a new solid from combining other smaller solids. In other words, every part of the input solids will be included in the output solid."""
|
||||
|
||||
solid_ids: List[str]
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
type: Literal["boolean_union"] = "boolean_union"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionBooleanIntersection(BaseModel):
|
||||
"""Create a new solid from intersecting several other solids. In other words, the part of the input solids where they all overlap will be the output solid."""
|
||||
|
||||
solid_ids: List[str]
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
type: Literal["boolean_intersection"] = "boolean_intersection"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionBooleanSubtract(BaseModel):
|
||||
"""Create a new solid from subtracting several other solids. The 'target' is what will be cut from. The 'tool' is what will be cut out from 'target'."""
|
||||
|
||||
target_ids: List[str]
|
||||
|
||||
tolerance: LengthUnit
|
||||
|
||||
tool_ids: List[str]
|
||||
|
||||
type: Literal["boolean_subtract"] = "boolean_subtract"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionMakeOffsetPath(BaseModel):
|
||||
"""Make a new path by offsetting an object by a given distance. The new path's ID will be the ID of this command."""
|
||||
|
||||
@ -1554,6 +1642,26 @@ class OptionSetGridReferencePlane(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridScale(BaseModel):
|
||||
"""Set the scale of the grid lines in the video feed."""
|
||||
|
||||
type: Literal["set_grid_scale"] = "set_grid_scale"
|
||||
|
||||
units: UnitLength
|
||||
|
||||
value: float
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridAutoScale(BaseModel):
|
||||
"""Set the grid lines to auto scale. The grid will get larger the further you zoom out, and smaller the more you zoom in."""
|
||||
|
||||
type: Literal["set_grid_auto_scale"] = "set_grid_auto_scale"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
ModelingCmd = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -1562,6 +1670,7 @@ ModelingCmd = RootModel[
|
||||
OptionMovePathPen,
|
||||
OptionExtendPath,
|
||||
OptionExtrude,
|
||||
OptionTwistExtrude,
|
||||
OptionSweep,
|
||||
OptionRevolve,
|
||||
OptionSolid3DShellFace,
|
||||
@ -1674,13 +1783,19 @@ ModelingCmd = RootModel[
|
||||
OptionOrientToFace,
|
||||
OptionViewIsometric,
|
||||
OptionSolid3DGetExtrusionFaceInfo,
|
||||
OptionSolid3DGetAdjacencyInfo,
|
||||
OptionSelectClear,
|
||||
OptionSelectGet,
|
||||
OptionGetNumObjects,
|
||||
OptionSetObjectTransform,
|
||||
OptionBooleanUnion,
|
||||
OptionBooleanIntersection,
|
||||
OptionBooleanSubtract,
|
||||
OptionMakeOffsetPath,
|
||||
OptionAddHoleFromOffset,
|
||||
OptionSetGridReferencePlane,
|
||||
OptionSetGridScale,
|
||||
OptionSetGridAutoScale,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
@ -8,6 +8,8 @@ class OAuth2ClientInfo(BaseModel):
|
||||
|
||||
csrf_token: Optional[str] = None
|
||||
|
||||
oidc_nonce: Optional[str] = None
|
||||
|
||||
pkce_code_verifier: Optional[str] = None
|
||||
|
||||
url: Optional[str] = None
|
||||
|
@ -4,11 +4,16 @@ from pydantic import BaseModel, ConfigDict, Field, RootModel
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from ..models.add_hole_from_offset import AddHoleFromOffset
|
||||
from ..models.adjacency_info import AdjacencyInfo
|
||||
from ..models.boolean_intersection import BooleanIntersection
|
||||
from ..models.boolean_subtract import BooleanSubtract
|
||||
from ..models.boolean_union import BooleanUnion
|
||||
from ..models.camera_drag_end import CameraDragEnd
|
||||
from ..models.camera_drag_move import CameraDragMove
|
||||
from ..models.camera_drag_start import CameraDragStart
|
||||
from ..models.center_of_mass import CenterOfMass
|
||||
from ..models.close_path import ClosePath
|
||||
from ..models.complementary_edges import ComplementaryEdges
|
||||
from ..models.curve_get_control_points import CurveGetControlPoints
|
||||
from ..models.curve_get_end_points import CurveGetEndPoints
|
||||
from ..models.curve_get_type import CurveGetType
|
||||
@ -28,6 +33,7 @@ from ..models.default_camera_set_view import DefaultCameraSetView
|
||||
from ..models.default_camera_zoom import DefaultCameraZoom
|
||||
from ..models.density import Density
|
||||
from ..models.disable_dry_run import DisableDryRun
|
||||
from ..models.edge_info import EdgeInfo
|
||||
from ..models.edge_lines_visible import EdgeLinesVisible
|
||||
from ..models.enable_dry_run import EnableDryRun
|
||||
from ..models.enable_sketch_mode import EnableSketchMode
|
||||
@ -55,6 +61,7 @@ from ..models.export3d import Export3d
|
||||
from ..models.extend_path import ExtendPath
|
||||
from ..models.extrude import Extrude
|
||||
from ..models.extrusion_face_info import ExtrusionFaceInfo
|
||||
from ..models.face_edge_info import FaceEdgeInfo
|
||||
from ..models.face_get_center import FaceGetCenter
|
||||
from ..models.face_get_gradient import FaceGetGradient
|
||||
from ..models.face_get_position import FaceGetPosition
|
||||
@ -107,7 +114,9 @@ from ..models.send_object import SendObject
|
||||
from ..models.set_background_color import SetBackgroundColor
|
||||
from ..models.set_current_tool_properties import SetCurrentToolProperties
|
||||
from ..models.set_default_system_properties import SetDefaultSystemProperties
|
||||
from ..models.set_grid_auto_scale import SetGridAutoScale
|
||||
from ..models.set_grid_reference_plane import SetGridReferencePlane
|
||||
from ..models.set_grid_scale import SetGridScale
|
||||
from ..models.set_object_transform import SetObjectTransform
|
||||
from ..models.set_scene_units import SetSceneUnits
|
||||
from ..models.set_selection_filter import SetSelectionFilter
|
||||
@ -116,6 +125,7 @@ from ..models.set_tool import SetTool
|
||||
from ..models.sketch_mode_disable import SketchModeDisable
|
||||
from ..models.solid2d_add_hole import Solid2dAddHole
|
||||
from ..models.solid3d_fillet_edge import Solid3dFilletEdge
|
||||
from ..models.solid3d_get_adjacency_info import Solid3dGetAdjacencyInfo
|
||||
from ..models.solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
|
||||
from ..models.solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
|
||||
from ..models.solid3d_get_common_edge import Solid3dGetCommonEdge
|
||||
@ -128,6 +138,7 @@ from ..models.start_path import StartPath
|
||||
from ..models.surface_area import SurfaceArea
|
||||
from ..models.sweep import Sweep
|
||||
from ..models.take_snapshot import TakeSnapshot
|
||||
from ..models.twist_extrude import TwistExtrude
|
||||
from ..models.update_annotation import UpdateAnnotation
|
||||
from ..models.view_isometric import ViewIsometric
|
||||
from ..models.volume import Volume
|
||||
@ -192,6 +203,16 @@ class OptionExtrude(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionTwistExtrude(BaseModel):
|
||||
""""""
|
||||
|
||||
data: TwistExtrude
|
||||
|
||||
type: Literal["twist_extrude"] = "twist_extrude"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSweep(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -956,6 +977,16 @@ class OptionSelectGet(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSolid3DGetAdjacencyInfo(BaseModel):
|
||||
""""""
|
||||
|
||||
data: Solid3dGetAdjacencyInfo
|
||||
|
||||
type: Literal["solid3d_get_adjacency_info"] = "solid3d_get_adjacency_info"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSolid3DGetAllEdgeFaces(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1298,6 +1329,26 @@ class OptionEntityGetDistance(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionFaceEdgeInfo(BaseModel):
|
||||
""""""
|
||||
|
||||
data: FaceEdgeInfo
|
||||
|
||||
type: Literal["face_edge_info"] = "face_edge_info"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionEdgeInfo(BaseModel):
|
||||
""""""
|
||||
|
||||
data: EdgeInfo
|
||||
|
||||
type: Literal["edge_info"] = "edge_info"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionEntityClone(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1408,6 +1459,26 @@ class OptionExtrusionFaceInfo(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionComplementaryEdges(BaseModel):
|
||||
""""""
|
||||
|
||||
data: ComplementaryEdges
|
||||
|
||||
type: Literal["complementary_edges"] = "complementary_edges"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionAdjacencyInfo(BaseModel):
|
||||
""""""
|
||||
|
||||
data: AdjacencyInfo
|
||||
|
||||
type: Literal["adjacency_info"] = "adjacency_info"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridReferencePlane(BaseModel):
|
||||
""""""
|
||||
|
||||
@ -1418,6 +1489,56 @@ class OptionSetGridReferencePlane(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionBooleanUnion(BaseModel):
|
||||
""""""
|
||||
|
||||
data: BooleanUnion
|
||||
|
||||
type: Literal["boolean_union"] = "boolean_union"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionBooleanIntersection(BaseModel):
|
||||
""""""
|
||||
|
||||
data: BooleanIntersection
|
||||
|
||||
type: Literal["boolean_intersection"] = "boolean_intersection"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionBooleanSubtract(BaseModel):
|
||||
""""""
|
||||
|
||||
data: BooleanSubtract
|
||||
|
||||
type: Literal["boolean_subtract"] = "boolean_subtract"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridScale(BaseModel):
|
||||
""""""
|
||||
|
||||
data: SetGridScale
|
||||
|
||||
type: Literal["set_grid_scale"] = "set_grid_scale"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionSetGridAutoScale(BaseModel):
|
||||
""""""
|
||||
|
||||
data: SetGridAutoScale
|
||||
|
||||
type: Literal["set_grid_auto_scale"] = "set_grid_auto_scale"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
OkModelingCmdResponse = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -1427,6 +1548,7 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionMovePathPen,
|
||||
OptionExtendPath,
|
||||
OptionExtrude,
|
||||
OptionTwistExtrude,
|
||||
OptionSweep,
|
||||
OptionRevolve,
|
||||
OptionSolid3DShellFace,
|
||||
@ -1503,6 +1625,7 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionAddHoleFromOffset,
|
||||
OptionDefaultCameraFocusOn,
|
||||
OptionSelectGet,
|
||||
OptionSolid3DGetAdjacencyInfo,
|
||||
OptionSolid3DGetAllEdgeFaces,
|
||||
OptionSolid3DGetAllOppositeEdges,
|
||||
OptionSolid3DGetOppositeEdge,
|
||||
@ -1537,6 +1660,8 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionCenterOfMass,
|
||||
OptionGetSketchModePlane,
|
||||
OptionEntityGetDistance,
|
||||
OptionFaceEdgeInfo,
|
||||
OptionEdgeInfo,
|
||||
OptionEntityClone,
|
||||
OptionEntityLinearPatternTransform,
|
||||
OptionEntityLinearPattern,
|
||||
@ -1548,7 +1673,14 @@ OkModelingCmdResponse = RootModel[
|
||||
OptionEntityMakeHelixFromEdge,
|
||||
OptionSolid3DGetExtrusionFaceInfo,
|
||||
OptionExtrusionFaceInfo,
|
||||
OptionComplementaryEdges,
|
||||
OptionAdjacencyInfo,
|
||||
OptionSetGridReferencePlane,
|
||||
OptionBooleanUnion,
|
||||
OptionBooleanIntersection,
|
||||
OptionBooleanSubtract,
|
||||
OptionSetGridScale,
|
||||
OptionSetGridAutoScale,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
@ -170,6 +170,24 @@ class OptionPong(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class DebugData(BaseModel):
|
||||
""""""
|
||||
|
||||
name: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDebug(BaseModel):
|
||||
"""Information about the connected instance"""
|
||||
|
||||
data: DebugData
|
||||
|
||||
type: Literal["debug"] = "debug"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
OkWebSocketResponseData = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -182,6 +200,7 @@ OkWebSocketResponseData = RootModel[
|
||||
OptionMetricsRequest,
|
||||
OptionModelingSessionData,
|
||||
OptionPong,
|
||||
OptionDebug,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
@ -1,16 +0,0 @@
|
||||
import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class Onboarding(BaseModel):
|
||||
"""Onboarding details"""
|
||||
|
||||
first_call_from_modeling_app_date: Optional[datetime.datetime] = None
|
||||
|
||||
first_call_from_text_to_cad_date: Optional[datetime.datetime] = None
|
||||
|
||||
first_token_date: Optional[datetime.datetime] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
17
kittycad/models/opposite_for_angle.py
Normal file
17
kittycad/models/opposite_for_angle.py
Normal file
@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
|
||||
|
||||
class OppositeForAngle(str):
|
||||
""""""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
def __get_pydantic_core_schema__(
|
||||
cls, source_type: Any, handler: GetCoreSchemaHandler
|
||||
) -> CoreSchema:
|
||||
return core_schema.no_info_after_validator_function(cls, handler(str))
|
17
kittycad/models/opposite_for_length_unit.py
Normal file
17
kittycad/models/opposite_for_length_unit.py
Normal file
@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
|
||||
|
||||
class OppositeForLengthUnit(str):
|
||||
""""""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
def __get_pydantic_core_schema__(
|
||||
cls, source_type: Any, handler: GetCoreSchemaHandler
|
||||
) -> CoreSchema:
|
||||
return core_schema.no_info_after_validator_function(cls, handler(str))
|
@ -1,4 +1,5 @@
|
||||
from typing import Literal, Union
|
||||
import datetime
|
||||
from typing import Literal, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, RootModel
|
||||
from typing_extensions import Annotated
|
||||
@ -16,6 +17,8 @@ from ..models.unit_length import UnitLength
|
||||
class OptionFbx(BaseModel):
|
||||
"""Autodesk Filmbox (FBX) format."""
|
||||
|
||||
created: Optional[datetime.datetime] = None
|
||||
|
||||
storage: FbxStorage
|
||||
|
||||
type: Literal["fbx"] = "fbx"
|
||||
@ -68,6 +71,8 @@ class OptionStep(BaseModel):
|
||||
|
||||
coords: System
|
||||
|
||||
created: Optional[datetime.datetime] = None
|
||||
|
||||
type: Literal["step"] = "step"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -93,6 +93,22 @@ class OptionArcTo(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionCircularInvolute(BaseModel):
|
||||
"""Adds a circular involute from the current position that goes through the given end_radius and is rotated around the current point by angle."""
|
||||
|
||||
angle: Angle
|
||||
|
||||
end_radius: LengthUnit
|
||||
|
||||
reverse: bool
|
||||
|
||||
start_radius: LengthUnit
|
||||
|
||||
type: Literal["circular_involute"] = "circular_involute"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
PathSegment = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
@ -102,6 +118,7 @@ PathSegment = RootModel[
|
||||
OptionTangentialArc,
|
||||
OptionTangentialArcTo,
|
||||
OptionArcTo,
|
||||
OptionCircularInvolute,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
13
kittycad/models/relative_to.py
Normal file
13
kittycad/models/relative_to.py
Normal file
@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class RelativeTo(str, Enum):
|
||||
"""What is the given geometry relative to?""" # noqa: E501
|
||||
|
||||
"""# Local/relative to a position centered within the plane being sketched on """ # noqa: E501
|
||||
SKETCH_PLANE = "sketch_plane"
|
||||
"""# Local/relative to the trajectory curve """ # noqa: E501
|
||||
TRAJECTORY_CURVE = "trajectory_curve"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
7
kittycad/models/set_grid_auto_scale.py
Normal file
7
kittycad/models/set_grid_auto_scale.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class SetGridAutoScale(BaseModel):
|
||||
"""The response from the 'SetGridScale'."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
7
kittycad/models/set_grid_scale.py
Normal file
7
kittycad/models/set_grid_scale.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class SetGridScale(BaseModel):
|
||||
"""The response from the 'SetGridScale'."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
13
kittycad/models/solid3d_get_adjacency_info.py
Normal file
13
kittycad/models/solid3d_get_adjacency_info.py
Normal file
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.adjacency_info import AdjacencyInfo
|
||||
|
||||
|
||||
class Solid3dGetAdjacencyInfo(BaseModel):
|
||||
"""Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces) This includes the opposite and adjacent faces and edges."""
|
||||
|
||||
edges: List[AdjacencyInfo]
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
9
kittycad/models/subscribe.py
Normal file
9
kittycad/models/subscribe.py
Normal file
@ -0,0 +1,9 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class Subscribe(BaseModel):
|
||||
"""The data for subscribing a user to the newsletter."""
|
||||
|
||||
email: str
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -6,12 +6,12 @@ class SupportTier(str, Enum):
|
||||
|
||||
"""# Community support. """ # noqa: E501
|
||||
COMMUNITY = "community"
|
||||
"""# Standard support. """ # noqa: E501
|
||||
STANDARD = "standard"
|
||||
"""# Standard email support. """ # noqa: E501
|
||||
STANDARD_EMAIL = "standard_email"
|
||||
"""# Priority email support. """ # noqa: E501
|
||||
PRIORITY_EMAIL = "priority_email"
|
||||
"""# Premium support. """ # noqa: E501
|
||||
PREMIUM = "premium"
|
||||
"""# Priority support. """ # noqa: E501
|
||||
PRIORITY = "priority"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -23,12 +23,18 @@ class TextToCadMultiFileIteration(BaseModel):
|
||||
|
||||
id: Uuid
|
||||
|
||||
kcl_version: Optional[str] = None
|
||||
|
||||
model: TextToCadModel
|
||||
|
||||
model_version: str
|
||||
|
||||
outputs: Optional[Dict[str, str]] = None
|
||||
|
||||
project_name: Optional[str] = None
|
||||
|
||||
prompt: Optional[str] = None
|
||||
|
||||
source_ranges: List[SourceRangePrompt]
|
||||
|
||||
started_at: Optional[datetime.datetime] = None
|
||||
|
@ -6,12 +6,14 @@ from ..models.source_range_prompt import SourceRangePrompt
|
||||
|
||||
|
||||
class TextToCadMultiFileIterationBody(BaseModel):
|
||||
"""Body for generating models from text."""
|
||||
"""Body for iterating on models from text prompts."""
|
||||
|
||||
kcl_version: Optional[str] = None
|
||||
|
||||
project_name: Optional[str] = None
|
||||
|
||||
source_ranges: List[SourceRangePrompt]
|
||||
prompt: Optional[str] = None
|
||||
|
||||
source_ranges: Optional[List[SourceRangePrompt]] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,17 +1,20 @@
|
||||
from typing import Any
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.origin_type import OriginType
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class TransformByForPoint3d(str):
|
||||
""""""
|
||||
class TransformByForPoint3d(BaseModel):
|
||||
"""How a property of an object should be transformed."""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
||||
is_local: bool
|
||||
|
||||
@classmethod
|
||||
def __get_pydantic_core_schema__(
|
||||
cls, source_type: Any, handler: GetCoreSchemaHandler
|
||||
) -> CoreSchema:
|
||||
return core_schema.no_info_after_validator_function(cls, handler(str))
|
||||
origin: Optional[OriginType] = None
|
||||
|
||||
property: Point3d
|
||||
|
||||
set: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -1,17 +1,20 @@
|
||||
from typing import Any
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import GetCoreSchemaHandler
|
||||
from pydantic_core import CoreSchema, core_schema
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.origin_type import OriginType
|
||||
from ..models.point4d import Point4d
|
||||
|
||||
|
||||
class TransformByForPoint4d(str):
|
||||
""""""
|
||||
class TransformByForPoint4d(BaseModel):
|
||||
"""How a property of an object should be transformed."""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
||||
is_local: bool
|
||||
|
||||
@classmethod
|
||||
def __get_pydantic_core_schema__(
|
||||
cls, source_type: Any, handler: GetCoreSchemaHandler
|
||||
) -> CoreSchema:
|
||||
return core_schema.no_info_after_validator_function(cls, handler(str))
|
||||
origin: Optional[OriginType] = None
|
||||
|
||||
property: Point4d
|
||||
|
||||
set: bool
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
7
kittycad/models/twist_extrude.py
Normal file
7
kittycad/models/twist_extrude.py
Normal file
@ -0,0 +1,7 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class TwistExtrude(BaseModel):
|
||||
"""The response from the `TwistExtrude` endpoint."""
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
@ -6,10 +6,8 @@ from pydantic import BaseModel, ConfigDict
|
||||
class UpdatePaymentBalance(BaseModel):
|
||||
"""The data for updating a balance."""
|
||||
|
||||
monthly_credits_remaining: Optional[float] = None
|
||||
monthly_api_credits_remaining_monetary_value: Optional[float] = None
|
||||
|
||||
pre_pay_cash_remaining: Optional[float] = None
|
||||
|
||||
pre_pay_credits_remaining: Optional[float] = None
|
||||
stable_api_credits_remaining_monetary_value: Optional[float] = None
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
@ -16,6 +16,8 @@ class UpdateUser(BaseModel):
|
||||
|
||||
image: str
|
||||
|
||||
is_onboarded: Optional[bool] = None
|
||||
|
||||
last_name: Optional[str] = None
|
||||
|
||||
phone: str = ""
|
||||
|
@ -18,6 +18,8 @@ class User(BaseModel):
|
||||
|
||||
created_at: datetime.datetime
|
||||
|
||||
deletion_scheduled: bool = False
|
||||
|
||||
discord: Optional[str] = None
|
||||
|
||||
email: Optional[str] = None
|
||||
@ -32,6 +34,8 @@ class User(BaseModel):
|
||||
|
||||
image: str
|
||||
|
||||
is_onboarded: bool = False
|
||||
|
||||
is_service_account: bool = False
|
||||
|
||||
last_name: Optional[str] = None
|
||||
|
@ -75,6 +75,14 @@ class OptionMetricsResponse(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionDebug(BaseModel):
|
||||
"""Return information about the connected instance"""
|
||||
|
||||
type: Literal["debug"] = "debug"
|
||||
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class OptionHeaders(BaseModel):
|
||||
"""Authentication header request."""
|
||||
|
||||
@ -94,6 +102,7 @@ WebSocketRequest = RootModel[
|
||||
OptionModelingCmdBatchReq,
|
||||
OptionPing,
|
||||
OptionMetricsResponse,
|
||||
OptionDebug,
|
||||
OptionHeaders,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
|
@ -2,6 +2,7 @@ from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from ..models.api_endpoint import ApiEndpoint
|
||||
from ..models.modeling_app_share_links import ModelingAppShareLinks
|
||||
from ..models.modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
|
||||
from ..models.subscription_tier_feature import SubscriptionTierFeature
|
||||
@ -21,11 +22,17 @@ class ZooProductSubscription(BaseModel):
|
||||
|
||||
description: str
|
||||
|
||||
endpoints_included: Optional[List[ApiEndpoint]] = None
|
||||
|
||||
features: Optional[List[SubscriptionTierFeature]] = None
|
||||
|
||||
monthly_pay_as_you_go_api_credits: int = 0
|
||||
|
||||
monthly_pay_as_you_go_api_credits_monetary_value: float
|
||||
|
||||
name: ModelingAppSubscriptionTierName
|
||||
|
||||
pay_as_you_go_credits: float
|
||||
pay_as_you_go_api_credit_price: float = 0.0
|
||||
|
||||
price: SubscriptionTierPrice
|
||||
|
||||
|
@ -6,10 +6,10 @@ class ZooTool(str, Enum):
|
||||
|
||||
"""# The modeling app. """ # noqa: E501
|
||||
MODELING_APP = "modeling_app"
|
||||
"""# The Text-to-CAD UI. """ # noqa: E501
|
||||
TEXT_TO_CAD = "text_to_cad"
|
||||
"""# The Diff Chrome Extension. """ # noqa: E501
|
||||
DIFF_CHROME_EXTENSION = "diff_chrome_extension"
|
||||
"""# The Text-to-CAD UI. """ # noqa: E501
|
||||
TEXT_TO_CAD = "text_to_cad"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user