Compare commits

..

15 Commits

Author SHA1 Message Date
62e481fb1e update version
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-01-16 15:17:14 -08:00
ff4bff38dd Bump pydantic from 2.5.2 to 2.5.3 (#187)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.5.2 to 2.5.3.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.5.2...v2.5.3)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 15:06:09 -08:00
f417993c85 Bump fonttools from 4.41.1 to 4.43.0 (#188)
Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.41.1 to 4.43.0.
- [Release notes](https://github.com/fonttools/fonttools/releases)
- [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst)
- [Commits](https://github.com/fonttools/fonttools/compare/4.41.1...4.43.0)

---
updated-dependencies:
- dependency-name: fonttools
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 15:06:00 -08:00
8bebb40c9f Update api spec (#186)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-16 15:04:35 -08:00
ec68e67645 Update README.md 2024-01-06 20:16:15 -08:00
95894ba00f Update README.md 2024-01-06 19:20:18 -08:00
ad19153225 updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-01-06 18:45:20 -08:00
8d476bbec6 pydantic cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-01-06 18:32:34 -08:00
b233f94a24 Update README.md 2024-01-06 17:58:11 -08:00
6351fb1bbc updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-01-06 15:23:57 -08:00
0e11945f1d Bump black from 23.7.0 to 23.12.1 (#184)
Bumps [black](https://github.com/psf/black) from 23.7.0 to 23.12.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.7.0...23.12.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-06 15:18:36 -08:00
d3d454a2d7 bump
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-01-06 15:12:51 -08:00
b150024bff Bump actions/setup-python from 4 to 5 (#176)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-06 15:08:53 -08:00
0ad6216cde Update api spec (#182)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-06 14:56:45 -08:00
8925458665 better timeout
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2023-12-21 09:28:32 -08:00
202 changed files with 7866 additions and 1340 deletions

View File

@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
# Installation instructions are from: https://python-poetry.org/docs/
- name: Install dependencies

View File

@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

View File

@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x

View File

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
# Installation instructions are from: https://python-poetry.org/docs/

View File

@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
# Installation instructions are from: https://python-poetry.org/docs/
- name: Install dependencies

View File

@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
# Installation instructions are from: https://python-poetry.org/docs/
- name: Install dependencies

View File

@ -15,6 +15,13 @@ jobs:
name: update-spec
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ secrets.GH_ORG_APP_ID }}
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v4
- name: make generate
shell: bash
@ -38,7 +45,7 @@ jobs:
with:
repository: 'kittycad/website'
path: 'docs'
token: ${{secrets.PAT_GITHUB}}
token: ${{ steps.app-token.outputs.token }}
- name: move spec to docs
shell: bash
run: |
@ -62,6 +69,6 @@ jobs:
--head "$NEW_BRANCH" \
--base main || true
env:
GITHUB_TOKEN: ${{secrets.PAT_GITHUB}}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

View File

@ -1,18 +1,16 @@
![image](https://user-images.githubusercontent.com/19377312/165883233-3bdbc9fb-ddf9-4173-8cf2-d1b70ab7127d.png)
# kittycad.py
The Python API client for KittyCAD.
- [PyPI](https://pypi.org/project/kittycad/)
- [Python docs](https://python.api.docs.kittycad.io/)
- [KittyCAD API Docs](https://docs.kittycad.io/?lang=python)
- [Python docs](https://python.api.docs.zoo.dev/)
- [KittyCAD API Docs](https://zoo.dev/docs/api?lang=python)
## Generating
You can trigger a build with the GitHub action to generate the client. This will
automatically update the client to the latest version based on the spec hosted
at [api.kittycad.io](https://api.kittycad.io/).
at [api.zoo.dev](https://api.zoo.dev/).
Alternatively, if you wish to generate the client locally, make sure you have
[Docker installed](https://docs.docker.com/get-docker/) and run:

View File

@ -2,7 +2,7 @@ import datetime
from typing import List, Optional, Dict, Union, Any, Literal
from uuid import UUID
from pydantic import BaseModel, Base64Bytes, AnyUrl
from pydantic import BaseModel, Base64Bytes, AnyUrl, ConfigDict
from pydantic_extra_types.phone_numbers import PhoneNumber
from .base64data import Base64Data
@ -19,3 +19,7 @@ class {{ name }}(BaseModel):
{{ field.name }}: {{ field.type }}
{% endif %}
{% endfor %}
model_config = ConfigDict(
protected_namespaces=()
)

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501
""" Contains methods for accessing the ai API paths: AI uses machine learning to generate CAD models. """ # noqa: E501

View File

@ -15,6 +15,7 @@ def _get_kwargs(
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
no_models: Optional[bool] = None,
) -> Dict[str, Any]:
url = "{}/user/text-to-cad".format(
client.base_url,
@ -38,6 +39,12 @@ def _get_kwargs(
else:
url = url + "?sort_by=" + str(sort_by)
if no_models is not None:
if "?" in url:
url = url + "&no_models=" + str(no_models)
else:
url = url + "?no_models=" + str(no_models)
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -81,11 +88,13 @@ def sync_detailed(
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
no_models: Optional[bool] = None,
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
no_models=no_models,
client=client,
)
@ -103,6 +112,7 @@ def sync(
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
no_models: Optional[bool] = None,
) -> Optional[Union[TextToCadResultsPage, Error]]:
"""This will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
@ -113,6 +123,7 @@ def sync(
limit=limit,
page_token=page_token,
sort_by=sort_by,
no_models=no_models,
client=client,
).parsed
@ -123,11 +134,13 @@ async def asyncio_detailed(
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
no_models: Optional[bool] = None,
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
no_models=no_models,
client=client,
)
@ -143,6 +156,7 @@ async def asyncio(
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
no_models: Optional[bool] = None,
) -> Optional[Union[TextToCadResultsPage, Error]]:
"""This will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.
@ -154,6 +168,7 @@ async def asyncio(
limit=limit,
page_token=page_token,
sort_by=sort_by,
no_models=no_models,
client=client,
)
).parsed

View File

@ -0,0 +1,117 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.api_call_with_price import ApiCallWithPrice
from ...models.error import Error
from ...types import Response
def _get_kwargs(
id: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/api-calls/{id}".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(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[ApiCallWithPrice, Error]]:
if response.status_code == 200:
response_200 = ApiCallWithPrice(**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[ApiCallWithPrice, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
id: str,
*,
client: Client,
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: str,
*,
client: Client,
) -> Optional[Union[ApiCallWithPrice, Error]]:
"""This endpoint requires authentication by an org admin. It returns details of the requested API call for the user's org.""" # noqa: E501
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: str,
*,
client: Client,
) -> Response[Optional[Union[ApiCallWithPrice, Error]]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
id: str,
*,
client: Client,
) -> Optional[Union[ApiCallWithPrice, Error]]:
"""This endpoint requires authentication by an org admin. It returns details of the requested API call for the user's org.""" # noqa: E501
return (
await asyncio_detailed(
id=id,
client=client,
)
).parsed

View File

@ -0,0 +1,159 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.api_call_with_price_results_page import ApiCallWithPriceResultsPage
from ...models.created_at_sort_mode import CreatedAtSortMode
from ...models.error import Error
from ...types import Response
def _get_kwargs(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Dict[str, Any]:
url = "{}/org/api-calls".format(
client.base_url,
) # noqa: E501
if limit is not None:
if "?" in url:
url = url + "&limit=" + str(limit)
else:
url = url + "?limit=" + str(limit)
if page_token is not None:
if "?" in url:
url = url + "&page_token=" + str(page_token)
else:
url = url + "?page_token=" + str(page_token)
if sort_by is not None:
if "?" in url:
url = url + "&sort_by=" + str(sort_by)
else:
url = url + "?sort_by=" + str(sort_by)
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[ApiCallWithPriceResultsPage, Error]]:
if response.status_code == 200:
response_200 = ApiCallWithPriceResultsPage(**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[ApiCallWithPriceResultsPage, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This includes all API calls that were made by users in the org.
This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
return sync_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
).parsed
async def asyncio_detailed(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
sort_by: CreatedAtSortMode,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This includes all API calls that were made by users in the org.
This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
return (
await asyncio_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
).parsed

View File

@ -11,11 +11,18 @@ from ...types import Response
def _get_kwargs(
*,
client: Client,
label: Optional[str] = None,
) -> Dict[str, Any]:
url = "{}/user/api-tokens".format(
client.base_url,
) # noqa: E501
if label is not None:
if "?" in url:
url = url + "&label=" + str(label)
else:
url = url + "?label=" + str(label)
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -54,8 +61,10 @@ def _build_response(
def sync_detailed(
*,
client: Client,
label: Optional[str] = None,
) -> Response[Optional[Union[ApiToken, Error]]]:
kwargs = _get_kwargs(
label=label,
client=client,
)
@ -70,10 +79,12 @@ def sync_detailed(
def sync(
*,
client: Client,
label: Optional[str] = None,
) -> Optional[Union[ApiToken, Error]]:
"""This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.""" # noqa: E501
return sync_detailed(
label=label,
client=client,
).parsed
@ -81,8 +92,10 @@ def sync(
async def asyncio_detailed(
*,
client: Client,
label: Optional[str] = None,
) -> Response[Optional[Union[ApiToken, Error]]]:
kwargs = _get_kwargs(
label=label,
client=client,
)
@ -95,11 +108,13 @@ async def asyncio_detailed(
async def asyncio(
*,
client: Client,
label: Optional[str] = None,
) -> Optional[Union[ApiToken, Error]]:
"""This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.""" # noqa: E501
return (
await asyncio_detailed(
label=label,
client=client,
)
).parsed

View File

@ -1 +1 @@
""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501
""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the Zoo engine. """ # noqa: E501

View File

@ -0,0 +1 @@
""" Contains methods for accessing the orgs API paths: An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs. """ # noqa: E501

View File

@ -0,0 +1,116 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.org import Org
from ...models.org_details import OrgDetails
from ...types import Response
def _get_kwargs(
body: OrgDetails,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org".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[Org, Error]]:
if response.status_code == 201:
response_201 = Org(**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[Org, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: OrgDetails,
*,
client: Client,
) -> Response[Optional[Union[Org, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: OrgDetails,
*,
client: Client,
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: OrgDetails,
*,
client: Client,
) -> Response[Optional[Union[Org, 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: OrgDetails,
*,
client: Client,
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,116 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.add_org_member import AddOrgMember
from ...models.error import Error
from ...models.org_member import OrgMember
from ...types import Response
def _get_kwargs(
body: AddOrgMember,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/members".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[OrgMember, Error]]:
if response.status_code == 201:
response_201 = OrgMember(**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[OrgMember, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: AddOrgMember,
*,
client: Client,
) -> Response[Optional[Union[OrgMember, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: AddOrgMember,
*,
client: Client,
) -> Optional[Union[OrgMember, Error]]:
"""This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: AddOrgMember,
*,
client: Client,
) -> Response[Optional[Union[OrgMember, 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: AddOrgMember,
*,
client: Client,
) -> Optional[Union[OrgMember, Error]]:
"""This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,106 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[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(
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.delete(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Error]:
"""In order to delete an org, you must first delete all of its members, except yourself.
You must also have no outstanding invoices or unpaid balances.
This endpoint requires authentication by an org admin. It deletes the authenticated user's org.
""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.delete(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Error]:
"""In order to delete an org, you must first delete all of its members, except yourself.
You must also have no outstanding invoices or unpaid balances.
This endpoint requires authentication by an org admin. It deletes the authenticated user's org.
""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,111 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.error import Error
from ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
user_id: Uuid,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/members/{user_id}".format(
client.base_url,
user_id=user_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(),
}
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(
user_id: Uuid,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
user_id=user_id,
client=client,
)
response = httpx.delete(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
user_id: Uuid,
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It removes the specified member from the authenticated user's org.""" # noqa: E501
return sync_detailed(
user_id=user_id,
client=client,
).parsed
async def asyncio_detailed(
user_id: Uuid,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
user_id=user_id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.delete(**kwargs)
return _build_response(response=response)
async def asyncio(
user_id: Uuid,
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It removes the specified member from the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
user_id=user_id,
client=client,
)
).parsed

View File

@ -3,8 +3,8 @@ from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.ai_plugin_manifest import AiPluginManifest
from ...models.error import Error
from ...models.org import Org
from ...types import Response
@ -12,7 +12,7 @@ def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/.well-known/ai-plugin.json".format(
url = "{}/org".format(
client.base_url,
) # noqa: E501
@ -27,11 +27,9 @@ def _get_kwargs(
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[AiPluginManifest, Error]]:
def _parse_response(*, response: httpx.Response) -> Optional[Union[Org, Error]]:
if response.status_code == 200:
response_200 = AiPluginManifest(**response.json())
response_200 = Org(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
@ -44,7 +42,7 @@ def _parse_response(
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
) -> Response[Optional[Union[Org, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -56,7 +54,7 @@ def _build_response(
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
) -> Response[Optional[Union[Org, Error]]]:
kwargs = _get_kwargs(
client=client,
)
@ -72,7 +70,9 @@ def sync_detailed(
def sync(
*,
client: Client,
) -> Optional[Union[AiPluginManifest, Error]]:
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by an org admin. It gets the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
@ -81,7 +81,7 @@ def sync(
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[AiPluginManifest, Error]]]:
) -> Response[Optional[Union[Org, Error]]]:
kwargs = _get_kwargs(
client=client,
)
@ -95,7 +95,9 @@ async def asyncio_detailed(
async def asyncio(
*,
client: Client,
) -> Optional[Union[AiPluginManifest, Error]]:
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by an org admin. It gets the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
client=client,

View File

@ -0,0 +1,116 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.org_member import OrgMember
from ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
user_id: Uuid,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/members/{user_id}".format(
client.base_url,
user_id=user_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(),
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[OrgMember, Error]]:
if response.status_code == 200:
response_200 = OrgMember(**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[OrgMember, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
user_id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[OrgMember, Error]]]:
kwargs = _get_kwargs(
user_id=user_id,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
user_id: Uuid,
*,
client: Client,
) -> Optional[Union[OrgMember, Error]]:
"""This endpoint requires authentication by an org admin. It gets the specified member of the authenticated user's org.""" # noqa: E501
return sync_detailed(
user_id=user_id,
client=client,
).parsed
async def asyncio_detailed(
user_id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[OrgMember, Error]]]:
kwargs = _get_kwargs(
user_id=user_id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
user_id: Uuid,
*,
client: Client,
) -> Optional[Union[OrgMember, Error]]:
"""This endpoint requires authentication by an org admin. It gets the specified member of the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
user_id=user_id,
client=client,
)
).parsed

View File

@ -0,0 +1,107 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.user_org_info import UserOrgInfo
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/user/org".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[UserOrgInfo, Error]]:
if response.status_code == 200:
response_200 = UserOrgInfo(**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[UserOrgInfo, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[UserOrgInfo, Error]]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[UserOrgInfo, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.
If the user is not a member of an org, this endpoint will return a 404.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[UserOrgInfo, Error]]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[UserOrgInfo, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.
If the user is not a member of an org, this endpoint will return a 404.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,169 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.created_at_sort_mode import CreatedAtSortMode
from ...models.error import Error
from ...models.org_member_results_page import OrgMemberResultsPage
from ...models.org_role import OrgRole
from ...types import Response
def _get_kwargs(
sort_by: CreatedAtSortMode,
role: OrgRole,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Dict[str, Any]:
url = "{}/org/members".format(
client.base_url,
) # noqa: E501
if limit is not None:
if "?" in url:
url = url + "&limit=" + str(limit)
else:
url = url + "?limit=" + str(limit)
if page_token is not None:
if "?" in url:
url = url + "&page_token=" + str(page_token)
else:
url = url + "?page_token=" + str(page_token)
if sort_by is not None:
if "?" in url:
url = url + "&sort_by=" + str(sort_by)
else:
url = url + "?sort_by=" + str(sort_by)
if role is not None:
if "?" in url:
url = url + "&role=" + str(role)
else:
url = url + "?role=" + str(role)
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[OrgMemberResultsPage, Error]]:
if response.status_code == 200:
response_200 = OrgMemberResultsPage(**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[OrgMemberResultsPage, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
sort_by: CreatedAtSortMode,
role: OrgRole,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Response[Optional[Union[OrgMemberResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
role=role,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
sort_by: CreatedAtSortMode,
role: OrgRole,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[OrgMemberResultsPage, Error]]:
"""This endpoint requires authentication by an org admin. It lists the members of the authenticated user's org.""" # noqa: E501
return sync_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
role=role,
client=client,
).parsed
async def asyncio_detailed(
sort_by: CreatedAtSortMode,
role: OrgRole,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Response[Optional[Union[OrgMemberResultsPage, Error]]]:
kwargs = _get_kwargs(
limit=limit,
page_token=page_token,
sort_by=sort_by,
role=role,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
sort_by: CreatedAtSortMode,
role: OrgRole,
*,
client: Client,
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[OrgMemberResultsPage, Error]]:
"""This endpoint requires authentication by an org admin. It lists the members of the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
role=role,
client=client,
)
).parsed

View File

@ -0,0 +1,116 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.org import Org
from ...models.org_details import OrgDetails
from ...types import Response
def _get_kwargs(
body: OrgDetails,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org".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[Org, Error]]:
if response.status_code == 200:
response_200 = Org(**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[Org, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: OrgDetails,
*,
client: Client,
) -> Response[Optional[Union[Org, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: OrgDetails,
*,
client: Client,
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by an org admin. It updates the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: OrgDetails,
*,
client: Client,
) -> Response[Optional[Union[Org, 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: OrgDetails,
*,
client: Client,
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by an org admin. It updates the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,127 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.org_member import OrgMember
from ...models.update_member_to_org_body import UpdateMemberToOrgBody
from ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
user_id: Uuid,
body: UpdateMemberToOrgBody,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/members/{user_id}".format(
client.base_url,
user_id=user_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[OrgMember, Error]]:
if response.status_code == 200:
response_200 = OrgMember(**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[OrgMember, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
user_id: Uuid,
body: UpdateMemberToOrgBody,
*,
client: Client,
) -> Response[Optional[Union[OrgMember, Error]]]:
kwargs = _get_kwargs(
user_id=user_id,
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
user_id: Uuid,
body: UpdateMemberToOrgBody,
*,
client: Client,
) -> Optional[Union[OrgMember, Error]]:
"""This endpoint requires authentication by an org admin. It updates the specified member of the authenticated user's org.""" # noqa: E501
return sync_detailed(
user_id=user_id,
body=body,
client=client,
).parsed
async def asyncio_detailed(
user_id: Uuid,
body: UpdateMemberToOrgBody,
*,
client: Client,
) -> Response[Optional[Union[OrgMember, Error]]]:
kwargs = _get_kwargs(
user_id=user_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(
user_id: Uuid,
body: UpdateMemberToOrgBody,
*,
client: Client,
) -> Optional[Union[OrgMember, Error]]:
"""This endpoint requires authentication by an org admin. It updates the specified member of the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
user_id=user_id,
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,120 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.billing_info import BillingInfo
from ...models.customer import Customer
from ...models.error import Error
from ...types import Response
def _get_kwargs(
body: BillingInfo,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment".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[Customer, Error]]:
if response.status_code == 201:
response_201 = Customer(**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[Customer, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: BillingInfo,
*,
client: Client,
) -> Response[Optional[Union[Customer, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: BillingInfo,
*,
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.
""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: BillingInfo,
*,
client: Client,
) -> Response[Optional[Union[Customer, 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: BillingInfo,
*,
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.
""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,107 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.payment_intent import PaymentIntent
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/intent".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[PaymentIntent, Error]]:
if response.status_code == 201:
response_201 = PaymentIntent(**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[PaymentIntent, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[PaymentIntent, Error]]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[PaymentIntent, Error]]:
"""This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[PaymentIntent, Error]]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.post(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[PaymentIntent, Error]]:
"""This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,104 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[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(
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.delete(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.
""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.delete(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.
""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,110 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
id: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/methods/{id}".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(),
}
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(
id: str,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.delete(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: str,
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It deletes the specified payment method for the authenticated user's org.""" # noqa: E501
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: str,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.delete(**kwargs)
return _build_response(response=response)
async def asyncio(
id: str,
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It deletes the specified payment method for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
id=id,
client=client,
)
).parsed

View File

@ -0,0 +1,107 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.customer_balance import CustomerBalance
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/balance".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[CustomerBalance, Error]]:
if response.status_code == 200:
response_200 = CustomerBalance(**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[CustomerBalance, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
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(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
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 (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -3,6 +3,7 @@ from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.customer import Customer
from ...models.error import Error
from ...types import Response
@ -11,7 +12,7 @@ def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/openai/openapi.json".format(
url = "{}/org/payment".format(
client.base_url,
) # noqa: E501
@ -26,9 +27,9 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]:
def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]:
if response.status_code == 200:
response_200 = response.json()
response_200 = Customer(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
@ -41,7 +42,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[dict, Error]]]:
) -> Response[Optional[Union[Customer, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -53,7 +54,7 @@ def _build_response(
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[dict, Error]]]:
) -> Response[Optional[Union[Customer, Error]]]:
kwargs = _get_kwargs(
client=client,
)
@ -69,8 +70,10 @@ def sync_detailed(
def sync(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
"""This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.
""" # noqa: E501
return sync_detailed(
client=client,
@ -80,7 +83,7 @@ def sync(
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[dict, Error]]]:
) -> Response[Optional[Union[Customer, Error]]]:
kwargs = _get_kwargs(
client=client,
)
@ -94,8 +97,10 @@ async def asyncio_detailed(
async def asyncio(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
"""This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -0,0 +1,107 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.invoice import Invoice
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/invoices".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[List[Invoice], Error]]:
if response.status_code == 200:
response_200 = [Invoice(**item) for item in 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[List[Invoice], Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[Invoice], Error]]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[List[Invoice], Error]]:
"""This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[Invoice], Error]]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[List[Invoice], Error]]:
"""This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,107 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.payment_method import PaymentMethod
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/methods".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[List[PaymentMethod], Error]]:
if response.status_code == 200:
response_200 = [PaymentMethod(**item) for item in 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[List[PaymentMethod], Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[List[PaymentMethod], Error]]:
"""This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[PaymentMethod], Error]]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[List[PaymentMethod], Error]]:
"""This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,120 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.billing_info import BillingInfo
from ...models.customer import Customer
from ...models.error import Error
from ...types import Response
def _get_kwargs(
body: BillingInfo,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment".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[Customer, Error]]:
if response.status_code == 200:
response_200 = Customer(**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[Customer, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: BillingInfo,
*,
client: Client,
) -> Response[Optional[Union[Customer, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: BillingInfo,
*,
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.
""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: BillingInfo,
*,
client: Client,
) -> Response[Optional[Union[Customer, 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: BillingInfo,
*,
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.
""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,100 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/tax".format(
client.base_url,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(*, response: httpx.Response) -> Optional[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(
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It will return an error if the org's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It will return an error if the org's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -66,7 +66,7 @@ def sync(
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any Zoo user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
"""This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
return sync_detailed(
client=client,
@ -91,7 +91,7 @@ async def asyncio(
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any Zoo user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
"""This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -1 +1 @@
""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501
""" Contains methods for accessing the users API paths: A user is someone who uses the Zoo API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501

View File

@ -13,7 +13,7 @@ class Client:
base_url: str = attr.ib(default="https://api.kittycad.io")
cookies: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
headers: Dict[str, str] = attr.ib(factory=dict, kw_only=True)
timeout: float = attr.ib(50.0, kw_only=True)
timeout: float = attr.ib(120.0, kw_only=True)
verify_ssl: Union[str, bool, ssl.SSLContext] = attr.ib(True, kw_only=True)
def get_headers(self) -> Dict[str, str]:

View File

@ -8,7 +8,12 @@ import pytest
from .api.ai import create_text_to_cad, get_text_to_cad_model_for_user
from .api.api_tokens import list_api_tokens_for_user
from .api.file import create_file_conversion, create_file_mass, create_file_volume
from .api.file import (
create_file_center_of_mass,
create_file_conversion,
create_file_mass,
create_file_volume,
)
from .api.meta import ping
from .api.modeling import modeling_commands_ws
from .api.users import get_user_self, list_users_extended
@ -22,6 +27,7 @@ from .models import (
Direction,
Error,
ExtendedUserResultsPage,
FileCenterOfMass,
FileConversion,
FileExportFormat,
FileImportFormat,
@ -298,6 +304,37 @@ def test_file_volume():
assert fv.status == ApiCallStatus.COMPLETED
def test_file_center_of_mass():
# Create our client.
client = ClientFromEnv()
dir_path = os.path.dirname(os.path.realpath(__file__))
file = open(os.path.join(dir_path, "../assets/testing.obj"), "rb")
content = file.read()
file.close()
# Get the fc.
result: Union[FileCenterOfMass, Error, None] = create_file_center_of_mass.sync(
client=client,
body=content,
src_format=FileImportFormat.OBJ,
output_unit=UnitLength.CM,
)
assert isinstance(result, FileCenterOfMass)
fv: FileCenterOfMass = result
print(f"FileCenterOfMass: {fv}")
assert fv.id is not None
assert fv.center_of_mass is not None
assert fv.model_dump_json() is not None
assert fv.status == ApiCallStatus.COMPLETED
def test_list_users():
# Create our client.
client = ClientFromEnv()
@ -501,7 +538,7 @@ def test_text_to_cad():
result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(
client=client,
output_format=FileExportFormat.FBX,
output_format=FileExportFormat.STEP,
body=TextToCadCreateBody(
prompt="a 2x4 lego",
),

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,9 @@
""" Contains all the data models used in inputs/outputs """
from .account_provider import AccountProvider
from .add_org_member import AddOrgMember
from .address_details import AddressDetails
from .ai_feedback import AiFeedback
from .ai_plugin_api import AiPluginApi
from .ai_plugin_api_type import AiPluginApiType
from .ai_plugin_auth import AiPluginAuth
from .ai_plugin_auth_type import AiPluginAuthType
from .ai_plugin_http_auth_type import AiPluginHttpAuthType
from .ai_plugin_manifest import AiPluginManifest
from .ai_prompt import AiPrompt
from .ai_prompt_results_page import AiPromptResultsPage
from .ai_prompt_type import AiPromptType
@ -35,6 +31,7 @@ from .async_api_call_type import AsyncApiCallType
from .axis import Axis
from .axis_direction_pair import AxisDirectionPair
from .billing_info import BillingInfo
from .block_reason import BlockReason
from .cache_metadata import CacheMetadata
from .camera_drag_interaction_type import CameraDragInteractionType
from .card_details import CardDetails
@ -117,12 +114,16 @@ from .modeling_cmd import ModelingCmd
from .modeling_cmd_id import ModelingCmdId
from .modeling_cmd_req import ModelingCmdReq
from .mouse_click import MouseClick
from .new_address import NewAddress
from .o_auth2_client_info import OAuth2ClientInfo
from .o_auth2_grant_type import OAuth2GrantType
from .ok_modeling_cmd_response import OkModelingCmdResponse
from .ok_web_socket_response_data import OkWebSocketResponseData
from .onboarding import Onboarding
from .org import Org
from .org_details import OrgDetails
from .org_member import OrgMember
from .org_member_results_page import OrgMemberResultsPage
from .org_role import OrgRole
from .output_file import OutputFile
from .output_format import OutputFormat
from .path_command import PathCommand
@ -137,6 +138,7 @@ from .payment_intent import PaymentIntent
from .payment_method import PaymentMethod
from .payment_method_card_checks import PaymentMethodCardChecks
from .payment_method_type import PaymentMethodType
from .perspective_camera_parameters import PerspectiveCameraParameters
from .plane_intersect_and_project import PlaneIntersectAndProject
from .ply_storage import PlyStorage
from .point2d import Point2d
@ -192,8 +194,10 @@ from .unit_torque import UnitTorque
from .unit_torque_conversion import UnitTorqueConversion
from .unit_volume import UnitVolume
from .unit_volume_conversion import UnitVolumeConversion
from .update_member_to_org_body import UpdateMemberToOrgBody
from .update_user import UpdateUser
from .user import User
from .user_org_info import UserOrgInfo
from .user_results_page import UserResultsPage
from .uuid import Uuid
from .verification_token import VerificationToken

View File

@ -0,0 +1,14 @@
from pydantic import BaseModel, ConfigDict
from ..models.org_role import OrgRole
class AddOrgMember(BaseModel):
"""Data for adding a member to an org."""
email: str
role: OrgRole
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,23 @@
from typing import Optional
from pydantic import BaseModel, ConfigDict
from ..models.country_code import CountryCode
class AddressDetails(BaseModel):
"""Address details."""
city: Optional[str] = None
country: CountryCode
state: Optional[str] = None
street1: Optional[str] = None
street2: Optional[str] = None
zip: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,15 +0,0 @@
from typing import Optional
from pydantic import BaseModel
from ..models.ai_plugin_api_type import AiPluginApiType
class AiPluginApi(BaseModel):
"""AI plugin api information."""
is_user_authenticated: Optional[bool] = None
type: Optional[AiPluginApiType] = None
url: str

View File

@ -1,11 +0,0 @@
from enum import Enum
class AiPluginApiType(str, Enum):
"""AI plugin api type.""" # noqa: E501
"""# An OpenAPI specification. """ # noqa: E501
OPENAPI = "openapi"
def __str__(self) -> str:
return str(self.value)

View File

@ -1,14 +0,0 @@
from typing import Optional
from pydantic import BaseModel
from ..models.ai_plugin_auth_type import AiPluginAuthType
from ..models.ai_plugin_http_auth_type import AiPluginHttpAuthType
class AiPluginAuth(BaseModel):
"""AI plugin auth information."""
authorization_type: Optional[AiPluginHttpAuthType] = None
type: Optional[AiPluginAuthType] = None

View File

@ -1,17 +0,0 @@
from enum import Enum
class AiPluginAuthType(str, Enum):
"""AI plugin auth type.""" # noqa: E501
"""# None. """ # noqa: E501
NONE = "none"
"""# User http. """ # noqa: E501
USER_HTTP = "user_http"
"""# Service http. """ # noqa: E501
SERVICE_HTTP = "service_http"
"""# OAuth. """ # noqa: E501
OAUTH = "oauth"
def __str__(self) -> str:
return str(self.value)

View File

@ -1,13 +0,0 @@
from enum import Enum
class AiPluginHttpAuthType(str, Enum):
"""AI plugin http auth type.""" # noqa: E501
"""# Basic. """ # noqa: E501
BASIC = "basic"
"""# Bearer. """ # noqa: E501
BEARER = "bearer"
def __str__(self) -> str:
return str(self.value)

View File

@ -1,33 +0,0 @@
from typing import Optional
from pydantic import BaseModel
from ..models.ai_plugin_api import AiPluginApi
from ..models.ai_plugin_auth import AiPluginAuth
class AiPluginManifest(BaseModel):
"""AI plugin manifest.
This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).
"""
api: AiPluginApi
auth: AiPluginAuth
contact_email: Optional[str] = None
description_for_human: Optional[str] = None
description_for_model: Optional[str] = None
legal_info_url: str
logo_url: str
name_for_human: Optional[str] = None
name_for_model: Optional[str] = None
schema_version: Optional[str] = None

View File

@ -1,7 +1,7 @@
import datetime
from typing import Any, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.ai_feedback import AiFeedback
from ..models.ai_prompt_type import AiPromptType
@ -39,3 +39,5 @@ class AiPrompt(BaseModel):
updated_at: datetime.datetime
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.ai_prompt import AiPrompt
@ -11,3 +11,5 @@ class AiPromptResultsPage(BaseModel):
items: List[AiPrompt]
next_page: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.unit_angle import UnitAngle
@ -10,3 +10,5 @@ class Angle(BaseModel):
unit: UnitAngle
value: float
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.annotation_line_end import AnnotationLineEnd
@ -10,3 +10,5 @@ class AnnotationLineEndOptions(BaseModel):
end: AnnotationLineEnd
start: AnnotationLineEnd
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.annotation_line_end_options import AnnotationLineEndOptions
from ..models.annotation_text_options import AnnotationTextOptions
@ -20,3 +20,5 @@ class AnnotationOptions(BaseModel):
position: Optional[Point3d] = None
text: Optional[AnnotationTextOptions] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.annotation_text_alignment_x import AnnotationTextAlignmentX
from ..models.annotation_text_alignment_y import AnnotationTextAlignmentY
@ -15,3 +15,5 @@ class AnnotationTextOptions(BaseModel):
x: AnnotationTextAlignmentX
y: AnnotationTextAlignmentY
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -9,3 +9,5 @@ class ApiCallQueryGroup(BaseModel):
count: int
query: str
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,7 +1,7 @@
import datetime
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.method import Method
from ..models.uuid import Uuid
@ -32,6 +32,8 @@ class ApiCallWithPrice(BaseModel):
minutes: Optional[int] = None
org_id: Optional[Uuid] = None
origin: Optional[str] = None
price: Optional[float] = None
@ -55,3 +57,5 @@ class ApiCallWithPrice(BaseModel):
user_agent: str
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.api_call_with_price import ApiCallWithPrice
@ -11,3 +11,5 @@ class ApiCallWithPriceResultsPage(BaseModel):
items: List[ApiCallWithPrice]
next_page: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.error_code import ErrorCode
@ -10,3 +10,5 @@ class ApiError(BaseModel):
error_code: ErrorCode
message: str
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,7 @@
import datetime
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.uuid import Uuid
@ -16,8 +17,12 @@ class ApiToken(BaseModel):
is_valid: bool
label: Optional[str] = None
token: Uuid
updated_at: datetime.datetime
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.api_token import ApiToken
@ -11,3 +11,5 @@ class ApiTokenResultsPage(BaseModel):
items: List[ApiToken]
next_page: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -8,3 +8,5 @@ class AppClientInfo(BaseModel):
"""Information about a third party app client."""
url: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,7 +1,7 @@
import datetime
from typing import Any, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.api_call_status import ApiCallStatus
from ..models.async_api_call_type import AsyncApiCallType
@ -34,3 +34,5 @@ class AsyncApiCall(BaseModel):
user_id: Uuid
worker: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,7 +1,7 @@
import datetime
from typing import Dict, Literal, Optional, Union
from pydantic import BaseModel, Field, RootModel
from pydantic import BaseModel, ConfigDict, Field, RootModel
from typing_extensions import Annotated
from ..models.ai_feedback import AiFeedback
@ -51,6 +51,8 @@ class file_conversion(BaseModel):
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())
class file_center_of_mass(BaseModel):
"""File center of mass."""
@ -79,6 +81,8 @@ class file_center_of_mass(BaseModel):
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())
class file_mass(BaseModel):
"""A file mass."""
@ -111,6 +115,8 @@ class file_mass(BaseModel):
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())
class file_volume(BaseModel):
"""A file volume."""
@ -139,6 +145,8 @@ class file_volume(BaseModel):
volume: Optional[float] = None
model_config = ConfigDict(protected_namespaces=())
class file_density(BaseModel):
"""A file density."""
@ -171,6 +179,8 @@ class file_density(BaseModel):
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())
class file_surface_area(BaseModel):
"""A file surface area."""
@ -199,6 +209,8 @@ class file_surface_area(BaseModel):
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())
class text_to_cad(BaseModel):
"""Text to CAD."""
@ -231,6 +243,8 @@ class text_to_cad(BaseModel):
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())
AsyncApiCallOutput = RootModel[
Annotated[

View File

@ -1,6 +1,6 @@
from typing import List, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.async_api_call import AsyncApiCall
@ -11,3 +11,5 @@ class AsyncApiCallResultsPage(BaseModel):
items: List[AsyncApiCall]
next_page: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.axis import Axis
from ..models.direction import Direction
@ -11,3 +11,5 @@ class AxisDirectionPair(BaseModel):
axis: Axis
direction: Direction
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,15 +1,17 @@
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.new_address import NewAddress
from ..models.address_details import AddressDetails
class BillingInfo(BaseModel):
"""The billing information for payments."""
address: Optional[NewAddress] = None
address: Optional[AddressDetails] = None
name: Optional[str] = None
phone: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,13 @@
from enum import Enum
class BlockReason(str, Enum):
"""The reason for blocking a user.""" # noqa: E501
"""# The user is missing a payment method and has exceeded their free API call credits for the month. """ # noqa: E501
MISSING_PAYMENT_METHOD = "missing_payment_method"
"""# The users payment method has failed. """ # noqa: E501
PAYMENT_METHOD_FAILED = "payment_method_failed"
def __str__(self) -> str:
return str(self.value)

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -9,3 +9,5 @@ class CacheMetadata(BaseModel):
This is mostly used for internal purposes and debugging."""
ok: bool
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.payment_method_card_checks import PaymentMethodCardChecks
@ -23,3 +23,5 @@ class CardDetails(BaseModel):
funding: Optional[str] = None
last4: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.point3d import Point3d
from ..models.unit_length import UnitLength
@ -11,3 +11,5 @@ class CenterOfMass(BaseModel):
center_of_mass: Point3d
output_unit: UnitLength
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -21,3 +21,5 @@ class ClientMetrics(BaseModel):
rtc_keyframes_decoded: int
rtc_total_freezes_duration_sec: float
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -18,3 +18,5 @@ class Cluster(BaseModel):
tls_timeout: Optional[int] = None
urls: Optional[List[str]] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -2,7 +2,12 @@ from enum import Enum
class CodeLanguage(str, Enum):
"""The language code is written in.""" # noqa: E501
"""The language code is written in.
<details><summary>JSON schema</summary>
```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>
""" # noqa: E501
"""# The `go` programming language. """ # noqa: E501
GO = "go"

View File

@ -1,15 +1,22 @@
from typing import List, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.output_file import OutputFile
class CodeOutput(BaseModel):
"""Output of the code being executed."""
"""Output of the code being executed.
<details><summary>JSON schema</summary>
```json { "description": "Output of the code being executed.", "type": "object", "properties": { "output_files": { "description": "The contents of the files requested if they were passed.", "type": "array", "items": { "$ref": "#/components/schemas/OutputFile" } }, "stderr": { "description": "The stderr of the code.", "default": "", "type": "string" }, "stdout": { "description": "The stdout of the code.", "default": "", "type": "string" } } } ``` </details>
"""
output_files: Optional[List[OutputFile]] = None
stderr: Optional[str] = None
stdout: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -13,3 +13,5 @@ class Color(BaseModel):
g: float
r: float
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,7 +1,7 @@
import datetime
from typing import Dict, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.cluster import Cluster
from ..models.gateway import Gateway
@ -105,3 +105,5 @@ class Connection(BaseModel):
version: Optional[str] = None
write_deadline: Optional[int] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import Optional
from typing import Dict, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -13,4 +13,10 @@ class Coupon(BaseModel):
id: Optional[str] = None
metadata: Optional[Dict[str, str]] = None
name: Optional[str] = None
percent_off: Optional[float] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.point3d import Point3d
@ -9,3 +9,5 @@ class CurveGetControlPoints(BaseModel):
"""The response from the `CurveGetControlPoints` command."""
control_points: List[Point3d]
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.point3d import Point3d
@ -10,3 +10,5 @@ class CurveGetEndPoints(BaseModel):
end: Point3d
start: Point3d
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.curve_type import CurveType
@ -8,3 +8,5 @@ class CurveGetType(BaseModel):
"""The response from the `CurveGetType` command."""
curve_type: CurveType
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,16 +1,16 @@
import datetime
from typing import Dict, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.address_details import AddressDetails
from ..models.currency import Currency
from ..models.new_address import NewAddress
class Customer(BaseModel):
"""The resource representing a payment "Customer"."""
address: Optional[NewAddress] = None
address: Optional[AddressDetails] = None
balance: Optional[float] = None
@ -29,3 +29,5 @@ class Customer(BaseModel):
name: Optional[str] = None
phone: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,19 +1,21 @@
import datetime
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.uuid import Uuid
class CustomerBalance(BaseModel):
"""A balance for a user.
"""A balance for a customer.
This holds information about the financial balance for the user."""
This holds information about the financial balance for the customer."""
created_at: datetime.datetime
id: Uuid
map_id: Uuid
monthly_credits_remaining: float
pre_pay_cash_remaining: float
@ -24,4 +26,4 @@ class CustomerBalance(BaseModel):
updated_at: datetime.datetime
user_id: Uuid
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.unit_density import UnitDensity
@ -10,3 +10,5 @@ class Density(BaseModel):
density: float
output_unit: UnitDensity
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.o_auth2_grant_type import OAuth2GrantType
@ -12,3 +12,5 @@ class DeviceAccessTokenRequestForm(BaseModel):
device_code: str
grant_type: OAuth2GrantType
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -7,3 +7,5 @@ class DeviceAuthRequestForm(BaseModel):
"""The request parameters for the OAuth 2.0 Device Authorization Grant flow."""
client_id: str
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -7,3 +7,5 @@ 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=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
from ..models.coupon import Coupon
@ -8,3 +8,5 @@ class Discount(BaseModel):
"""The resource representing a Discount."""
coupon: Coupon
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import Literal, Union
from pydantic import BaseModel, Field, RootModel
from pydantic import BaseModel, ConfigDict, Field, RootModel
from typing_extensions import Annotated
from ..models.global_axis import GlobalAxis
@ -11,6 +11,8 @@ class euclidean(BaseModel):
type: Literal["euclidean"] = "euclidean"
model_config = ConfigDict(protected_namespaces=())
class on_axis(BaseModel):
"""The distance between objects along the specified axis"""
@ -19,6 +21,8 @@ class on_axis(BaseModel):
type: Literal["on_axis"] = "on_axis"
model_config = ConfigDict(protected_namespaces=())
DistanceType = RootModel[
Annotated[

View File

@ -1,6 +1,6 @@
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -10,3 +10,5 @@ class EmailAuthenticationForm(BaseModel):
callback_url: Optional[str] = None
email: str
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -8,3 +8,5 @@ class EntityGetAllChildUuids(BaseModel):
"""The response from the `EntityGetAllChildUuids` command."""
entity_ids: List[str]
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -7,3 +7,5 @@ class EntityGetChildUuid(BaseModel):
"""The response from the `EntityGetChildUuid` command."""
entity_id: str
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -9,3 +9,5 @@ class EntityGetDistance(BaseModel):
max_distance: float
min_distance: float
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -7,3 +7,5 @@ class EntityGetNumChildren(BaseModel):
"""The response from the `EntityGetNumChildren` command."""
num: int
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -7,3 +7,5 @@ class EntityGetParentId(BaseModel):
"""The response from the `EntityGetParentId` command."""
entity_id: str
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,6 +1,6 @@
from typing import List
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -8,3 +8,5 @@ class EntityLinearPattern(BaseModel):
"""The response from the `EntityLinearPattern` command."""
entity_ids: List[str]
model_config = ConfigDict(protected_namespaces=())

View File

@ -13,6 +13,7 @@ class EntityType(str, Enum):
EDGE = "edge"
FACE = "face"
PLANE = "plane"
VERTEX = "vertex"
def __str__(self) -> str:
return str(self.value)

View File

@ -1,6 +1,6 @@
from typing import Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
@ -12,3 +12,5 @@ class Error(BaseModel):
message: str
request_id: str
model_config = ConfigDict(protected_namespaces=())

Some files were not shown because too many files have changed in this diff Show More