Compare commits

...

13 Commits

Author SHA1 Message Date
f040c6454d Update api spec (#205)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-04 13:08:49 -08:00
f0599f6d54 bump
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-03-04 12:54:35 -08:00
042bb964e5 Update api spec (#202)
* YOYO NEW API SPEC!

* updates

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

* updates

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

* fixes

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

* fixes

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

* fixes

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

* fixes

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
2024-03-04 12:53:31 -08:00
a3089ef956 Bump pytest from 7.4.2 to 8.1.0 (#204)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.2 to 8.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.2...8.1.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  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-03-04 12:35:37 -08:00
0683a11b78 Bump attrs from 23.1.0 to 23.2.0 (#201)
Bumps [attrs](https://github.com/sponsors/hynek) from 23.1.0 to 23.2.0.
- [Commits](https://github.com/sponsors/hynek/commits)

---
updated-dependencies:
- dependency-name: attrs
  dependency-type: direct:production
  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-03-04 12:31:21 -08:00
532fbb352c float
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-03-03 15:53:35 -08:00
a1a02a1230 updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-02-24 17:07:15 -08:00
e5146a7cd5 Bump jinja2 from 3.1.2 to 3.1.3 (#189)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-24 17:04:28 -08:00
dedbe43c3e bump
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-02-24 17:03:55 -08:00
218c6b4672 Update api spec (#192)
YOYO NEW API SPEC!

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-24 16:41:39 -08:00
800e9756c5 Bump ruff from 0.0.291 to 0.2.2 (#199)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.291 to 0.2.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.0.291...v0.2.2)

---
updated-dependencies:
- dependency-name: ruff
  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-02-24 16:39:17 -08:00
24e1d948f2 Bump codecov/codecov-action from 3 to 4 (#196)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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-02-24 16:38:43 -08:00
bf758803cc Bump pillow from 10.0.1 to 10.2.0 (#194)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.0.1 to 10.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.0.1...10.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-24 16:38:26 -08:00
155 changed files with 15524 additions and 5382 deletions

View File

@ -49,7 +49,7 @@ jobs:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

View File

@ -35,4 +35,4 @@ jobs:
- name: Run ruff
shell: bash
run: |
poetry run ruff check --format=github .
poetry run ruff check --output-format=github .

View File

@ -233,7 +233,11 @@ def generateTypeAndExamplePython(
elif (
schema["type"] == "number"
and "format" in schema
and (schema["format"] == "float" or schema["format"] == "double")
and (
schema["format"] == "float"
or schema["format"] == "double"
or schema["format"] == "money-usd"
)
):
parameter_type = "float"
parameter_example = "3.14"
@ -518,7 +522,7 @@ from kittycad.types import Response
short_sync_example = short_sync_example + (
"""
if isinstance(result, Error) or result == None:
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
@ -845,7 +849,17 @@ async def test_"""
+ response_code
+ " = response.text\n"
)
elif (
json["type"] == "object"
and "additionalProperties" in json
):
parse_response.write(
"\t\tresponse_"
+ response_code
+ " = response.json()\n"
)
else:
print(json)
raise Exception("Unknown type", json["type"])
else:
parse_response.write(
@ -1017,7 +1031,7 @@ def generateType(path: str, name: str, schema: dict, data: dict):
elif type_name == "integer":
generateIntegerType(file_path, name, schema, type_name)
elif type_name == "number":
generateIntegerType(file_path, name, schema, type_name)
generateFloatType(file_path, name, schema, type_name)
elif type_name == "string":
generateStringType(file_path, name, schema, type_name)
else:
@ -1500,6 +1514,24 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
f.write(object_code)
f.write("\n")
all_options.append(object_name)
else:
# Generate each of the options from the tag.
i = 0
for one_of in schema["oneOf"]:
# Get the value of the tag.
object_name = name + str(i)
object_code = generateObjectTypeCode(
object_name,
one_of,
"object",
data,
None,
None,
)
f.write(object_code)
f.write("\n")
all_options.append(object_name)
i += 1
# Write the sum type.
description = getOneOfDescription(schema)
@ -1545,7 +1577,7 @@ def generateObjectTypeCode(
description = ""
if "description" in schema:
description = schema["description"]
description = schema["description"].replace('"', '\\"')
imports = []
refs = getRefs(schema)
@ -1694,7 +1726,12 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]:
raise Exception("Unknown array type")
elif json["type"] == "string":
refs.append("str")
elif (
json["type"] == "object" and "additionalProperties" in json
):
refs.append("dict")
else:
print(json)
raise Exception("Unknown type ", json["type"])
else:
refs.append("dict")
@ -1764,6 +1801,11 @@ def getRequestBodyRefs(endpoint: dict) -> List[str]:
if "$ref" in form:
ref = form["$ref"].replace("#/components/schemas/", "")
refs.append(ref)
elif content_type == "multipart/form-data":
form = content[content_type]["schema"]
if "$ref" in form:
ref = form["$ref"].replace("#/components/schemas/", "")
refs.append(ref)
else:
# Throw an error for an unsupported content type.
logging.error("content: ", content)
@ -1802,6 +1844,15 @@ def getRequestBodyTypeSchema(
elif form != {}:
logging.error("not a ref: ", form)
raise Exception("not a ref")
elif content_type == "multipart/form-data":
form = content[content_type]["schema"]
if "$ref" in form:
ref = form["$ref"].replace("#/components/schemas/", "")
type_schema = data["components"]["schemas"][ref]
return ref, type_schema
elif form != {}:
type_schema = form
return None, type_schema
else:
logging.error("unsupported content type: ", content_type)
raise Exception("unsupported content type")

View File

@ -22,7 +22,7 @@ poetry run python generate/generate.py
poetry run isort .
poetry run black . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py
poetry run ruff check --fix .
poetry run mypy .
poetry run mypy . || true
# Run the tests.

File diff suppressed because it is too large Load Diff

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.kcl_code_completion_request import KclCodeCompletionRequest
from ...models.kcl_code_completion_response import KclCodeCompletionResponse
from ...types import Response
def _get_kwargs(
body: KclCodeCompletionRequest,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/ai/kcl/completions".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[KclCodeCompletionResponse, Error]]:
if response.status_code == 201:
response_201 = KclCodeCompletionResponse(**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[KclCodeCompletionResponse, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: KclCodeCompletionRequest,
*,
client: Client,
) -> Response[Optional[Union[KclCodeCompletionResponse, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: KclCodeCompletionRequest,
*,
client: Client,
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: KclCodeCompletionRequest,
*,
client: Client,
) -> Response[Optional[Union[KclCodeCompletionResponse, 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: KclCodeCompletionRequest,
*,
client: Client,
) -> Optional[Union[KclCodeCompletionResponse, Error]]:
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -86,7 +86,6 @@ def sync(
"""Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.
This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.
""" # noqa: E501
return sync_detailed(
@ -123,7 +122,6 @@ async def asyncio(
"""Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.
This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.
""" # noqa: E501
return (

View File

@ -20,6 +20,7 @@ def _get_kwargs(
) # noqa: E501
if feedback is not None:
if "?" in url:
url = url + "&feedback=" + str(feedback)
else:

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:

View File

@ -22,24 +22,28 @@ def _get_kwargs(
) # 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 no_models is not None:
if "?" in url:
url = url + "&no_models=" + str(no_models)
else:

View File

@ -19,6 +19,7 @@ def _get_kwargs(
) # noqa: E501
if group_by is not None:
if "?" in url:
url = url + "&group_by=" + str(group_by)
else:

View File

@ -35,9 +35,7 @@ def _get_kwargs(
}
def _parse_response(
*, response: httpx.Response
) -> Optional[
def _parse_response(*, response: httpx.Response) -> Optional[
Union[
FileConversion,
FileCenterOfMass,
@ -123,9 +121,7 @@ def _parse_response(
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[
def _build_response(*, response: httpx.Response) -> Response[
Optional[
Union[
FileConversion,

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:

View File

@ -23,18 +23,21 @@ def _get_kwargs(
) # 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:

View File

@ -23,24 +23,28 @@ def _get_kwargs(
) # 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 status is not None:
if "?" in url:
url = url + "&status=" + str(status)
else:

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:

View File

@ -18,6 +18,7 @@ def _get_kwargs(
) # noqa: E501
if label is not None:
if "?" in url:
url = url + "&label=" + str(label)
else:

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:

View File

@ -22,6 +22,7 @@ def _get_kwargs(
) # noqa: E501
if output is not None:
if "?" in url:
url = url + "&output=" + str(output)
else:
@ -92,6 +93,7 @@ def sync(
client: Client,
output: Optional[str] = None,
) -> Optional[Union[CodeOutput, Error]]:
return sync_detailed(
lang=lang,
output=output,
@ -127,6 +129,7 @@ async def asyncio(
client: Client,
output: Optional[str] = None,
) -> Optional[Union[CodeOutput, Error]]:
return (
await asyncio_detailed(
lang=lang,

View File

@ -22,12 +22,14 @@ def _get_kwargs(
) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:

View File

@ -25,24 +25,28 @@ def _get_kwargs(
) # noqa: E501
if material_mass is not None:
if "?" in url:
url = url + "&material_mass=" + str(material_mass)
else:
url = url + "?material_mass=" + str(material_mass)
if material_mass_unit is not None:
if "?" in url:
url = url + "&material_mass_unit=" + str(material_mass_unit)
else:
url = url + "?material_mass_unit=" + str(material_mass_unit)
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:

View File

@ -25,24 +25,28 @@ def _get_kwargs(
) # noqa: E501
if material_density is not None:
if "?" in url:
url = url + "&material_density=" + str(material_density)
else:
url = url + "?material_density=" + str(material_density)
if material_density_unit is not None:
if "?" in url:
url = url + "&material_density_unit=" + str(material_density_unit)
else:
url = url + "?material_density_unit=" + str(material_density_unit)
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:

View File

@ -22,12 +22,14 @@ def _get_kwargs(
) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:

View File

@ -22,12 +22,14 @@ def _get_kwargs(
) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
else:

View File

@ -5,7 +5,7 @@ import httpx
from ...client import Client
from ...models.email_authentication_form import EmailAuthenticationForm
from ...models.error import Error
from ...models.verification_token import VerificationToken
from ...models.verification_token_response import VerificationTokenResponse
from ...types import Response
@ -32,9 +32,9 @@ def _get_kwargs(
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[VerificationToken, Error]]:
) -> Optional[Union[VerificationTokenResponse, Error]]:
if response.status_code == 201:
response_201 = VerificationToken(**response.json())
response_201 = VerificationTokenResponse(**response.json())
return response_201
if response.status_code == 400:
response_4XX = Error(**response.json())
@ -47,7 +47,7 @@ def _parse_response(
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[VerificationToken, Error]]]:
) -> Response[Optional[Union[VerificationTokenResponse, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -60,7 +60,7 @@ def sync_detailed(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Response[Optional[Union[VerificationToken, Error]]]:
) -> Response[Optional[Union[VerificationTokenResponse, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
@ -78,7 +78,8 @@ def sync(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Optional[Union[VerificationToken, Error]]:
) -> Optional[Union[VerificationTokenResponse, Error]]:
return sync_detailed(
body=body,
client=client,
@ -89,7 +90,7 @@ async def asyncio_detailed(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Response[Optional[Union[VerificationToken, Error]]]:
) -> Response[Optional[Union[VerificationTokenResponse, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
@ -105,7 +106,8 @@ async def asyncio(
body: EmailAuthenticationForm,
*,
client: Client,
) -> Optional[Union[VerificationToken, Error]]:
) -> Optional[Union[VerificationTokenResponse, Error]]:
return (
await asyncio_detailed(
body=body,

View File

@ -19,18 +19,21 @@ def _get_kwargs(
) # noqa: E501
if callback_url is not None:
if "?" in url:
url = url + "&callback_url=" + str(callback_url)
else:
url = url + "?callback_url=" + str(callback_url)
if email is not None:
if "?" in url:
url = url + "&email=" + str(email)
else:
url = url + "?email=" + str(email)
if token is not None:
if "?" in url:
url = url + "&token=" + str(token)
else:
@ -96,6 +99,7 @@ def sync(
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
return sync_detailed(
callback_url=callback_url,
email=email,
@ -131,6 +135,7 @@ async def asyncio(
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
return (
await asyncio_detailed(
callback_url=callback_url,

View File

@ -0,0 +1,127 @@
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(
provider_id: Uuid,
*,
client: Client,
callback_url: Optional[str] = None,
) -> Dict[str, Any]:
url = "{}/auth/saml/provider/{provider_id}/login".format(
client.base_url,
provider_id=provider_id,
) # noqa: E501
if callback_url is not None:
if "?" in url:
url = url + "&callback_url=" + str(callback_url)
else:
url = url + "?callback_url=" + str(callback_url)
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(
provider_id: Uuid,
*,
client: Client,
callback_url: Optional[str] = None,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
provider_id=provider_id,
callback_url=callback_url,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
provider_id: Uuid,
*,
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
"""The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.""" # noqa: E501
return sync_detailed(
provider_id=provider_id,
callback_url=callback_url,
client=client,
).parsed
async def asyncio_detailed(
provider_id: Uuid,
*,
client: Client,
callback_url: Optional[str] = None,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
provider_id=provider_id,
callback_url=callback_url,
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(
provider_id: Uuid,
*,
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
"""The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.""" # noqa: E501
return (
await asyncio_detailed(
provider_id=provider_id,
callback_url=callback_url,
client=client,
)
).parsed

View File

@ -0,0 +1,119 @@
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(
provider_id: Uuid,
body: bytes,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/auth/saml/provider/{provider_id}/login".format(
client.base_url,
provider_id=provider_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,
}
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(
provider_id: Uuid,
body: bytes,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
provider_id=provider_id,
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
provider_id: Uuid,
body: bytes,
*,
client: Client,
) -> Optional[Error]:
return sync_detailed(
provider_id=provider_id,
body=body,
client=client,
).parsed
async def asyncio_detailed(
provider_id: Uuid,
body: bytes,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
provider_id=provider_id,
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(
provider_id: Uuid,
body: bytes,
*,
client: Client,
) -> Optional[Error]:
return (
await asyncio_detailed(
provider_id=provider_id,
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 = "{}/events".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.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Error]:
"""We collect anonymous telemetry data for improving our product.""" # 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.post(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Error]:
"""We collect anonymous telemetry data for improving our product.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,103 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.ip_addr_info import IpAddrInfo
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/_meta/ipinfo".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[IpAddrInfo, Error]]:
if response.status_code == 200:
response_200 = IpAddrInfo(**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[IpAddrInfo, 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[IpAddrInfo, 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[IpAddrInfo, Error]]:
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[IpAddrInfo, 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[IpAddrInfo, Error]]:
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,104 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/pricing/subscriptions".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[dict, Error]]:
if response.status_code == 200:
response_200 = 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[dict, 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[dict, 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[dict, Error]]:
"""This is the ultimate source of truth for the pricing of our subscriptions.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[dict, 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[dict, Error]]:
"""This is the ultimate source of truth for the pricing of our subscriptions.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -70,6 +70,7 @@ def sync(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
return sync_detailed(
client=client,
).parsed
@ -93,6 +94,7 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -71,6 +71,7 @@ def sync(
*,
client: Client,
) -> Optional[Union[Pong, Error]]:
return sync_detailed(
client=client,
).parsed
@ -94,6 +95,7 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[Pong, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -22,30 +22,35 @@ def _get_kwargs(
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
if fps is not None:
if "?" in url:
url = url + "&fps=" + str(fps)
else:
url = url + "?fps=" + str(fps)
if unlocked_framerate is not None:
if "?" in url:
url = url + "&unlocked_framerate=" + str(unlocked_framerate).lower()
else:
url = url + "?unlocked_framerate=" + str(unlocked_framerate).lower()
if video_res_height is not None:
if "?" in url:
url = url + "&video_res_height=" + str(video_res_height)
else:
url = url + "?video_res_height=" + str(video_res_height)
if video_res_width is not None:
if "?" in url:
url = url + "&video_res_width=" + str(video_res_width)
else:
url = url + "?video_res_width=" + str(video_res_width)
if webrtc is not None:
if "?" in url:
url = url + "&webrtc=" + str(webrtc).lower()
else:

View File

@ -77,7 +77,12 @@ def sync(
*,
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
"""If the user exists, this will add them to your org. If they do not exist, this will create a new user and add them to your org.
In both cases the user gets an email that they have been added to the org.
If the user is already in your org, this will return a 400 and a message.
If the user is already in a different org, this will return a 400 and a message.
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,
@ -106,7 +111,12 @@ async def asyncio(
*,
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
"""If the user exists, this will add them to your org. If they do not exist, this will create a new user and add them to your org.
In both cases the user gets an email that they have been added to the org.
If the user is already in your org, this will return a 400 and a message.
If the user is already in a different org, this will return a 400 and a message.
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(

View File

@ -0,0 +1,118 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.saml_identity_provider import SamlIdentityProvider
from ...models.saml_identity_provider_create import SamlIdentityProviderCreate
from ...types import Response
def _get_kwargs(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/saml/idp".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[SamlIdentityProvider, Error]]:
if response.status_code == 201:
response_201 = SamlIdentityProvider(**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[SamlIdentityProvider, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Response[Optional[Union[SamlIdentityProvider, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Optional[Union[SamlIdentityProvider, Error]]:
"""This endpoint requires authentication by an org admin.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Response[Optional[Union[SamlIdentityProvider, 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: SamlIdentityProviderCreate,
*,
client: Client,
) -> Optional[Union[SamlIdentityProvider, Error]]:
"""This endpoint requires authentication by an org admin.""" # 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/saml/idp".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 endpoint requires authentication by an org admin.""" # 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 endpoint requires authentication by an org admin.""" # noqa: E501
return (
await asyncio_detailed(
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.uuid import Uuid
from ...types import Response
def _get_kwargs(
id: Uuid,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/orgs/{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[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(
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[Org, Error]]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: Uuid,
*,
client: Client,
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by a Zoo employee. It gets the information for the specified org.""" # noqa: E501
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[Org, 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: Uuid,
*,
client: Client,
) -> Optional[Union[Org, Error]]:
"""This endpoint requires authentication by a Zoo employee. It gets the information for the specified 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.error import Error
from ...models.privacy_settings import PrivacySettings
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/privacy".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[PrivacySettings, Error]]:
if response.status_code == 200:
response_200 = PrivacySettings(**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[PrivacySettings, 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[PrivacySettings, 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[PrivacySettings, Error]]:
"""This endpoint requires authentication by an org admin. It gets the privacy settings for the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[PrivacySettings, 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[PrivacySettings, Error]]:
"""This endpoint requires authentication by an org admin. It gets the privacy settings 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, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.saml_identity_provider import SamlIdentityProvider
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/saml/idp".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[SamlIdentityProvider, Error]]:
if response.status_code == 200:
response_200 = SamlIdentityProvider(**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[SamlIdentityProvider, 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[SamlIdentityProvider, 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[SamlIdentityProvider, Error]]:
"""This endpoint requires authentication by an org admin.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[SamlIdentityProvider, 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[SamlIdentityProvider, Error]]:
"""This endpoint requires authentication by an org admin.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -6,13 +6,13 @@ 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 ...models.user_org_role import UserOrgRole
from ...types import Response
def _get_kwargs(
sort_by: CreatedAtSortMode,
role: OrgRole,
role: UserOrgRole,
*,
client: Client,
limit: Optional[int] = None,
@ -23,24 +23,28 @@ def _get_kwargs(
) # 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:
@ -85,7 +89,7 @@ def _build_response(
def sync_detailed(
sort_by: CreatedAtSortMode,
role: OrgRole,
role: UserOrgRole,
*,
client: Client,
limit: Optional[int] = None,
@ -109,7 +113,7 @@ def sync_detailed(
def sync(
sort_by: CreatedAtSortMode,
role: OrgRole,
role: UserOrgRole,
*,
client: Client,
limit: Optional[int] = None,
@ -128,7 +132,7 @@ def sync(
async def asyncio_detailed(
sort_by: CreatedAtSortMode,
role: OrgRole,
role: UserOrgRole,
*,
client: Client,
limit: Optional[int] = None,
@ -150,7 +154,7 @@ async def asyncio_detailed(
async def asyncio(
sort_by: CreatedAtSortMode,
role: OrgRole,
role: UserOrgRole,
*,
client: Client,
limit: Optional[int] = None,

View File

@ -0,0 +1,156 @@
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_results_page import OrgResultsPage
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 = "{}/orgs".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[OrgResultsPage, Error]]:
if response.status_code == 200:
response_200 = OrgResultsPage(**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[OrgResultsPage, 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[OrgResultsPage, 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[OrgResultsPage, Error]]:
"""This endpoint requires authentication by a Zoo employee. The orgs are returned in order of creation, with the most recently created orgs 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[OrgResultsPage, 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[OrgResultsPage, Error]]:
"""This endpoint requires authentication by a Zoo employee. The orgs are returned in order of creation, with the most recently created orgs first.""" # noqa: E501
return (
await asyncio_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
).parsed

View File

@ -0,0 +1,129 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.subscription_tier_price import SubscriptionTierPrice
from ...models.uuid import Uuid
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
from ...types import Response
def _get_kwargs(
id: Uuid,
body: SubscriptionTierPrice,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/orgs/{id}/enterprise/pricing".format(
client.base_url,
id=id,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"content": body.model_dump_json(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[ZooProductSubscriptions, Error]]:
if response.status_code == 200:
response_200 = ZooProductSubscriptions(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error(**response.json())
return response_5XX
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
id: Uuid,
body: SubscriptionTierPrice,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
kwargs = _get_kwargs(
id=id,
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: Uuid,
body: SubscriptionTierPrice,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""You must be a Zoo employee to perform this request.""" # noqa: E501
return sync_detailed(
id=id,
body=body,
client=client,
).parsed
async def asyncio_detailed(
id: Uuid,
body: SubscriptionTierPrice,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
kwargs = _get_kwargs(
id=id,
body=body,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.put(**kwargs)
return _build_response(response=response)
async def asyncio(
id: Uuid,
body: SubscriptionTierPrice,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""You must be a Zoo employee to perform this request.""" # noqa: E501
return (
await asyncio_detailed(
id=id,
body=body,
client=client,
)
).parsed

View File

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

View File

@ -0,0 +1,118 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.saml_identity_provider import SamlIdentityProvider
from ...models.saml_identity_provider_create import SamlIdentityProviderCreate
from ...types import Response
def _get_kwargs(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/saml/idp".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[SamlIdentityProvider, Error]]:
if response.status_code == 200:
response_200 = SamlIdentityProvider(**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[SamlIdentityProvider, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Response[Optional[Union[SamlIdentityProvider, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Optional[Union[SamlIdentityProvider, Error]]:
"""This endpoint requires authentication by an org admin.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: SamlIdentityProviderCreate,
*,
client: Client,
) -> Response[Optional[Union[SamlIdentityProvider, 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: SamlIdentityProviderCreate,
*,
client: Client,
) -> Optional[Union[SamlIdentityProvider, Error]]:
"""This endpoint requires authentication by an org admin.""" # noqa: E501
return (
await asyncio_detailed(
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.error import Error
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
from ...models.zoo_product_subscriptions_org_request import (
ZooProductSubscriptionsOrgRequest,
)
from ...types import Response
def _get_kwargs(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/subscriptions".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[ZooProductSubscriptions, Error]]:
if response.status_code == 201:
response_201 = ZooProductSubscriptions(**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[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
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.error import Error
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
from ...models.zoo_product_subscriptions_user_request import (
ZooProductSubscriptionsUserRequest,
)
from ...types import Response
def _get_kwargs(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/user/payment/subscriptions".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[ZooProductSubscriptions, Error]]:
if response.status_code == 201:
response_201 = ZooProductSubscriptions(**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[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by any Zoo user. It creates the subscription for the user.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by any Zoo user. It creates the subscription for the user.""" # 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.zoo_product_subscriptions import ZooProductSubscriptions
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/subscriptions".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[ZooProductSubscriptions, Error]]:
if response.status_code == 200:
response_200 = ZooProductSubscriptions(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error(**response.json())
return response_5XX
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by an org admin. It gets the subscription for the authenticated user's org.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by an org admin. It gets the subscription for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,118 @@
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 ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
id: Uuid,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/orgs/{id}/payment/balance".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[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(
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: Uuid,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.""" # noqa: E501
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, 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: Uuid,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.""" # noqa: E501
return (
await asyncio_detailed(
id=id,
client=client,
)
).parsed

View File

@ -0,0 +1,118 @@
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 ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
id: Uuid,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/users/{id}/payment/balance".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[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(
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: Uuid,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.""" # noqa: E501
return sync_detailed(
id=id,
client=client,
).parsed
async def asyncio_detailed(
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, 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: Uuid,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.""" # 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.error import Error
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/user/payment/subscriptions".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[ZooProductSubscriptions, Error]]:
if response.status_code == 200:
response_200 = ZooProductSubscriptions(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error(**response.json())
return response_5XX
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the subscription for the user.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the subscription for the user.""" # 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.error import Error
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
from ...models.zoo_product_subscriptions_org_request import (
ZooProductSubscriptionsOrgRequest,
)
from ...types import Response
def _get_kwargs(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/payment/subscriptions".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[ZooProductSubscriptions, Error]]:
if response.status_code == 200:
response_200 = ZooProductSubscriptions(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error(**response.json())
return response_5XX
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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: ZooProductSubscriptionsOrgRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,129 @@
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 ...models.update_payment_balance import UpdatePaymentBalance
from ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/orgs/{id}/payment/balance".format(
client.base_url,
id=id,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"content": body.model_dump_json(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[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(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.""" # noqa: E501
return sync_detailed(
id=id,
body=body,
client=client,
).parsed
async def asyncio_detailed(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
body=body,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.put(**kwargs)
return _build_response(response=response)
async def asyncio(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.""" # noqa: E501
return (
await asyncio_detailed(
id=id,
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1,129 @@
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 ...models.update_payment_balance import UpdatePaymentBalance
from ...models.uuid import Uuid
from ...types import Response
def _get_kwargs(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/users/{id}/payment/balance".format(
client.base_url,
id=id,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
"content": body.model_dump_json(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[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(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.""" # noqa: E501
return sync_detailed(
id=id,
body=body,
client=client,
).parsed
async def asyncio_detailed(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
body=body,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.put(**kwargs)
return _build_response(response=response)
async def asyncio(
id: Uuid,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.""" # noqa: E501
return (
await asyncio_detailed(
id=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.error import Error
from ...models.zoo_product_subscriptions import ZooProductSubscriptions
from ...models.zoo_product_subscriptions_user_request import (
ZooProductSubscriptionsUserRequest,
)
from ...types import Response
def _get_kwargs(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/user/payment/subscriptions".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[ZooProductSubscriptions, Error]]:
if response.status_code == 200:
response_200 = ZooProductSubscriptions(**response.json())
return response_200
if response.status_code == 400:
response_4XX = Error(**response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error(**response.json())
return response_5XX
return Error(**response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.put(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by any Zoo user. It updates the subscription for the user.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Response[Optional[Union[ZooProductSubscriptions, 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: ZooProductSubscriptionsUserRequest,
*,
client: Client,
) -> Optional[Union[ZooProductSubscriptions, Error]]:
"""This endpoint requires authentication by any Zoo user. It updates the subscription for the user.""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -0,0 +1 @@
""" Contains methods for accessing the service_accounts API paths: Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won't stop working when an individual leaves the company. """ # noqa: E501

View File

@ -0,0 +1,123 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.service_account import ServiceAccount
from ...types import Response
def _get_kwargs(
*,
client: Client,
label: Optional[str] = None,
) -> Dict[str, Any]:
url = "{}/org/service-accounts".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()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[ServiceAccount, Error]]:
if response.status_code == 201:
response_201 = ServiceAccount(**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[ServiceAccount, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
*,
client: Client,
label: Optional[str] = None,
) -> Response[Optional[Union[ServiceAccount, Error]]]:
kwargs = _get_kwargs(
label=label,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
label: Optional[str] = None,
) -> Optional[Union[ServiceAccount, Error]]:
"""This endpoint requires authentication by an org admin. It creates a new service account for the organization.""" # noqa: E501
return sync_detailed(
label=label,
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
label: Optional[str] = None,
) -> Response[Optional[Union[ServiceAccount, Error]]]:
kwargs = _get_kwargs(
label=label,
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,
label: Optional[str] = None,
) -> Optional[Union[ServiceAccount, Error]]:
"""This endpoint requires authentication by an org admin. It creates a new service account for the organization.""" # noqa: E501
return (
await asyncio_detailed(
label=label,
client=client,
)
).parsed

View File

@ -0,0 +1,114 @@
from typing import Any, Dict, Optional
import httpx
from ...client import Client
from ...models.error import Error
from ...types import Response
def _get_kwargs(
token: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/service-accounts/{token}".format(
client.base_url,
token=token,
) # 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(
token: str,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
token=token,
client=client,
)
response = httpx.delete(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
token: str,
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.
""" # noqa: E501
return sync_detailed(
token=token,
client=client,
).parsed
async def asyncio_detailed(
token: str,
*,
client: Client,
) -> Response[Optional[Error]]:
kwargs = _get_kwargs(
token=token,
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(
token: str,
*,
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.
""" # noqa: E501
return (
await asyncio_detailed(
token=token,
client=client,
)
).parsed

View File

@ -0,0 +1,117 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.service_account import ServiceAccount
from ...types import Response
def _get_kwargs(
token: str,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/org/service-accounts/{token}".format(
client.base_url,
token=token,
) # 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[ServiceAccount, Error]]:
if response.status_code == 200:
response_200 = ServiceAccount(**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[ServiceAccount, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
token: str,
*,
client: Client,
) -> Response[Optional[Union[ServiceAccount, Error]]]:
kwargs = _get_kwargs(
token=token,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
token: str,
*,
client: Client,
) -> Optional[Union[ServiceAccount, Error]]:
"""This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.""" # noqa: E501
return sync_detailed(
token=token,
client=client,
).parsed
async def asyncio_detailed(
token: str,
*,
client: Client,
) -> Response[Optional[Union[ServiceAccount, Error]]]:
kwargs = _get_kwargs(
token=token,
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(
token: str,
*,
client: Client,
) -> Optional[Union[ServiceAccount, Error]]:
"""This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.""" # noqa: E501
return (
await asyncio_detailed(
token=token,
client=client,
)
).parsed

View File

@ -0,0 +1,160 @@
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.service_account_results_page import ServiceAccountResultsPage
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/service-accounts".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[ServiceAccountResultsPage, Error]]:
if response.status_code == 200:
response_200 = ServiceAccountResultsPage(**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[ServiceAccountResultsPage, 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[ServiceAccountResultsPage, 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[ServiceAccountResultsPage, Error]]:
"""This endpoint requires authentication by an org admin. It returns the service accounts for the organization.
The service accounts are returned in order of creation, with the most recently created service accounts 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[ServiceAccountResultsPage, 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[ServiceAccountResultsPage, Error]]:
"""This endpoint requires authentication by an org admin. It returns the service accounts for the organization.
The service accounts are returned in order of creation, with the most recently created service accounts first.
""" # noqa: E501
return (
await asyncio_detailed(
limit=limit,
page_token=page_token,
sort_by=sort_by,
client=client,
)
).parsed

View File

@ -0,0 +1 @@
""" Contains methods for accessing the store API paths: Operations involving our swag store. """ # noqa: E501

View File

@ -0,0 +1,118 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.discount_code import DiscountCode
from ...models.error import Error
from ...models.store_coupon_params import StoreCouponParams
from ...types import Response
def _get_kwargs(
body: StoreCouponParams,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/store/coupon".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[DiscountCode, Error]]:
if response.status_code == 201:
response_201 = DiscountCode(**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[DiscountCode, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
body: StoreCouponParams,
*,
client: Client,
) -> Response[Optional[Union[DiscountCode, Error]]]:
kwargs = _get_kwargs(
body=body,
client=client,
)
response = httpx.post(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
body: StoreCouponParams,
*,
client: Client,
) -> Optional[Union[DiscountCode, Error]]:
"""This endpoint requires authentication by a Zoo employee. It creates a new store coupon.""" # noqa: E501
return sync_detailed(
body=body,
client=client,
).parsed
async def asyncio_detailed(
body: StoreCouponParams,
*,
client: Client,
) -> Response[Optional[Union[DiscountCode, 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: StoreCouponParams,
*,
client: Client,
) -> Optional[Union[DiscountCode, Error]]:
"""This endpoint requires authentication by a Zoo employee. It creates a new store coupon.""" # noqa: E501
return (
await asyncio_detailed(
body=body,
client=client,
)
).parsed

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -23,6 +23,7 @@ def _get_kwargs(
) # noqa: E501
if value is not None:
if "?" in url:
url = url + "&value=" + str(value)
else:

View File

@ -0,0 +1,111 @@
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import Client
from ...models.account_provider import AccountProvider
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/user/oauth2/providers".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[AccountProvider], Error]]:
if response.status_code == 200:
response_200 = [AccountProvider(**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[AccountProvider], 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[AccountProvider], 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[AccountProvider], Error]]:
"""If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.
This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.
""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[List[AccountProvider], 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[AccountProvider], Error]]:
"""If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.
This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.
""" # noqa: E501
return (
await asyncio_detailed(
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.privacy_settings import PrivacySettings
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/user/privacy".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[PrivacySettings, Error]]:
if response.status_code == 200:
response_200 = PrivacySettings(**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[PrivacySettings, 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[PrivacySettings, 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[PrivacySettings, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the privacy settings for the user.""" # noqa: E501
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Optional[Union[PrivacySettings, 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[PrivacySettings, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the privacy settings for the user.""" # noqa: E501
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:
@ -104,7 +107,7 @@ def sync(
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[UserResultsPage, Error]]:
"""This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
"""This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -141,7 +144,7 @@ async def asyncio(
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[UserResultsPage, Error]]:
"""This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
"""This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -21,18 +21,21 @@ def _get_kwargs(
) # 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:
@ -104,7 +107,7 @@ def sync(
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
"""This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
"""This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
return sync_detailed(
limit=limit,
@ -141,7 +144,7 @@ async def asyncio(
limit: Optional[int] = None,
page_token: Optional[str] = None,
) -> Optional[Union[ExtendedUserResultsPage, Error]]:
"""This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
"""This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501
return (
await asyncio_detailed(

View File

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

View File

@ -173,13 +173,13 @@ async def test_file_convert_stl_async():
file.close()
# Get the fc.
result: Optional[
Union[FileConversion, Error]
] = await create_file_conversion.asyncio(
client=client,
body=content,
src_format=FileImportFormat.STL,
output_format=FileExportFormat.OBJ,
result: Optional[Union[FileConversion, Error]] = (
await create_file_conversion.asyncio(
client=client,
body=content,
src_format=FileImportFormat.STL,
output_format=FileExportFormat.OBJ,
)
)
assert isinstance(result, FileConversion)
@ -212,13 +212,13 @@ async def test_file_convert_obj_async():
file.close()
# Get the fc.
result: Optional[
Union[FileConversion, Error]
] = await create_file_conversion.asyncio(
client=client,
body=content,
src_format=FileImportFormat.OBJ,
output_format=FileExportFormat.STL,
result: Optional[Union[FileConversion, Error]] = (
await create_file_conversion.asyncio(
client=client,
body=content,
src_format=FileImportFormat.OBJ,
output_format=FileExportFormat.STL,
)
)
assert isinstance(result, FileConversion)
@ -556,11 +556,11 @@ def test_text_to_cad():
while (
body.status == ApiCallStatus.IN_PROGRESS or body.status == ApiCallStatus.QUEUED
) and time.time() - start_time < 120:
result_status: Optional[
Union[TextToCad, Error]
] = get_text_to_cad_model_for_user.sync(
client=client,
id=body.id,
result_status: Optional[Union[TextToCad, Error]] = (
get_text_to_cad_model_for_user.sync(
client=client,
id=body.id,
)
)
if isinstance(result_status, Error) or result_status is None:

File diff suppressed because it is too large Load Diff

View File

@ -28,12 +28,16 @@ from .async_api_call import AsyncApiCall
from .async_api_call_output import AsyncApiCallOutput
from .async_api_call_results_page import AsyncApiCallResultsPage
from .async_api_call_type import AsyncApiCallType
from .auth_callback import AuthCallback
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_end import CameraDragEnd
from .camera_drag_interaction_type import CameraDragInteractionType
from .camera_drag_move import CameraDragMove
from .camera_settings import CameraSettings
from .card_details import CardDetails
from .center_of_mass import CenterOfMass
from .client_metrics import ClientMetrics
@ -52,15 +56,20 @@ from .curve_get_type import CurveGetType
from .curve_type import CurveType
from .customer import Customer
from .customer_balance import CustomerBalance
from .default_camera_get_settings import DefaultCameraGetSettings
from .default_camera_zoom import DefaultCameraZoom
from .density import Density
from .der_encoded_key_pair import DerEncodedKeyPair
from .device_access_token_request_form import DeviceAccessTokenRequestForm
from .device_auth_request_form import DeviceAuthRequestForm
from .device_auth_verify_params import DeviceAuthVerifyParams
from .direction import Direction
from .discount import Discount
from .discount_code import DiscountCode
from .distance_type import DistanceType
from .email_authentication_form import EmailAuthenticationForm
from .empty import Empty
from .entity_circular_pattern import EntityCircularPattern
from .entity_get_all_child_uuids import EntityGetAllChildUuids
from .entity_get_child_uuid import EntityGetChildUuid
from .entity_get_distance import EntityGetDistance
@ -75,6 +84,11 @@ from .export import Export
from .export_file import ExportFile
from .extended_user import ExtendedUser
from .extended_user_results_page import ExtendedUserResultsPage
from .extrusion_face_cap_type import ExtrusionFaceCapType
from .extrusion_face_info import ExtrusionFaceInfo
from .face_get_gradient import FaceGetGradient
from .face_get_position import FaceGetPosition
from .face_is_planar import FaceIsPlanar
from .failure_web_socket_response import FailureWebSocketResponse
from .fbx_storage import FbxStorage
from .file_center_of_mass import FileCenterOfMass
@ -94,6 +108,7 @@ from .gltf_presentation import GltfPresentation
from .gltf_storage import GltfStorage
from .highlight_set_entity import HighlightSetEntity
from .ice_server import IceServer
from .idp_metadata_source import IdpMetadataSource
from .image_format import ImageFormat
from .import_file import ImportFile
from .import_files import ImportFiles
@ -101,15 +116,28 @@ from .input_format import InputFormat
from .invoice import Invoice
from .invoice_line_item import InvoiceLineItem
from .invoice_status import InvoiceStatus
from .ip_addr_info import IpAddrInfo
from .jetstream import Jetstream
from .jetstream_api_stats import JetstreamApiStats
from .jetstream_config import JetstreamConfig
from .jetstream_stats import JetstreamStats
from .kcl_code_completion_params import KclCodeCompletionParams
from .kcl_code_completion_request import KclCodeCompletionRequest
from .kcl_code_completion_response import KclCodeCompletionResponse
from .leaf_node import LeafNode
from .length_unit import LengthUnit
from .mass import Mass
from .meta_cluster_info import MetaClusterInfo
from .metadata import Metadata
from .method import Method
from .modeling_app_individual_subscription_tier import (
ModelingAppIndividualSubscriptionTier,
)
from .modeling_app_organization_subscription_tier import (
ModelingAppOrganizationSubscriptionTier,
)
from .modeling_app_subscription_tier import ModelingAppSubscriptionTier
from .modeling_app_subscription_tier_name import ModelingAppSubscriptionTierName
from .modeling_cmd import ModelingCmd
from .modeling_cmd_id import ModelingCmdId
from .modeling_cmd_req import ModelingCmdReq
@ -123,6 +151,7 @@ from .org import Org
from .org_details import OrgDetails
from .org_member import OrgMember
from .org_member_results_page import OrgMemberResultsPage
from .org_results_page import OrgResultsPage
from .org_role import OrgRole
from .output_file import OutputFile
from .output_format import OutputFormat
@ -139,28 +168,41 @@ 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 .plan_interval import PlanInterval
from .plane_intersect_and_project import PlaneIntersectAndProject
from .ply_storage import PlyStorage
from .point2d import Point2d
from .point3d import Point3d
from .pong import Pong
from .privacy_settings import PrivacySettings
from .raw_file import RawFile
from .rtc_ice_candidate_init import RtcIceCandidateInit
from .rtc_sdp_type import RtcSdpType
from .rtc_session_description import RtcSessionDescription
from .saml_identity_provider import SamlIdentityProvider
from .saml_identity_provider_create import SamlIdentityProviderCreate
from .scene_selection_type import SceneSelectionType
from .scene_tool_type import SceneToolType
from .select_get import SelectGet
from .select_with_point import SelectWithPoint
from .selection import Selection
from .service_account import ServiceAccount
from .service_account_results_page import ServiceAccountResultsPage
from .session import Session
from .solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
from .solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
from .solid3d_get_extrusion_face_info import Solid3dGetExtrusionFaceInfo
from .solid3d_get_next_adjacent_edge import Solid3dGetNextAdjacentEdge
from .solid3d_get_opposite_edge import Solid3dGetOppositeEdge
from .solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge
from .stl_storage import StlStorage
from .store_coupon_params import StoreCouponParams
from .subscription_tier_feature import SubscriptionTierFeature
from .subscription_tier_price import SubscriptionTierPrice
from .subscription_tier_type import SubscriptionTierType
from .subscription_training_data_behavior import SubscriptionTrainingDataBehavior
from .success_web_socket_response import SuccessWebSocketResponse
from .support_tier import SupportTier
from .surface_area import SurfaceArea
from .system import System
from .take_snapshot import TakeSnapshot
@ -195,12 +237,19 @@ 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_payment_balance import UpdatePaymentBalance
from .update_user import UpdateUser
from .user import User
from .user_org_info import UserOrgInfo
from .user_org_role import UserOrgRole
from .user_results_page import UserResultsPage
from .uuid import Uuid
from .verification_token import VerificationToken
from .verification_token_response import VerificationTokenResponse
from .volume import Volume
from .web_socket_request import WebSocketRequest
from .web_socket_response import WebSocketResponse
from .zoo_product_subscription import ZooProductSubscription
from .zoo_product_subscriptions import ZooProductSubscriptions
from .zoo_product_subscriptions_org_request import ZooProductSubscriptionsOrgRequest
from .zoo_product_subscriptions_user_request import ZooProductSubscriptionsUserRequest
from .zoo_tool import ZooTool

View File

@ -4,12 +4,20 @@ from enum import Enum
class AccountProvider(str, Enum):
"""An account provider.""" # noqa: E501
"""# The Apple account provider. """ # noqa: E501
APPLE = "apple"
"""# The Discord account provider. """ # noqa: E501
DISCORD = "discord"
"""# The Google account provider. """ # noqa: E501
GOOGLE = "google"
"""# The GitHub account provider. """ # noqa: E501
GITHUB = "github"
"""# The Microsoft account provider. """ # noqa: E501
MICROSOFT = "microsoft"
"""# The SAML account provider. """ # noqa: E501
SAML = "saml"
"""# The Tencent QQ account provider. """ # noqa: E501
TENCENT = "tencent"
def __str__(self) -> str:
return str(self.value)

View File

@ -1,7 +1,7 @@
from pydantic import BaseModel, ConfigDict
from ..models.org_role import OrgRole
from ..models.user_org_role import UserOrgRole
class AddOrgMember(BaseModel):
@ -9,6 +9,6 @@ class AddOrgMember(BaseModel):
email: str
role: OrgRole
role: UserOrgRole
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,18 @@
from typing import Optional
from pydantic import BaseModel, ConfigDict
class AuthCallback(BaseModel):
"""The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating."""
code: Optional[str] = None
id_token: Optional[str] = None
state: Optional[str] = None
user: Optional[str] = None
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,12 @@
from pydantic import BaseModel, ConfigDict
from ..models.camera_settings import CameraSettings
class CameraDragEnd(BaseModel):
"""The response from the `CameraDragEnd` command."""
settings: CameraSettings
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,12 @@
from pydantic import BaseModel, ConfigDict
from ..models.camera_settings import CameraSettings
class CameraDragMove(BaseModel):
"""The response from the `CameraDragMove` command. Note this is an \"unreliable\" channel message, so this data may need more data like a \"sequence\" """
settings: CameraSettings
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,23 @@
from typing import Optional
from pydantic import BaseModel, ConfigDict
from ..models.point3d import Point3d
class CameraSettings(BaseModel):
"""Camera settings including position, center, fov etc"""
center: Point3d
fov_y: Optional[float] = None
ortho: bool
ortho_scale: Optional[float] = None
pos: Point3d
up: Point3d
model_config = ConfigDict(protected_namespaces=())

View File

@ -10,7 +10,7 @@ class CodeOutput(BaseModel):
<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>
```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

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
class Customer(BaseModel):
"""The resource representing a payment "Customer"."""
"""The resource representing a payment \"Customer\"."""
address: Optional[AddressDetails] = None

View File

@ -1,8 +1,11 @@
import datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict
from ..models.subscription_tier_price import SubscriptionTierPrice
from ..models.uuid import Uuid
from ..models.zoo_product_subscriptions import ZooProductSubscriptions
class CustomerBalance(BaseModel):
@ -16,12 +19,18 @@ class CustomerBalance(BaseModel):
map_id: Uuid
modeling_app_enterprise_price: Optional[SubscriptionTierPrice] = None
monthly_credits_remaining: float
pre_pay_cash_remaining: float
pre_pay_credits_remaining: float
subscription_details: Optional[ZooProductSubscriptions] = None
subscription_id: Optional[str] = None
total_due: float
updated_at: datetime.datetime

View File

@ -0,0 +1,12 @@
from pydantic import BaseModel, ConfigDict
from ..models.camera_settings import CameraSettings
class DefaultCameraGetSettings(BaseModel):
"""The response from the `DefaultCameraGetSettings` command."""
settings: CameraSettings
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,12 @@
from pydantic import BaseModel, ConfigDict
from ..models.camera_settings import CameraSettings
class DefaultCameraZoom(BaseModel):
"""The response from the `DefaultCameraZoom` command."""
settings: CameraSettings
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,14 @@
from pydantic import BaseModel, ConfigDict
from .base64data import Base64Data
class DerEncodedKeyPair(BaseModel):
"""The DER encoded key pair."""
private_key: Base64Data
public_cert: Base64Data
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,17 @@
import datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict
class DiscountCode(BaseModel):
"""A discount code for a store."""
code: str
expires_at: Optional[datetime.datetime] = None
percent_off: int
model_config = ConfigDict(protected_namespaces=())

View File

@ -0,0 +1,12 @@
from typing import List
from pydantic import BaseModel, ConfigDict
class EntityCircularPattern(BaseModel):
"""The response from the `EntityCircularPattern` command."""
entity_ids: List[str]
model_config = ConfigDict(protected_namespaces=())

View File

@ -1,13 +1,14 @@
from pydantic import BaseModel, ConfigDict
from ..models.length_unit import LengthUnit
class EntityGetDistance(BaseModel):
"""The response from the `EntitiesGetDistance` command."""
max_distance: float
max_distance: LengthUnit
min_distance: float
min_distance: LengthUnit
model_config = ConfigDict(protected_namespaces=())

View File

@ -15,6 +15,8 @@ class ExtendedUser(BaseModel):
block: Optional[BlockReason] = None
can_train_on_data: Optional[bool] = None
company: Optional[str] = None
created_at: datetime.datetime
@ -35,6 +37,8 @@ class ExtendedUser(BaseModel):
image: str
is_service_account: Optional[bool] = None
last_name: Optional[str] = None
mailchimp_id: Optional[str] = None

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