diff --git a/.github/workflows/update-spec-for-docs.yml b/.github/workflows/update-spec-for-docs.yml index a25b1cbe5..4613cb2fd 100644 --- a/.github/workflows/update-spec-for-docs.yml +++ b/.github/workflows/update-spec-for-docs.yml @@ -16,9 +16,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: '1.x' - name: make generate shell: bash run: | diff --git a/Makefile b/Makefile index f239ef3bf..dd07bca41 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ VERSION := $(shell toml get $(CURDIR)/pyproject.toml tool.poetry.version | jq -r generate: docker-image ## Generate the api client. docker run --rm -i $(DOCKER_FLAGS) \ --name python-generator \ + --disable-content-trust \ -v $(CURDIR):/usr/src \ --workdir /usr/src \ $(DOCKER_IMAGE_NAME) sh -c 'poetry run python generate/generate.py && poetry run autopep8 --in-place --aggressive --aggressive kittycad/models/*.py && poetry run autopep8 --in-place --aggressive --aggressive kittycad/api/*.py && poetry run autopep8 --in-place --aggressive --aggressive kittycad/*.py && poetry run autopep8 --in-place --aggressive --aggressive generate/*.py' diff --git a/generate/generate.py b/generate/generate.py index a158e1aa2..6ab7c9e22 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -714,6 +714,14 @@ def generateType(path: str, name: str, schema: dict): "\t" + property_name + ": Union[Unset, str] = UNSET\n") + elif property_type == 'object': + if 'additionalProperties' in property_schema: + return generateType( + path, property_name, property_schema['additionalProperties']) + else: + print(" property type: ", property_type) + print(" property schema: ", property_schema) + raise Exception(" unknown type: ", property_type) elif property_type == 'integer': f.write( "\t" + @@ -735,23 +743,31 @@ def generateType(path: str, name: str, schema: dict): property_type = property_schema['items']['$ref'] property_type = property_type.replace( '#/components/schemas/', '') - f.write( - "\tfrom ..models import " + - property_type + - "\n") - f.write( - "\t" + - property_name + - ": Union[Unset, List[" + - property_type + - "]] = UNSET\n") + elif 'type' in property_schema['items']: + if property_schema['items']['type'] == 'string': + property_type = 'str' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") else: print(" array: ", [property_schema]) print(" array: ", [property_schema['items']]) raise Exception("Unknown array type") + + f.write( + "\tfrom ..models import " + + property_type + + "\n") + f.write( + "\t" + + property_name + + ": Union[Unset, List[" + + property_type + + "]] = UNSET\n") else: raise Exception("Unknown array type") else: + print(" property type: ", property_type) raise Exception(" unknown type: ", property_type) elif '$ref' in property_schema: ref = property_schema['$ref'].replace( @@ -843,28 +859,37 @@ def generateType(path: str, name: str, schema: dict): property_type = property_schema['items']['$ref'] property_type = property_type.replace( '#/components/schemas/', '') - f.write( - "\t\tfrom ..models import " + - property_type + - "\n") - f.write( - "\t\t" + - property_name + - ": Union[Unset, List[" + - property_type + - "]] = UNSET\n") - f.write( - "\t\tif not isinstance(self." + property_name + ", Unset):\n") - f.write( - "\t\t\t" + - property_name + - " = self." + - property_name + - "\n") + elif 'type' in property_schema['items']: + if property_schema['items']['type'] == 'string': + property_type = 'str' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") else: print(" array: ", [property_schema]) print(" array: ", [property_schema['items']]) raise Exception("Unknown array type") + + f.write( + "\t\tfrom ..models import " + + property_type + + "\n") + f.write( + "\t\t" + + property_name + + ": Union[Unset, List[" + + property_type + + "]] = UNSET\n") + f.write( + "\t\tif not isinstance(self." + + property_name + + ", Unset):\n") + f.write( + "\t\t\t" + + property_name + + " = self." + + property_name + + "\n") else: raise Exception(" unknown type: ", property_type) elif '$ref' in property_schema: @@ -1001,21 +1026,29 @@ def generateType(path: str, name: str, schema: dict): property_type = property_schema['items']['$ref'] property_type = property_type.replace( '#/components/schemas/', '') - f.write( - "\t\tfrom ..models import " + - property_type + - "\n") - f.write( - "\t\t" + - property_name + - " = cast(List[" + property_type + "], d.pop(\"" + - property_name + - "\", UNSET))\n") - f.write("\n") + elif 'type' in property_schema['items']: + if property_schema['items']['type'] == 'string': + property_type = 'str' + else: + raise Exception( + " unknown array type: ", + property_schema['items']['type']) else: print(" array: ", [property_schema]) print(" array: ", [property_schema['items']]) raise Exception("Unknown array type") + + f.write( + "\t\tfrom ..models import " + + property_type + + "\n") + f.write( + "\t\t" + + property_name + + " = cast(List[" + property_type + "], d.pop(\"" + + property_name + + "\", UNSET))\n") + f.write("\n") else: print(" unknown type: ", property_type) raise Exception(" unknown type: ", property_type) @@ -1172,13 +1205,22 @@ def getRefs(schema: dict) -> [str]: else: type_name = schema['type'] if type_name == 'object': - # Iternate over the properties. - for property_name in schema['properties']: - property_schema = schema['properties'][property_name] - schema_refs = getRefs(property_schema) + if 'properties' in schema: + # Iternate over the properties. + for property_name in schema['properties']: + property_schema = schema['properties'][property_name] + schema_refs = getRefs(property_schema) + for ref in schema_refs: + if ref not in refs: + refs.append(ref) + elif 'additionalProperties' in schema: + schema_refs = getRefs(schema['additionalProperties']) for ref in schema_refs: if ref not in refs: refs.append(ref) + else: + print(" unsupported type: ", schema) + raise Exception(" unsupported type: ", schema) return refs diff --git a/kittycad/api/file/list_file_conversions.py b/kittycad/api/file/list_file_conversions.py index 6a0a3184a..78c5d323f 100644 --- a/kittycad/api/file/list_file_conversions.py +++ b/kittycad/api/file/list_file_conversions.py @@ -6,16 +6,18 @@ from ...client import Client from ...models.file_conversion_results_page import FileConversionResultsPage from ...models.error import Error from ...models.created_at_sort_mode import CreatedAtSortMode +from ...models.file_conversion_status import FileConversionStatus from ...types import Response def _get_kwargs( limit: int, page_token: str, sort_by: CreatedAtSortMode, + status: FileConversionStatus, *, client: Client, ) -> Dict[str, Any]: - url = "{}/file/conversions".format(client.base_url, limit=limit, page_token=page_token, sort_by=sort_by) + url = "{}/file/conversions".format(client.base_url, limit=limit, page_token=page_token, sort_by=sort_by, status=status) headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -54,6 +56,7 @@ def sync_detailed( limit: int, page_token: str, sort_by: CreatedAtSortMode, + status: FileConversionStatus, *, client: Client, ) -> Response[Union[Any, FileConversionResultsPage, Error]]: @@ -61,6 +64,7 @@ def sync_detailed( limit=limit, page_token=page_token, sort_by=sort_by, + status=status, client=client, ) @@ -76,6 +80,7 @@ def sync( limit: int, page_token: str, sort_by: CreatedAtSortMode, + status: FileConversionStatus, *, client: Client, ) -> Optional[Union[Any, FileConversionResultsPage, Error]]: @@ -86,6 +91,7 @@ This endpoint requires authentication by a KittyCAD employee. """ limit=limit, page_token=page_token, sort_by=sort_by, + status=status, client=client, ).parsed @@ -94,6 +100,7 @@ async def asyncio_detailed( limit: int, page_token: str, sort_by: CreatedAtSortMode, + status: FileConversionStatus, *, client: Client, ) -> Response[Union[Any, FileConversionResultsPage, Error]]: @@ -101,6 +108,7 @@ async def asyncio_detailed( limit=limit, page_token=page_token, sort_by=sort_by, + status=status, client=client, ) @@ -114,6 +122,7 @@ async def asyncio( limit: int, page_token: str, sort_by: CreatedAtSortMode, + status: FileConversionStatus, *, client: Client, ) -> Optional[Union[Any, FileConversionResultsPage, Error]]: @@ -125,6 +134,7 @@ This endpoint requires authentication by a KittyCAD employee. """ limit=limit, page_token=page_token, sort_by=sort_by, + status=status, client=client, ) ).parsed diff --git a/kittycad/api/meta/get_metadata.py b/kittycad/api/meta/get_metadata.py new file mode 100644 index 000000000..28b866199 --- /dev/null +++ b/kittycad/api/meta/get_metadata.py @@ -0,0 +1,102 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.metadata import Metadata +from ...models.error import Error +from ...types import Response + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/_meta/info".format(client.base_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[Union[Any, Metadata, Error]]: + if response.status_code == 200: + response_200 = Metadata.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return None + + +def _build_response(*, response: httpx.Response) -> Response[Union[Any, Metadata, 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[Union[Any, Metadata, 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[Any, Metadata, Error]]: + """ This includes information on any of our other distributed systems it is connected to. +You must be a KittyCAD employee to perform this request. """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Union[Any, Metadata, 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[Any, Metadata, Error]]: + """ This includes information on any of our other distributed systems it is connected to. +You must be a KittyCAD employee to perform this request. """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/kittycad/api/sessions/__init__.py b/kittycad/api/sessions/__init__.py new file mode 100644 index 000000000..607579257 --- /dev/null +++ b/kittycad/api/sessions/__init__.py @@ -0,0 +1 @@ +""" Contains methods for accessing the sessions API paths: Sessions allow users to call the API from their session cookie in the browser. """ diff --git a/kittycad/api/sessions/get_session_for_user.py b/kittycad/api/sessions/get_session_for_user.py new file mode 100644 index 000000000..ce8a3a008 --- /dev/null +++ b/kittycad/api/sessions/get_session_for_user.py @@ -0,0 +1,109 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.session import Session +from ...models.error import Error +from ...types import Response + +def _get_kwargs( + token: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/user/session/{token}".format(client.base_url, token=token) + + 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[Any, Session, Error]]: + if response.status_code == 200: + response_200 = Session.from_dict(response.json()) + return response_200 + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return None + + +def _build_response(*, response: httpx.Response) -> Response[Union[Any, Session, 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[Union[Any, Session, 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[Any, Session, Error]]: + """ This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user. """ + + return sync_detailed( + token=token, + client=client, + ).parsed + + +async def asyncio_detailed( + token: str, + *, + client: Client, +) -> Response[Union[Any, Session, 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[Any, Session, Error]]: + """ This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user. """ + + return ( + await asyncio_detailed( + token=token, + client=client, + ) + ).parsed diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 9acc855df..247a729f0 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -6,7 +6,10 @@ from .api_call_with_price import ApiCallWithPrice from .api_call_with_price_results_page import ApiCallWithPriceResultsPage from .api_token import ApiToken from .api_token_results_page import ApiTokenResultsPage +from .cluster import Cluster from .created_at_sort_mode import CreatedAtSortMode +from .duration import Duration +from .engine_metadata import EngineMetadata from .error import Error from .extended_user import ExtendedUser from .extended_user_results_page import ExtendedUserResultsPage @@ -16,8 +19,19 @@ from .file_conversion_results_page import FileConversionResultsPage from .file_conversion_source_format import FileConversionSourceFormat from .file_conversion_status import FileConversionStatus from .file_conversion_with_output import FileConversionWithOutput +from .file_system_metadata import FileSystemMetadata +from .gateway import Gateway +from .jetstream import Jetstream +from .jetstream_api_stats import JetstreamApiStats +from .jetstream_config import JetstreamConfig +from .jetstream_stats import JetstreamStats +from .leaf_node import LeafNode +from .meta_cluster_info import MetaClusterInfo +from .metadata import Metadata from .method import Method +from .nats_connection import NatsConnection from .pong import Pong +from .session import Session from .status_code import StatusCode from .user import User from .user_results_page import UserResultsPage diff --git a/kittycad/models/cluster.py b/kittycad/models/cluster.py new file mode 100644 index 000000000..191f5cc6b --- /dev/null +++ b/kittycad/models/cluster.py @@ -0,0 +1,94 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Cluster") + + +@attr.s(auto_attribs=True) +class Cluster: + """ """ + addr: Union[Unset, str] = UNSET + auth_timeout: Union[Unset, int] = UNSET + cluster_port: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + tls_timeout: Union[Unset, int] = UNSET + from ..models import str + urls: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + addr = self.addr + auth_timeout = self.auth_timeout + cluster_port = self.cluster_port + name = self.name + tls_timeout = self.tls_timeout + from ..models import str + urls: Union[Unset, List[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if addr is not UNSET: + field_dict['addr'] = addr + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if cluster_port is not UNSET: + field_dict['cluster_port'] = cluster_port + if name is not UNSET: + field_dict['name'] = name + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout + if urls is not UNSET: + field_dict['urls'] = urls + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + addr = d.pop("addr", UNSET) + + auth_timeout = d.pop("auth_timeout", UNSET) + + cluster_port = d.pop("cluster_port", UNSET) + + name = d.pop("name", UNSET) + + tls_timeout = d.pop("tls_timeout", UNSET) + + from ..models import str + urls = cast(List[str], d.pop("urls", UNSET)) + + cluster = cls( + addr=addr, + auth_timeout=auth_timeout, + cluster_port=cluster_port, + name=name, + tls_timeout=tls_timeout, + urls=urls, + ) + + cluster.additional_properties = d + return cluster + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/duration.py b/kittycad/models/duration.py new file mode 100644 index 000000000..6dbf872ac --- /dev/null +++ b/kittycad/models/duration.py @@ -0,0 +1,4 @@ +class Duration(int): + + def __int__(self) -> int: + return self diff --git a/kittycad/models/engine_metadata.py b/kittycad/models/engine_metadata.py new file mode 100644 index 000000000..6b19620e2 --- /dev/null +++ b/kittycad/models/engine_metadata.py @@ -0,0 +1,91 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.file_system_metadata import FileSystemMetadata +from ..models.nats_connection import NatsConnection +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EngineMetadata") + + +@attr.s(auto_attribs=True) +class EngineMetadata: + """ """ + async_jobs_running: Union[Unset, bool] = False + fs: Union[Unset, FileSystemMetadata] = UNSET + git_hash: Union[Unset, str] = UNSET + nats: Union[Unset, NatsConnection] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + async_jobs_running = self.async_jobs_running + fs: Union[Unset, str] = UNSET + if not isinstance(self.fs, Unset): + fs = self.fs.value + git_hash = self.git_hash + nats: Union[Unset, str] = UNSET + if not isinstance(self.nats, Unset): + nats = self.nats.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if async_jobs_running is not UNSET: + field_dict['async_jobs_running'] = async_jobs_running + if fs is not UNSET: + field_dict['fs'] = fs + if git_hash is not UNSET: + field_dict['git_hash'] = git_hash + if nats is not UNSET: + field_dict['nats'] = nats + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + async_jobs_running = d.pop("async_jobs_running", UNSET) + + _fs = d.pop("fs", UNSET) + fs: Union[Unset, FileSystemMetadata] + if isinstance(_fs, Unset): + fs = UNSET + else: + fs = FileSystemMetadata(_fs) + + git_hash = d.pop("git_hash", UNSET) + + _nats = d.pop("nats", UNSET) + nats: Union[Unset, NatsConnection] + if isinstance(_nats, Unset): + nats = UNSET + else: + nats = NatsConnection(_nats) + + engine_metadata = cls( + async_jobs_running=async_jobs_running, + fs=fs, + git_hash=git_hash, + nats=nats, + ) + + engine_metadata.additional_properties = d + return engine_metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_conversion_with_output.py b/kittycad/models/file_conversion_with_output.py index 5e5e3e78f..664eba176 100644 --- a/kittycad/models/file_conversion_with_output.py +++ b/kittycad/models/file_conversion_with_output.py @@ -24,6 +24,7 @@ class FileConversionWithOutput: src_format: Union[Unset, FileConversionSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET status: Union[Unset, FileConversionStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -51,6 +52,9 @@ class FileConversionWithOutput: status: Union[Unset, str] = UNSET if not isinstance(self.status, Unset): status = self.status.value + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() user_id = self.user_id field_dict: Dict[str, Any] = {} @@ -72,6 +76,8 @@ class FileConversionWithOutput: field_dict['started_at'] = started_at if status is not UNSET: field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at if user_id is not UNSET: field_dict['user_id'] = user_id @@ -131,6 +137,13 @@ class FileConversionWithOutput: else: status = FileConversionStatus(_status) + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + user_id = d.pop("user_id", UNSET) file_conversion_with_output = cls( @@ -142,6 +155,7 @@ class FileConversionWithOutput: src_format=src_format, started_at=started_at, status=status, + updated_at=updated_at, user_id=user_id, ) diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py new file mode 100644 index 000000000..6d9a96282 --- /dev/null +++ b/kittycad/models/file_system_metadata.py @@ -0,0 +1,54 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FileSystemMetadata") + + +@attr.s(auto_attribs=True) +class FileSystemMetadata: + """ """ + ok: Union[Unset, bool] = False + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + ok = self.ok + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ok is not UNSET: + field_dict['ok'] = ok + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + ok = d.pop("ok", UNSET) + + file_system_metadata = cls( + ok=ok, + ) + + file_system_metadata.additional_properties = d + return file_system_metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py new file mode 100644 index 000000000..3f8f15391 --- /dev/null +++ b/kittycad/models/gateway.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Gateway") + + +@attr.s(auto_attribs=True) +class Gateway: + """ """ + auth_timeout: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + tls_timeout: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + host = self.host + name = self.name + port = self.port + tls_timeout = self.tls_timeout + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if host is not UNSET: + field_dict['host'] = host + if name is not UNSET: + field_dict['name'] = name + if port is not UNSET: + field_dict['port'] = port + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) + + host = d.pop("host", UNSET) + + name = d.pop("name", UNSET) + + port = d.pop("port", UNSET) + + tls_timeout = d.pop("tls_timeout", UNSET) + + gateway = cls( + auth_timeout=auth_timeout, + host=host, + name=name, + port=port, + tls_timeout=tls_timeout, + ) + + gateway.additional_properties = d + return gateway + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/http_req_stats.py b/kittycad/models/http_req_stats.py new file mode 100644 index 000000000..34ba415aa --- /dev/null +++ b/kittycad/models/http_req_stats.py @@ -0,0 +1,4 @@ +class http_req_stats(int): + + def __int__(self) -> int: + return self diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py new file mode 100644 index 000000000..2beda9399 --- /dev/null +++ b/kittycad/models/jetstream.py @@ -0,0 +1,92 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.jetstream_config import JetstreamConfig +from ..models.meta_cluster_info import MetaClusterInfo +from ..models.jetstream_stats import JetstreamStats +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Jetstream") + + +@attr.s(auto_attribs=True) +class Jetstream: + """ """ + config: Union[Unset, JetstreamConfig] = UNSET + meta: Union[Unset, MetaClusterInfo] = UNSET + stats: Union[Unset, JetstreamStats] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + config: Union[Unset, str] = UNSET + if not isinstance(self.config, Unset): + config = self.config.value + meta: Union[Unset, str] = UNSET + if not isinstance(self.meta, Unset): + meta = self.meta.value + stats: Union[Unset, str] = UNSET + if not isinstance(self.stats, Unset): + stats = self.stats.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if config is not UNSET: + field_dict['config'] = config + if meta is not UNSET: + field_dict['meta'] = meta + if stats is not UNSET: + field_dict['stats'] = stats + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _config = d.pop("config", UNSET) + config: Union[Unset, JetstreamConfig] + if isinstance(_config, Unset): + config = UNSET + else: + config = JetstreamConfig(_config) + + _meta = d.pop("meta", UNSET) + meta: Union[Unset, MetaClusterInfo] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = MetaClusterInfo(_meta) + + _stats = d.pop("stats", UNSET) + stats: Union[Unset, JetstreamStats] + if isinstance(_stats, Unset): + stats = UNSET + else: + stats = JetstreamStats(_stats) + + jetstream = cls( + config=config, + meta=meta, + stats=stats, + ) + + jetstream.additional_properties = d + return jetstream + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py new file mode 100644 index 000000000..6aa709987 --- /dev/null +++ b/kittycad/models/jetstream_api_stats.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="JetstreamApiStats") + + +@attr.s(auto_attribs=True) +class JetstreamApiStats: + """ """ + errors: Union[Unset, int] = UNSET + inflight: Union[Unset, int] = UNSET + total: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + errors = self.errors + inflight = self.inflight + total = self.total + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict['errors'] = errors + if inflight is not UNSET: + field_dict['inflight'] = inflight + if total is not UNSET: + field_dict['total'] = total + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + errors = d.pop("errors", UNSET) + + inflight = d.pop("inflight", UNSET) + + total = d.pop("total", UNSET) + + jetstream_api_stats = cls( + errors=errors, + inflight=inflight, + total=total, + ) + + jetstream_api_stats.additional_properties = d + return jetstream_api_stats + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py new file mode 100644 index 000000000..193f61b71 --- /dev/null +++ b/kittycad/models/jetstream_config.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="JetstreamConfig") + + +@attr.s(auto_attribs=True) +class JetstreamConfig: + """ """ + domain: Union[Unset, str] = UNSET + max_memory: Union[Unset, int] = UNSET + max_storage: Union[Unset, int] = UNSET + store_dir: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + domain = self.domain + max_memory = self.max_memory + max_storage = self.max_storage + store_dir = self.store_dir + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if domain is not UNSET: + field_dict['domain'] = domain + if max_memory is not UNSET: + field_dict['max_memory'] = max_memory + if max_storage is not UNSET: + field_dict['max_storage'] = max_storage + if store_dir is not UNSET: + field_dict['store_dir'] = store_dir + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + domain = d.pop("domain", UNSET) + + max_memory = d.pop("max_memory", UNSET) + + max_storage = d.pop("max_storage", UNSET) + + store_dir = d.pop("store_dir", UNSET) + + jetstream_config = cls( + domain=domain, + max_memory=max_memory, + max_storage=max_storage, + store_dir=store_dir, + ) + + jetstream_config.additional_properties = d + return jetstream_config + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py new file mode 100644 index 000000000..df1844052 --- /dev/null +++ b/kittycad/models/jetstream_stats.py @@ -0,0 +1,104 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.jetstream_api_stats import JetstreamApiStats +from ..types import UNSET, Unset + +T = TypeVar("T", bound="JetstreamStats") + + +@attr.s(auto_attribs=True) +class JetstreamStats: + """ """ + accounts: Union[Unset, int] = UNSET + api: Union[Unset, JetstreamApiStats] = UNSET + ha_assets: Union[Unset, int] = UNSET + memory: Union[Unset, int] = UNSET + reserved_memory: Union[Unset, int] = UNSET + reserved_store: Union[Unset, int] = UNSET + store: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + accounts = self.accounts + api: Union[Unset, str] = UNSET + if not isinstance(self.api, Unset): + api = self.api.value + ha_assets = self.ha_assets + memory = self.memory + reserved_memory = self.reserved_memory + reserved_store = self.reserved_store + store = self.store + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if accounts is not UNSET: + field_dict['accounts'] = accounts + if api is not UNSET: + field_dict['api'] = api + if ha_assets is not UNSET: + field_dict['ha_assets'] = ha_assets + if memory is not UNSET: + field_dict['memory'] = memory + if reserved_memory is not UNSET: + field_dict['reserved_memory'] = reserved_memory + if reserved_store is not UNSET: + field_dict['reserved_store'] = reserved_store + if store is not UNSET: + field_dict['store'] = store + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + accounts = d.pop("accounts", UNSET) + + _api = d.pop("api", UNSET) + api: Union[Unset, JetstreamApiStats] + if isinstance(_api, Unset): + api = UNSET + else: + api = JetstreamApiStats(_api) + + ha_assets = d.pop("ha_assets", UNSET) + + memory = d.pop("memory", UNSET) + + reserved_memory = d.pop("reserved_memory", UNSET) + + reserved_store = d.pop("reserved_store", UNSET) + + store = d.pop("store", UNSET) + + jetstream_stats = cls( + accounts=accounts, + api=api, + ha_assets=ha_assets, + memory=memory, + reserved_memory=reserved_memory, + reserved_store=reserved_store, + store=store, + ) + + jetstream_stats.additional_properties = d + return jetstream_stats + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py new file mode 100644 index 000000000..f597ea6ae --- /dev/null +++ b/kittycad/models/leaf_node.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LeafNode") + + +@attr.s(auto_attribs=True) +class LeafNode: + """ """ + auth_timeout: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + tls_timeout: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + host = self.host + port = self.port + tls_timeout = self.tls_timeout + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if host is not UNSET: + field_dict['host'] = host + if port is not UNSET: + field_dict['port'] = port + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) + + host = d.pop("host", UNSET) + + port = d.pop("port", UNSET) + + tls_timeout = d.pop("tls_timeout", UNSET) + + leaf_node = cls( + auth_timeout=auth_timeout, + host=host, + port=port, + tls_timeout=tls_timeout, + ) + + leaf_node.additional_properties = d + return leaf_node + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py new file mode 100644 index 000000000..af0c16dd8 --- /dev/null +++ b/kittycad/models/meta_cluster_info.py @@ -0,0 +1,68 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MetaClusterInfo") + + +@attr.s(auto_attribs=True) +class MetaClusterInfo: + """ """ + cluster_size: Union[Unset, int] = UNSET + leader: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cluster_size = self.cluster_size + leader = self.leader + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_size is not UNSET: + field_dict['cluster_size'] = cluster_size + if leader is not UNSET: + field_dict['leader'] = leader + if name is not UNSET: + field_dict['name'] = name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cluster_size = d.pop("cluster_size", UNSET) + + leader = d.pop("leader", UNSET) + + name = d.pop("name", UNSET) + + meta_cluster_info = cls( + cluster_size=cluster_size, + leader=leader, + name=name, + ) + + meta_cluster_info.additional_properties = d + return meta_cluster_info + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py new file mode 100644 index 000000000..f159f9228 --- /dev/null +++ b/kittycad/models/metadata.py @@ -0,0 +1,99 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.engine_metadata import EngineMetadata +from ..models.file_system_metadata import FileSystemMetadata +from ..models.nats_connection import NatsConnection +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Metadata") + + +@attr.s(auto_attribs=True) +class Metadata: + """ """ + engine: Union[Unset, EngineMetadata] = UNSET + fs: Union[Unset, FileSystemMetadata] = UNSET + git_hash: Union[Unset, str] = UNSET + nats: Union[Unset, NatsConnection] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + engine: Union[Unset, str] = UNSET + if not isinstance(self.engine, Unset): + engine = self.engine.value + fs: Union[Unset, str] = UNSET + if not isinstance(self.fs, Unset): + fs = self.fs.value + git_hash = self.git_hash + nats: Union[Unset, str] = UNSET + if not isinstance(self.nats, Unset): + nats = self.nats.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if engine is not UNSET: + field_dict['engine'] = engine + if fs is not UNSET: + field_dict['fs'] = fs + if git_hash is not UNSET: + field_dict['git_hash'] = git_hash + if nats is not UNSET: + field_dict['nats'] = nats + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _engine = d.pop("engine", UNSET) + engine: Union[Unset, EngineMetadata] + if isinstance(_engine, Unset): + engine = UNSET + else: + engine = EngineMetadata(_engine) + + _fs = d.pop("fs", UNSET) + fs: Union[Unset, FileSystemMetadata] + if isinstance(_fs, Unset): + fs = UNSET + else: + fs = FileSystemMetadata(_fs) + + git_hash = d.pop("git_hash", UNSET) + + _nats = d.pop("nats", UNSET) + nats: Union[Unset, NatsConnection] + if isinstance(_nats, Unset): + nats = UNSET + else: + nats = NatsConnection(_nats) + + metadata = cls( + engine=engine, + fs=fs, + git_hash=git_hash, + nats=nats, + ) + + metadata.additional_properties = d + return metadata + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/nats_connection.py b/kittycad/models/nats_connection.py new file mode 100644 index 000000000..053eab017 --- /dev/null +++ b/kittycad/models/nats_connection.py @@ -0,0 +1,33 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.cluster import Cluster +from ..models.gateway import Gateway +from ..models.jetstream import Jetstream +from ..models.leaf_node import LeafNode +from ..models.duration import Duration +from ..types import UNSET, Unset + +T = TypeVar("T", bound="NatsConnection") + + +@attr.s(auto_attribs=True) +class NatsConnection: + """ """ + auth_timeout: Union[Unset, int] = UNSET + cluster: Union[Unset, Cluster] = UNSET + config_load_time: Union[Unset, datetime.datetime] = UNSET + connections: Union[Unset, int] = UNSET + cores: Union[Unset, int] = UNSET + cpu: Union[Unset, int] = UNSET + gateway: Union[Unset, Gateway] = UNSET + git_commit: Union[Unset, str] = UNSET + go: Union[Unset, str] = UNSET + gomaxprocs: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + http_base_path: Union[Unset, str] = UNSET + http_host: Union[Unset, str] = UNSET + http_port: Union[Unset, int] = UNSET diff --git a/kittycad/models/session.py b/kittycad/models/session.py new file mode 100644 index 000000000..d3fec1dc0 --- /dev/null +++ b/kittycad/models/session.py @@ -0,0 +1,120 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..models.uuid import Uuid +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Session") + + +@attr.s(auto_attribs=True) +class Session: + """ """ + created_at: Union[Unset, datetime.datetime] = UNSET + expires: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + session_token: Union[Unset, Uuid] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + expires: Union[Unset, str] = UNSET + if not isinstance(self.expires, Unset): + expires = self.expires.isoformat() + id = self.id + session_token: Union[Unset, str] = UNSET + if not isinstance(self.session_token, Unset): + session_token = self.session_token.value + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict['created_at'] = created_at + if expires is not UNSET: + field_dict['expires'] = expires + if id is not UNSET: + field_dict['id'] = id + if session_token is not UNSET: + field_dict['session_token'] = session_token + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _expires = d.pop("expires", UNSET) + expires: Union[Unset, datetime.datetime] + if isinstance(_expires, Unset): + expires = UNSET + else: + expires = isoparse(_expires) + + id = d.pop("id", UNSET) + + _session_token = d.pop("session_token", UNSET) + session_token: Union[Unset, Uuid] + if isinstance(_session_token, Unset): + session_token = UNSET + else: + session_token = Uuid(_session_token) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + user_id = d.pop("user_id", UNSET) + + session = cls( + created_at=created_at, + expires=expires, + id=id, + session_token=session_token, + updated_at=updated_at, + user_id=user_id, + ) + + session.additional_properties = d + return session + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/spec.json b/spec.json index 370a345cc..39512e436 100644 --- a/spec.json +++ b/spec.json @@ -1,3508 +1,4037 @@ { - "components": { - "responses": { - "Error": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "description": "Error" - } - }, - "schemas": { - "ApiCallQueryGroup": { - "description": "A response for a query on the API call table that is grouped by something.", - "properties": { - "count": { - "format": "int64", - "type": "integer" - }, - "query": { - "type": "string" - } - }, - "required": [ - "count", - "query" - ], - "type": "object" - }, - "ApiCallQueryGroupBy": { - "description": "The field of an API call to group by.", - "enum": [ - "email", - "method", - "endpoint", - "user_id", - "origin", - "ip_address" - ], - "type": "string" - }, - "ApiCallWithPrice": { - "description": "An API call with the price.\n\nThis is a join of the `APICall` and `APICallPrice` tables.", - "properties": { - "completed_at": { - "description": "The date and time the API call completed billing.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The date and time the API call was created.", - "format": "partial-date-time", - "type": "string" - }, - "duration": { - "description": "The duration of the API call.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "email": { - "description": "The user's email address.", - "type": "string" - }, - "endpoint": { - "description": "The endpoint requested by the API call.", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier for the API call." - }, - "ip_address": { - "description": "The ip address of the origin.", - "type": "string" - }, - "method": { - "allOf": [ - { - "$ref": "#/components/schemas/Method" - } - ], - "description": "The HTTP method requsted by the API call." - }, - "minutes": { - "description": "The number of minutes the API call was billed for.", - "format": "int32", - "nullable": true, - "type": "integer" - }, - "origin": { - "description": "The origin of the API call.", - "type": "string" - }, - "price": { - "description": "The price of the API call.", - "nullable": true, - "type": "number" - }, - "request_body": { - "description": "The request body sent by the API call.", - "nullable": true, - "type": "string" - }, - "request_query_params": { - "description": "The request query params sent by the API call.", - "type": "string" - }, - "response_body": { - "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", - "nullable": true, - "type": "string" - }, - "started_at": { - "description": "The date and time the API call started billing.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status_code": { - "allOf": [ - { - "$ref": "#/components/schemas/StatusCode" - } - ], - "description": "The status code returned by the API call.", - "nullable": true - }, - "stripe_invoice_item_id": { - "description": "The Stripe invoice item ID of the API call if it is billable.", - "type": "string" - }, - "token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The API token that made the API call." - }, - "updated_at": { - "description": "The date and time the API call was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_agent": { - "description": "The user agent of the request.", - "type": "string" - }, - "user_id": { - "description": "The ID of the user that made the API call.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "method", - "token", - "updated_at", - "user_agent" - ], - "type": "object" - }, - "ApiCallWithPriceResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ApiCallWithPrice" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "ApiToken": { - "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", - "properties": { - "created_at": { - "description": "The date and time the API token was created.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "description": "The unique identifier for the API token.", - "type": "string" - }, - "is_valid": { - "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", - "type": "boolean" - }, - "token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The API token itself." - }, - "updated_at": { - "description": "The date and time the API token was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The ID of the user that owns the API token.", - "type": "string" - } - }, - "required": [ - "created_at", - "is_valid", - "token", - "updated_at" - ], - "type": "object" - }, - "ApiTokenResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ApiToken" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "Cluster": { - "description": "Cluster information.", - "properties": { - "addr": { - "description": "The IP address of the cluster.", - "format": "ip", - "type": "string" - }, - "auth_timeout": { - "description": "The auth timeout of the cluster.", - "format": "int64", - "type": "integer" - }, - "cluster_port": { - "description": "The port of the cluster.", - "format": "int64", - "type": "integer" - }, - "name": { - "description": "The name of the cluster.", - "type": "string" - }, - "tls_timeout": { - "description": "The TLS timeout for the cluster.", - "format": "int64", - "type": "integer" - }, - "urls": { - "description": "The urls of the cluster.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "addr" - ], - "type": "object" - }, - "CreatedAtSortMode": { - "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", - "enum": [ - "created-at-ascending", - "created-at-descending" - ], - "type": "string" - }, - "Duration": { - "format": "int64", - "title": "int64", - "type": "integer" - }, - "EngineMetadata": { - "description": "Metadata about an engine API instance.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "async_jobs_running": { - "description": "If any async job is currently running.", - "type": "boolean" - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "nats": { - "allOf": [ - { - "$ref": "#/components/schemas/NatsConnection" - } - ], - "description": "Metadata about our nats.io connection." - } - }, - "required": [ - "async_jobs_running", - "fs", - "git_hash", - "nats" - ], - "type": "object" - }, - "Error": { - "description": "Error information from a response.", - "properties": { - "error_code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "request_id": { - "type": "string" - } - }, - "required": [ - "message", - "request_id" - ], - "type": "object" - }, - "ExtendedUser": { - "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "format": "partial-date-time", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "type": "string" - }, - "email_verified": { - "description": "The date and time the email address was verified.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the user.", - "type": "string" - }, - "image": { - "description": "The image avatar for the user. This is a URL.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "mailchimp_id": { - "description": "The user's MailChimp ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - }, - "name": { - "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", - "type": "string" - }, - "phone": { - "description": "The user's phone number.", - "type": "string" - }, - "stripe_id": { - "description": "The user's Stripe ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "zendesk_id": { - "description": "The user's Zendesk ID. This is mostly used for internal mapping.", - "nullable": true, - "type": "string" - } - }, - "required": [ - "created_at", - "updated_at" - ], - "type": "object" - }, - "ExtendedUserResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/ExtendedUser" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "FileConversion": { - "description": "A file conversion.\n\nFor now, in the database, we only store the file conversions if we performed it asynchronously.", - "properties": { - "completed_at": { - "description": "The time and date the file conversion was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." - }, - "output_file_link": { - "description": "The link to the file conversion output in our blob storage.", - "type": "string" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileConversionOutputFormat" - } - ], - "description": "The output format of the file conversion." - }, - "src_file_link": { - "description": "The link to the file conversion source in our blob storage.", - "type": "string" - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileConversionSourceFormat" - } - ], - "description": "The source format of the file conversion." - }, - "started_at": { - "description": "The time and date the file conversion was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/FileConversionStatus" - } - ], - "description": "The status of the file conversion." - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the file conversion.", - "type": "string" - }, - "worker": { - "description": "The worker node that is performing or performed the file conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileConversionOutputFormat": { - "description": "The valid types of output file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx", - "fbxb" - ], - "type": "string" - }, - "FileConversionResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/FileConversion" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "FileConversionSourceFormat": { - "description": "The valid types of source file formats.", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx" - ], - "type": "string" - }, - "FileConversionStatus": { - "description": "The status of a file conversion.", - "enum": [ - "Queued", - "Uploaded", - "In Progress", - "Completed", - "Failed" - ], - "type": "string" - }, - "FileConversionWithOutput": { - "description": "A file conversion as we ouput it to the user.", - "properties": { - "completed_at": { - "description": "The time and date the file conversion was completed.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." - }, - "output": { - "description": "The converted file, if completed, base64 encoded. If the conversion failed, this field will show any errors.", - "type": "string" - }, - "output_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileConversionOutputFormat" - } - ], - "description": "The output format of the file conversion." - }, - "src_format": { - "allOf": [ - { - "$ref": "#/components/schemas/FileConversionSourceFormat" - } - ], - "description": "The source format of the file conversion." - }, - "started_at": { - "description": "The time and date the file conversion was started.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/FileConversionStatus" - } - ], - "description": "The status of the file conversion." - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user who created the file conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ], - "type": "object" - }, - "FileSystemMetadata": { - "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "ok": { - "description": "If the file system passed a sanity check.", - "type": "boolean" - } - }, - "required": [ - "ok" - ], - "type": "object" - }, - "Gateway": { - "description": "Gateway information.", - "properties": { - "auth_timeout": { - "description": "The auth timeout of the gateway.", - "format": "int64", - "type": "integer" - }, - "host": { - "description": "The host of the gateway.", - "type": "string" - }, - "name": { - "description": "The name of the gateway.", - "type": "string" - }, - "port": { - "description": "The port of the gateway.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "description": "The TLS timeout for the gateway.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "Jetstream": { - "description": "Jetstream information.", - "properties": { - "config": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamConfig" - } - ], - "description": "The Jetstream config." - }, - "meta": { - "allOf": [ - { - "$ref": "#/components/schemas/MetaClusterInfo" - } - ], - "description": "Meta information about the cluster." - }, - "stats": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamStats" - } - ], - "description": "Jetstream statistics." - } - }, - "type": "object" - }, - "JetstreamApiStats": { - "description": "Jetstream API statistics.", - "properties": { - "errors": { - "description": "The number of errors.", - "format": "int64", - "type": "integer" - }, - "inflight": { - "description": "The number of inflight requests.", - "format": "int64", - "type": "integer" - }, - "total": { - "description": "The number of requests.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "JetstreamConfig": { - "description": "Jetstream configuration.", - "properties": { - "domain": { - "description": "The domain.", - "type": "string" - }, - "max_memory": { - "description": "The max memory.", - "format": "int64", - "type": "integer" - }, - "max_storage": { - "description": "The max storage.", - "format": "int64", - "type": "integer" - }, - "store_dir": { - "description": "The store directory.", - "type": "string" - } - }, - "type": "object" - }, - "JetstreamStats": { - "description": "Jetstream statistics.", - "properties": { - "accounts": { - "description": "The number of accounts.", - "format": "int64", - "type": "integer" - }, - "api": { - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamApiStats" - } - ], - "description": "API stats." - }, - "ha_assets": { - "description": "The number of HA assets.", - "format": "int64", - "type": "integer" - }, - "memory": { - "description": "The memory used by the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "reserved_memory": { - "description": "The reserved memory for the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "reserved_store": { - "description": "The reserved storage for the Jetstream server.", - "format": "int64", - "type": "integer" - }, - "store": { - "description": "The storage used by the Jetstream server.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "LeafNode": { - "description": "Leaf node information.", - "properties": { - "auth_timeout": { - "description": "The auth timeout of the leaf node.", - "format": "int64", - "type": "integer" - }, - "host": { - "description": "The host of the leaf node.", - "type": "string" - }, - "port": { - "description": "The port of the leaf node.", - "format": "int64", - "type": "integer" - }, - "tls_timeout": { - "description": "The TLS timeout for the leaf node.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "MetaClusterInfo": { - "description": "Jetstream statistics.", - "properties": { - "cluster_size": { - "description": "The size of the cluster.", - "format": "int64", - "type": "integer" - }, - "leader": { - "description": "The leader of the cluster.", - "type": "string" - }, - "name": { - "description": "The name of the cluster.", - "type": "string" - } - }, - "type": "object" - }, - "Metadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "engine": { - "allOf": [ - { - "$ref": "#/components/schemas/EngineMetadata" - } - ], - "description": "Metadata about our engine API connection." - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "nats": { - "allOf": [ - { - "$ref": "#/components/schemas/NatsConnection" - } - ], - "description": "Metadata about our nats.io connection." - } - }, - "required": [ - "engine", - "fs", - "git_hash", - "nats" - ], - "type": "object" - }, - "Method": { - "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", - "enum": [ - "OPTIONS", - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "TRACE", - "CONNECT", - "PATCH", - "EXTENSION" - ], - "type": "string" - }, - "NatsConnection": { - "description": "Metadata about a nats.io connection.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "auth_timeout": { - "description": "The auth timeout of the server.", - "format": "int64", - "type": "integer" - }, - "cluster": { - "allOf": [ - { - "$ref": "#/components/schemas/Cluster" - } - ], - "description": "Information about the cluster." - }, - "config_load_time": { - "description": "The time the configuration was loaded.", - "format": "date-time", - "type": "string" - }, - "connections": { - "description": "The number of connections to the server.", - "format": "int64", - "type": "integer" - }, - "cores": { - "description": "The CPU core usage of the server.", - "format": "int64", - "type": "integer" - }, - "cpu": { - "description": "The CPU usage of the server.", - "format": "int64", - "type": "integer" - }, - "gateway": { - "allOf": [ - { - "$ref": "#/components/schemas/Gateway" - } - ], - "description": "Information about the gateway." - }, - "git_commit": { - "description": "The git commit.", - "type": "string" - }, - "go": { - "description": "The go version.", - "type": "string" - }, - "gomaxprocs": { - "description": "`GOMAXPROCS` of the server.", - "format": "int64", - "type": "integer" - }, - "host": { - "description": "The host of the server.", - "format": "ip", - "type": "string" - }, - "http_base_path": { - "description": "The http base path of the server.", - "type": "string" - }, - "http_host": { - "description": "The http host of the server.", - "type": "string" - }, - "http_port": { - "description": "The http port of the server.", - "format": "int64", - "type": "integer" - }, - "http_req_stats": { - "additionalProperties": { - "format": "int64", - "type": "integer" - }, - "description": "HTTP request statistics.", - "type": "object" - }, - "https_port": { - "description": "The https port of the server.", - "format": "int64", - "type": "integer" - }, - "id": { - "description": "The ID as known by the most recently connected server.", - "format": "uint64", - "minimum": 0, - "type": "integer" - }, - "in_bytes": { - "description": "The count of inbound bytes for the server.", - "format": "int64", - "type": "integer" - }, - "in_msgs": { - "description": "The number of inbound messages for the server.", - "format": "int64", - "type": "integer" - }, - "ip": { - "description": "The client IP as known by the most recently connected server.", - "format": "ip", - "type": "string" - }, - "jetstream": { - "allOf": [ - { - "$ref": "#/components/schemas/Jetstream" - } - ], - "description": "Jetstream information." - }, - "leaf": { - "allOf": [ - { - "$ref": "#/components/schemas/LeafNode" - } - ], - "description": "Information about leaf nodes." - }, - "leafnodes": { - "description": "The number of leaf nodes for the server.", - "format": "int64", - "type": "integer" - }, - "max_connections": { - "description": "The max connections of the server.", - "format": "int64", - "type": "integer" - }, - "max_control_line": { - "description": "The max control line of the server.", - "format": "int64", - "type": "integer" - }, - "max_payload": { - "description": "The max payload of the server.", - "format": "int64", - "type": "integer" - }, - "max_pending": { - "description": "The max pending of the server.", - "format": "int64", - "type": "integer" - }, - "mem": { - "description": "The memory usage of the server.", - "format": "int64", - "type": "integer" - }, - "now": { - "description": "The time now.", - "format": "date-time", - "type": "string" - }, - "out_bytes": { - "description": "The count of outbound bytes for the server.", - "format": "int64", - "type": "integer" - }, - "out_msgs": { - "description": "The number of outbound messages for the server.", - "format": "int64", - "type": "integer" - }, - "ping_interval": { - "description": "The ping interval of the server.", - "format": "int64", - "type": "integer" - }, - "ping_max": { - "description": "The ping max of the server.", - "format": "int64", - "type": "integer" - }, - "port": { - "description": "The port of the server.", - "format": "int64", - "type": "integer" - }, - "proto": { - "description": "The protocol version.", - "format": "int64", - "type": "integer" - }, - "remotes": { - "description": "The number of remotes for the server.", - "format": "int64", - "type": "integer" - }, - "routes": { - "description": "The number of routes for the server.", - "format": "int64", - "type": "integer" - }, - "rtt": { - "allOf": [ - { - "$ref": "#/components/schemas/Duration" - } - ], - "description": "The round trip time between this client and the server." - }, - "server_id": { - "description": "The server ID.", - "type": "string" - }, - "server_name": { - "description": "The server name.", - "type": "string" - }, - "slow_consumers": { - "description": "The number of slow consumers for the server.", - "format": "int64", - "type": "integer" - }, - "start": { - "description": "When the server was started.", - "format": "date-time", - "type": "string" - }, - "subscriptions": { - "description": "The number of subscriptions for the server.", - "format": "int64", - "type": "integer" - }, - "system_account": { - "description": "The system account.", - "type": "string" - }, - "tls_timeout": { - "description": "The TLS timeout of the server.", - "format": "int64", - "type": "integer" - }, - "total_connections": { - "description": "The total number of connections to the server.", - "format": "int64", - "type": "integer" - }, - "uptime": { - "description": "The uptime of the server.", - "type": "string" - }, - "version": { - "description": "The version of the service.", - "type": "string" - }, - "write_deadline": { - "description": "The write deadline of the server.", - "format": "int64", - "type": "integer" - } - }, - "required": [ - "cluster", - "config_load_time", - "host", - "http_req_stats", - "id", - "ip", - "now", - "rtt", - "start" - ], - "type": "object" - }, - "Pong": { - "description": "The response from the `/ping` endpoint.", - "properties": { - "message": { - "description": "The pong response.", - "type": "string" - } - }, - "required": [ - "message" - ], - "type": "object" - }, - "Session": { - "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", - "properties": { - "created_at": { - "description": "The date and time the session was created.", - "format": "partial-date-time", - "type": "string" - }, - "expires": { - "description": "The date and time the session expires.", - "format": "partial-date-time", - "type": "string" - }, - "id": { - "description": "The unique identifier for the session.", - "type": "string" - }, - "session_token": { - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ], - "description": "The session token." - }, - "updated_at": { - "description": "The date and time the session was last updated.", - "format": "partial-date-time", - "type": "string" - }, - "user_id": { - "description": "The user ID of the user that the session belongs to.", - "type": "string" - } - }, - "required": [ - "created_at", - "expires", - "session_token", - "updated_at" - ], - "type": "object" - }, - "StatusCode": { - "format": "int32", - "title": "int32", - "type": "integer" - }, - "User": { - "description": "A user.", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "format": "partial-date-time", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "type": "string" - }, - "email_verified": { - "description": "The date and time the email address was verified.", - "format": "partial-date-time", - "nullable": true, - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the user.", - "type": "string" - }, - "image": { - "description": "The image avatar for the user. This is a URL.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "name": { - "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", - "type": "string" - }, - "phone": { - "description": "The user's phone number.", - "type": "string" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "format": "partial-date-time", - "type": "string" - } - }, - "required": [ - "created_at", - "updated_at" - ], - "type": "object" - }, - "UserResultsPage": { - "description": "A single page of results", - "properties": { - "items": { - "description": "list of items on this page of results", - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "next_page": { - "description": "token used to fetch the next page of results (if any)", - "nullable": true, - "type": "string" - } - }, - "required": [ - "items" - ], - "type": "object" - }, - "Uuid": { - "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", - "format": "uuid", - "type": "string" - } - } - }, - "info": { - "contact": { - "email": "api@kittycad.io", - "url": "https://kittycad.io" - }, - "description": "API server for KittyCAD", - "title": "KittyCAD API", - "version": "0.1.0", - "x-go": { - "client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}", - "install": "go get github.com/kittycad/kittycad.go" - } - }, - "openapi": "3.0.3", - "paths": { - "/": { - "get": { - "operationId": "get_schema", + "components": { "responses": { - "200": { - "content": { - "application/json": { - "schema": {} - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "Error": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error", + "x-scope": [ + "", + "#/components/responses/Error" + ] + } + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } + "description": "Error" } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get OpenAPI schema.", - "tags": [ - "meta" - ], - "x-go": { - "example": "// GetSchema: Get OpenAPI schema.\nresponseGetSchema, err := client.Meta.GetSchema()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetSchema" - } - } - }, - "/_meta/info": { - "get": { - "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", - "operationId": "get_metadata", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metadata" - } - } + "schemas": { + "ApiCallQueryGroup": { + "description": "A response for a query on the API call table that is grouped by something.", + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "query": { + "type": "string" + } + }, + "required": [ + "count", + "query" + ], + "type": "object" }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get the metadata about our currently running server.", - "tags": [ - "meta" - ], - "x-go": { - "example": "// Getdata: Get the metadata about our currently running server.\n//\n// This includes information on any of our other distributed systems it is connected to.\n// You must be a KittyCAD employee to perform this request.\nmetadata, err := client.Meta.Getdata()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Getdata" - } - } - }, - "/api-call-metrics": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", - "operationId": "get_api_call_metrics", - "parameters": [ - { - "description": "What field to group the metrics by.", - "in": "query", - "name": "group_by", - "required": true, - "schema": { - "$ref": "#/components/schemas/ApiCallQueryGroupBy" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/ApiCallQueryGroup" - }, - "title": "Array_of_ApiCallQueryGroup", - "type": "array" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get API call metrics.", - "tags": [ - "api-calls" - ], - "x-go": { - "example": "// GetMetrics: Get API call metrics.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n//\n// Parameters:\n//\t- `groupBy`: What field to group the metrics by.\nAPICallQueryGroup, err := client.APICall.GetMetrics(groupBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetMetrics" - } - } - }, - "/api-calls": { - "get": { - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List API calls.", - "tags": [ - "api-calls" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// List: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.List" - } - } - }, - "/api-calls/{id}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", - "operationId": "get_api_call", - "parameters": [ - { - "description": "The ID of the API call.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get details of an API call.", - "tags": [ - "api-calls" - ], - "x-go": { - "example": "// Get: Get details of an API call.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n// If the user is not authenticated to view the specified API call, then it is not returned.\n// Only KittyCAD employees can view API calls for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.Get(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.Get" - } - } - }, - "/file/conversion/{src_format}/{output_format}": { - "post": { - "description": "Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint.", - "operationId": "create_file_conversion", - "parameters": [ - { - "description": "The format the file should be converted to.", - "in": "path", - "name": "output_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileConversionOutputFormat" - }, - "style": "simple" - }, - { - "description": "The format of the file to convert.", - "in": "path", - "name": "src_format", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileConversionSourceFormat" - }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", + "ApiCallQueryGroupBy": { + "description": "The field of an API call to group by.", + "enum": [ + "email", + "method", + "endpoint", + "user_id", + "origin", + "ip_address" + ], + "type": "string" + }, + "ApiCallWithPrice": { + "description": "An API call with the price.\n\nThis is a join of the `APICall` and `APICallPrice` tables.", + "properties": { + "completed_at": { + "description": "The date and time the API call completed billing.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The date and time the API call was created.", + "format": "partial-date-time", + "type": "string" + }, + "duration": { + "description": "The duration of the API call.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "email": { + "description": "The user's email address.", + "type": "string" + }, + "endpoint": { + "description": "The endpoint requested by the API call.", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The unique identifier for the API call." + }, + "ip_address": { + "description": "The ip address of the origin.", + "type": "string" + }, + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/Method", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The HTTP method requsted by the API call." + }, + "minutes": { + "description": "The number of minutes the API call was billed for.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "origin": { + "description": "The origin of the API call.", + "type": "string" + }, + "price": { + "description": "The price of the API call.", + "nullable": true, + "type": "number" + }, + "request_body": { + "description": "The request body sent by the API call.", + "nullable": true, + "type": "string" + }, + "request_query_params": { + "description": "The request query params sent by the API call.", + "type": "string" + }, + "response_body": { + "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", + "nullable": true, + "type": "string" + }, + "started_at": { + "description": "The date and time the API call started billing.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status_code": { + "allOf": [ + { + "$ref": "#/components/schemas/StatusCode", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The status code returned by the API call.", + "nullable": true + }, + "stripe_invoice_item_id": { + "description": "The Stripe invoice item ID of the API call if it is billable.", + "type": "string" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ], + "description": "The API token that made the API call." + }, + "updated_at": { + "description": "The date and time the API call was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_agent": { + "description": "The user agent of the request.", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that made the API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "method", + "token", + "updated_at", + "user_agent" + ], + "type": "object" + }, + "ApiCallWithPriceResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "ApiToken": { + "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", + "properties": { + "created_at": { + "description": "The date and time the API token was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "description": "The unique identifier for the API token.", + "type": "string" + }, + "is_valid": { + "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiTokenResultsPage", + "#/components/schemas/ApiToken" + ] + } + ], + "description": "The API token itself." + }, + "updated_at": { + "description": "The date and time the API token was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that owns the API token.", + "type": "string" + } + }, + "required": [ + "created_at", + "is_valid", + "token", + "updated_at" + ], + "type": "object" + }, + "ApiTokenResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "", + "#/components/schemas/ApiTokenResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "Cluster": { + "description": "Cluster information.", + "properties": { + "addr": { + "description": "The IP address of the cluster.", + "format": "ip", + "type": "string" + }, + "auth_timeout": { + "description": "The auth timeout of the cluster.", + "format": "int64", + "type": "integer" + }, + "cluster_port": { + "description": "The port of the cluster.", + "format": "int64", + "type": "integer" + }, + "name": { + "description": "The name of the cluster.", + "type": "string" + }, + "tls_timeout": { + "description": "The TLS timeout for the cluster.", + "format": "int64", + "type": "integer" + }, + "urls": { + "description": "The urls of the cluster.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "addr" + ], + "type": "object" + }, + "CreatedAtSortMode": { + "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", + "enum": [ + "created-at-ascending", + "created-at-descending" + ], + "type": "string" + }, + "Duration": { + "format": "int64", + "title": "int64", + "type": "integer" + }, + "EngineMetadata": { + "description": "Metadata about an engine API instance.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "async_jobs_running": { + "description": "If any async job is currently running.", + "type": "boolean" + }, + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ], + "description": "Metadata about our file system." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "nats": { + "allOf": [ + { + "$ref": "#/components/schemas/NatsConnection", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ], + "description": "Metadata about our nats.io connection." + } + }, + "required": [ + "async_jobs_running", + "fs", + "git_hash", + "nats" + ], + "type": "object" + }, + "Error": { + "description": "Error information from a response.", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ], + "type": "object" + }, + "ExtendedUser": { + "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "partial-date-time", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "mailchimp_id": { + "description": "The user's MailChimp ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "description": "The user's phone number.", + "type": "string" + }, + "stripe_id": { + "description": "The user's Stripe ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "zendesk_id": { + "description": "The user's Zendesk ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ], + "type": "object" + }, + "ExtendedUserResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "", + "#/components/schemas/ExtendedUserResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "FileConversion": { + "description": "A file conversion.\n\nFor now, in the database, we only store the file conversions if we performed it asynchronously.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/FileConversionResultsPage", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output_file_link": { + "description": "The link to the file conversion output in our blob storage.", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionOutputFormat", + "x-scope": [ + "", + "#/components/schemas/FileConversionResultsPage", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The output format of the file conversion." + }, + "src_file_link": { + "description": "The link to the file conversion source in our blob storage.", + "type": "string" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionSourceFormat", + "x-scope": [ + "", + "#/components/schemas/FileConversionResultsPage", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionStatus", + "x-scope": [ + "", + "#/components/schemas/FileConversionResultsPage", + "#/components/schemas/FileConversion" + ] + } + ], + "description": "The status of the file conversion." + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + }, + "worker": { + "description": "The worker node that is performing or performed the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileConversionOutputFormat": { + "description": "The valid types of output file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx", + "fbxb" + ], + "type": "string" + }, + "FileConversionResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/FileConversion", + "x-scope": [ + "", + "#/components/schemas/FileConversionResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "FileConversionSourceFormat": { + "description": "The valid types of source file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx" + ], + "type": "string" + }, + "FileConversionStatus": { + "description": "The status of a file conversion.", + "enum": [ + "Queued", + "Uploaded", + "In Progress", + "Completed", + "Failed" + ], + "type": "string" + }, + "FileConversionWithOutput": { + "description": "A file conversion as we ouput it to the user.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/FileConversionWithOutput" + ] + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output": { + "description": "The converted file, if completed, base64 encoded. If the conversion failed, this field will show any errors.", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionOutputFormat", + "x-scope": [ + "", + "#/components/schemas/FileConversionWithOutput" + ] + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionSourceFormat", + "x-scope": [ + "", + "#/components/schemas/FileConversionWithOutput" + ] + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionStatus", + "x-scope": [ + "", + "#/components/schemas/FileConversionWithOutput" + ] + } + ], + "description": "The status of the file conversion." + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileSystemMetadata": { + "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "ok": { + "description": "If the file system passed a sanity check.", + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "type": "object" + }, + "Gateway": { + "description": "Gateway information.", + "properties": { + "auth_timeout": { + "description": "The auth timeout of the gateway.", + "format": "int64", + "type": "integer" + }, + "host": { + "description": "The host of the gateway.", + "type": "string" + }, + "name": { + "description": "The name of the gateway.", + "type": "string" + }, + "port": { + "description": "The port of the gateway.", + "format": "int64", + "type": "integer" + }, + "tls_timeout": { + "description": "The TLS timeout for the gateway.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "Jetstream": { + "description": "Jetstream information.", + "properties": { + "config": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamConfig", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection", + "#/components/schemas/Jetstream" + ] + } + ], + "description": "The Jetstream config." + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/MetaClusterInfo", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection", + "#/components/schemas/Jetstream" + ] + } + ], + "description": "Meta information about the cluster." + }, + "stats": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamStats", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection", + "#/components/schemas/Jetstream" + ] + } + ], + "description": "Jetstream statistics." + } + }, + "type": "object" + }, + "JetstreamApiStats": { + "description": "Jetstream API statistics.", + "properties": { + "errors": { + "description": "The number of errors.", + "format": "int64", + "type": "integer" + }, + "inflight": { + "description": "The number of inflight requests.", + "format": "int64", + "type": "integer" + }, + "total": { + "description": "The number of requests.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "JetstreamConfig": { + "description": "Jetstream configuration.", + "properties": { + "domain": { + "description": "The domain.", + "type": "string" + }, + "max_memory": { + "description": "The max memory.", + "format": "int64", + "type": "integer" + }, + "max_storage": { + "description": "The max storage.", + "format": "int64", + "type": "integer" + }, + "store_dir": { + "description": "The store directory.", + "type": "string" + } + }, + "type": "object" + }, + "JetstreamStats": { + "description": "Jetstream statistics.", + "properties": { + "accounts": { + "description": "The number of accounts.", + "format": "int64", + "type": "integer" + }, + "api": { + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamApiStats", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection", + "#/components/schemas/Jetstream", + "#/components/schemas/JetstreamStats" + ] + } + ], + "description": "API stats." + }, + "ha_assets": { + "description": "The number of HA assets.", + "format": "int64", + "type": "integer" + }, + "memory": { + "description": "The memory used by the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "reserved_memory": { + "description": "The reserved memory for the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "reserved_store": { + "description": "The reserved storage for the Jetstream server.", + "format": "int64", + "type": "integer" + }, + "store": { + "description": "The storage used by the Jetstream server.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "LeafNode": { + "description": "Leaf node information.", + "properties": { + "auth_timeout": { + "description": "The auth timeout of the leaf node.", + "format": "int64", + "type": "integer" + }, + "host": { + "description": "The host of the leaf node.", + "type": "string" + }, + "port": { + "description": "The port of the leaf node.", + "format": "int64", + "type": "integer" + }, + "tls_timeout": { + "description": "The TLS timeout for the leaf node.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "MetaClusterInfo": { + "description": "Jetstream statistics.", + "properties": { + "cluster_size": { + "description": "The size of the cluster.", + "format": "int64", + "type": "integer" + }, + "leader": { + "description": "The leader of the cluster.", + "type": "string" + }, + "name": { + "description": "The name of the cluster.", + "type": "string" + } + }, + "type": "object" + }, + "Metadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "engine": { + "allOf": [ + { + "$ref": "#/components/schemas/EngineMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our engine API connection." + }, + "fs": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our file system." + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "nats": { + "allOf": [ + { + "$ref": "#/components/schemas/NatsConnection", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ], + "description": "Metadata about our nats.io connection." + } + }, + "required": [ + "engine", + "fs", + "git_hash", + "nats" + ], + "type": "object" + }, + "Method": { + "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", + "enum": [ + "OPTIONS", + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "TRACE", + "CONNECT", + "PATCH", + "EXTENSION" + ], + "type": "string" + }, + "NatsConnection": { + "description": "Metadata about a nats.io connection.\n\nThis is mostly used for internal purposes and debugging.", + "properties": { + "auth_timeout": { + "description": "The auth timeout of the server.", + "format": "int64", + "type": "integer" + }, + "cluster": { + "allOf": [ + { + "$ref": "#/components/schemas/Cluster", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection" + ] + } + ], + "description": "Information about the cluster." + }, + "config_load_time": { + "description": "The time the configuration was loaded.", + "format": "date-time", + "type": "string" + }, + "connections": { + "description": "The number of connections to the server.", + "format": "int64", + "type": "integer" + }, + "cores": { + "description": "The CPU core usage of the server.", + "format": "int64", + "type": "integer" + }, + "cpu": { + "description": "The CPU usage of the server.", + "format": "int64", + "type": "integer" + }, + "gateway": { + "allOf": [ + { + "$ref": "#/components/schemas/Gateway", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection" + ] + } + ], + "description": "Information about the gateway." + }, + "git_commit": { + "description": "The git commit.", + "type": "string" + }, + "go": { + "description": "The go version.", + "type": "string" + }, + "gomaxprocs": { + "description": "`GOMAXPROCS` of the server.", + "format": "int64", + "type": "integer" + }, + "host": { + "description": "The host of the server.", + "format": "ip", + "type": "string" + }, + "http_base_path": { + "description": "The http base path of the server.", + "type": "string" + }, + "http_host": { + "description": "The http host of the server.", + "type": "string" + }, + "http_port": { + "description": "The http port of the server.", + "format": "int64", + "type": "integer" + }, + "http_req_stats": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "HTTP request statistics.", + "type": "object" + }, + "https_port": { + "description": "The https port of the server.", + "format": "int64", + "type": "integer" + }, + "id": { + "description": "The ID as known by the most recently connected server.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "in_bytes": { + "description": "The count of inbound bytes for the server.", + "format": "int64", + "type": "integer" + }, + "in_msgs": { + "description": "The number of inbound messages for the server.", + "format": "int64", + "type": "integer" + }, + "ip": { + "description": "The client IP as known by the most recently connected server.", + "format": "ip", + "type": "string" + }, + "jetstream": { + "allOf": [ + { + "$ref": "#/components/schemas/Jetstream", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection" + ] + } + ], + "description": "Jetstream information." + }, + "leaf": { + "allOf": [ + { + "$ref": "#/components/schemas/LeafNode", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection" + ] + } + ], + "description": "Information about leaf nodes." + }, + "leafnodes": { + "description": "The number of leaf nodes for the server.", + "format": "int64", + "type": "integer" + }, + "max_connections": { + "description": "The max connections of the server.", + "format": "int64", + "type": "integer" + }, + "max_control_line": { + "description": "The max control line of the server.", + "format": "int64", + "type": "integer" + }, + "max_payload": { + "description": "The max payload of the server.", + "format": "int64", + "type": "integer" + }, + "max_pending": { + "description": "The max pending of the server.", + "format": "int64", + "type": "integer" + }, + "mem": { + "description": "The memory usage of the server.", + "format": "int64", + "type": "integer" + }, + "now": { + "description": "The time now.", + "format": "date-time", + "type": "string" + }, + "out_bytes": { + "description": "The count of outbound bytes for the server.", + "format": "int64", + "type": "integer" + }, + "out_msgs": { + "description": "The number of outbound messages for the server.", + "format": "int64", + "type": "integer" + }, + "ping_interval": { + "description": "The ping interval of the server.", + "format": "int64", + "type": "integer" + }, + "ping_max": { + "description": "The ping max of the server.", + "format": "int64", + "type": "integer" + }, + "port": { + "description": "The port of the server.", + "format": "int64", + "type": "integer" + }, + "proto": { + "description": "The protocol version.", + "format": "int64", + "type": "integer" + }, + "remotes": { + "description": "The number of remotes for the server.", + "format": "int64", + "type": "integer" + }, + "routes": { + "description": "The number of routes for the server.", + "format": "int64", + "type": "integer" + }, + "rtt": { + "allOf": [ + { + "$ref": "#/components/schemas/Duration", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata", + "#/components/schemas/NatsConnection" + ] + } + ], + "description": "The round trip time between this client and the server." + }, + "server_id": { + "description": "The server ID.", + "type": "string" + }, + "server_name": { + "description": "The server name.", + "type": "string" + }, + "slow_consumers": { + "description": "The number of slow consumers for the server.", + "format": "int64", + "type": "integer" + }, + "start": { + "description": "When the server was started.", + "format": "date-time", + "type": "string" + }, + "subscriptions": { + "description": "The number of subscriptions for the server.", + "format": "int64", + "type": "integer" + }, + "system_account": { + "description": "The system account.", + "type": "string" + }, + "tls_timeout": { + "description": "The TLS timeout of the server.", + "format": "int64", + "type": "integer" + }, + "total_connections": { + "description": "The total number of connections to the server.", + "format": "int64", + "type": "integer" + }, + "uptime": { + "description": "The uptime of the server.", + "type": "string" + }, + "version": { + "description": "The version of the service.", + "type": "string" + }, + "write_deadline": { + "description": "The write deadline of the server.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "cluster", + "config_load_time", + "host", + "http_req_stats", + "id", + "ip", + "now", + "rtt", + "start" + ], + "type": "object" + }, + "Pong": { + "description": "The response from the `/ping` endpoint.", + "properties": { + "message": { + "description": "The pong response.", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "Session": { + "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "properties": { + "created_at": { + "description": "The date and time the session was created.", + "format": "partial-date-time", + "type": "string" + }, + "expires": { + "description": "The date and time the session expires.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "description": "The unique identifier for the session.", + "type": "string" + }, + "session_token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/Session" + ] + } + ], + "description": "The session token." + }, + "updated_at": { + "description": "The date and time the session was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user that the session belongs to.", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "session_token", + "updated_at" + ], + "type": "object" + }, + "StatusCode": { + "format": "int32", + "title": "int32", + "type": "integer" + }, + "User": { + "description": "A user.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "partial-date-time", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "description": "The user's phone number.", + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "partial-date-time", + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ], + "type": "object" + }, + "UserResultsPage": { + "description": "A single page of results", + "properties": { + "items": { + "description": "list of items on this page of results", + "items": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "", + "#/components/schemas/UserResultsPage" + ] + }, + "type": "array" + }, + "next_page": { + "description": "token used to fetch the next page of results (if any)", + "nullable": true, + "type": "string" + } + }, + "required": [ + "items" + ], + "type": "object" + }, + "Uuid": { + "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", + "format": "uuid", "type": "string" - } } - }, - "required": true + } + }, + "info": { + "contact": { + "email": "api@kittycad.io", + "url": "https://kittycad.io" }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversionWithOutput" + "description": "API server for KittyCAD", + "title": "KittyCAD API", + "version": "0.1.0", + "x-go": { + "client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}", + "install": "go get github.com/kittycad/kittycad.go" + }, + "x-python": { + "client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# KITTYCAD_API_TOKEN.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()", + "install": "pip install kittycad" + } + }, + "openapi": "3.0.3", + "paths": { + "/": { + "get": { + "operationId": "get_schema", + "responses": { + "200": { + "content": { + "application/json": { + "schema": {} + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get OpenAPI schema.", + "tags": [ + "meta" + ], + "x-go": { + "example": "// GetSchema: Get OpenAPI schema.\nresponseGetSchema, err := client.Meta.GetSchema()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetSchema" + }, + "x-python": { + "example": "from kittycad.models import dict\nfrom kittycad.api.meta import get_schema\nfrom kittycad.types import Response\n\nfc: dict = get_schema.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[dict] = get_schema.sync_detailed(client=client)\n\n# OR run async\nfc: dict = await get_schema.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[dict] = await get_schema.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.get_schema.html" } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Convert CAD file.", - "tags": [ - "file" - ], - "x-go": { - "example": "// CreateConversion: Convert CAD file.\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\n// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// If the conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversionWithOutput, err := client.File.CreateConversion(outputFormat, srcFormat, body)\n\n// - OR -\n\n// CreateConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the CreateConversion function.\nfileConversionWithOutput, err := client.File.CreateConversionWithBase64Helper(outputFormat, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" - } - } - }, - "/file/conversions": { - "get": { - "description": "This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", - "operationId": "list_file_conversions", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - }, - { - "description": "The status to filter by.", - "in": "query", - "name": "status", - "schema": { - "$ref": "#/components/schemas/FileConversionStatus" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversionResultsPage" + "/_meta/info": { + "get": { + "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", + "operationId": "get_metadata", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Metadata", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get the metadata about our currently running server.", + "tags": [ + "meta" + ], + "x-go": { + "example": "// Getdata: Get the metadata about our currently running server.\n//\n// This includes information on any of our other distributed systems it is connected to.\n// You must be a KittyCAD employee to perform this request.\nmetadata, err := client.Meta.Getdata()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Getdata" + }, + "x-python": { + "example": "from kittycad.models import Metadata\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.types import Response\n\nfc: Metadata = get_metadata.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Metadata] = get_metadata.sync_detailed(client=client)\n\n# OR run async\nfc: Metadata = await get_metadata.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Metadata] = await get_metadata.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.get_metadata.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "List file conversions.", - "tags": [ - "file" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListConversions: List file conversions.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListConversionsAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nfileConversionResultsPage, err := client.File.ListConversions(limit, pageToken, sortBy, status)\n\n// - OR -\n\n// ListConversionsAllPages: List file conversions.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// This method is a wrapper around the `ListConversions` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nFileConversion, err := client.File.ListConversionsAllPages(sortBy, status)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ListConversions" - } - } - }, - "/file/conversions/{id}": { - "get": { - "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", - "operationId": "get_file_conversion", - "parameters": [ - { - "description": "The ID of the file conversion.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversionWithOutput" + "/api-call-metrics": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "description": "What field to group the metrics by.", + "in": "query", + "name": "group_by", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup", + "x-scope": [ + "" + ] + }, + "title": "Array_of_ApiCallQueryGroup", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get API call metrics.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// GetMetrics: Get API call metrics.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n//\n// Parameters:\n//\t- `groupBy`: What field to group the metrics by.\nAPICallQueryGroup, err := client.APICall.GetMetrics(groupBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetMetrics" + }, + "x-python": { + "example": "from kittycad.models import [ApiCallQueryGroup]\nfrom kittycad.api.api-calls import get_api_call_metrics\nfrom kittycad.types import Response\n\nfc: [ApiCallQueryGroup] = get_api_call_metrics.sync(client=client, group_by=ApiCallQueryGroupBy)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[ApiCallQueryGroup]] = get_api_call_metrics.sync_detailed(client=client, group_by=ApiCallQueryGroupBy)\n\n# OR run async\nfc: [ApiCallQueryGroup] = await get_api_call_metrics.asyncio(client=client, group_by=ApiCallQueryGroupBy)\n\n# OR run async with more info\nresponse: Response[[ApiCallQueryGroup]] = await get_api_call_metrics.asyncio_detailed(client=client, group_by=ApiCallQueryGroupBy)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_api_call_metrics.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get a file conversion.", - "tags": [ - "file" - ], - "x-go": { - "example": "// GetConversion: Get a file conversion.\n//\n// Get the status and output of an async file conversion.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n// If the user is not authenticated to view the specified file conversion, then it is not returned.\n// Only KittyCAD employees with the proper access can view file conversions for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the file conversion.\nfileConversionWithOutput, err := client.File.GetConversion(id)\n\n// - OR -\n\n// GetConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the GetConversion function.\nfileConversionWithOutput, err := client.File.GetConversionWithBase64Helper(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" - } - } - }, - "/ping": { - "get": { - "operationId": "ping", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pong" + "/api-calls": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API calls.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// List: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.List" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPriceResultsPage\nfrom kittycad.api.api-calls import list_api_calls\nfrom kittycad.types import Response\n\nfc: ApiCallWithPriceResultsPage = list_api_calls.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPriceResultsPage] = list_api_calls.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiCallWithPriceResultsPage = await list_api_calls.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPriceResultsPage] = await list_api_calls.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.list_api_calls.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Return pong.", - "tags": [ - "meta" - ], - "x-go": { - "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" - } - } - }, - "/user": { - "get": { - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" + "/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", + "operationId": "get_api_call", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get details of an API call.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// Get: Get details of an API call.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n// If the user is not authenticated to view the specified API call, then it is not returned.\n// Only KittyCAD employees can view API calls for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.Get(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.Get" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPrice\nfrom kittycad.api.api-calls import get_api_call\nfrom kittycad.types import Response\n\nfc: ApiCallWithPrice = get_api_call.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPrice] = get_api_call.sync_detailed(client=client, id=)\n\n# OR run async\nfc: ApiCallWithPrice = await get_api_call.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPrice] = await get_api_call.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_api_call.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get your user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// GetSelf: Get your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nuser, err := client.User.GetSelf()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelf" - } - } - }, - "/user/api-calls": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "user_list_api_calls", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + "/file/conversion/{src_format}/{output_format}": { + "post": { + "description": "Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint.", + "operationId": "create_file_conversion", + "parameters": [ + { + "description": "The format the file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileConversionOutputFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "description": "The format of the file to convert.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileConversionSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionWithOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Convert CAD file.", + "tags": [ + "file" + ], + "x-go": { + "example": "// CreateConversion: Convert CAD file.\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\n// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// If the conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversionWithOutput, err := client.File.CreateConversion(outputFormat, srcFormat, body)\n\n// - OR -\n\n// CreateConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the CreateConversion function.\nfileConversionWithOutput, err := client.File.CreateConversionWithBase64Helper(outputFormat, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" + }, + "x-python": { + "example": "from kittycad.models import FileConversionWithOutput\nfrom kittycad.api.file import create_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversionWithOutput = create_file_conversion_with_base64_helper.sync(client=client, output_format=FileConversionOutputFormat, src_format=FileConversionSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversionWithOutput] = create_file_conversion_with_base64_helper.sync_detailed(client=client, output_format=FileConversionOutputFormat, src_format=FileConversionSourceFormat, body=bytes)\n\n# OR run async\nfc: FileConversionWithOutput = await create_file_conversion_with_base64_helper.asyncio(client=client, output_format=FileConversionOutputFormat, src_format=FileConversionSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileConversionWithOutput] = await create_file_conversion_with_base64_helper.asyncio_detailed(client=client, output_format=FileConversionOutputFormat, src_format=FileConversionSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_conversion_with_base64_helper.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "List API calls for your user.", - "tags": [ - "api-calls" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// UserList: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `UserListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.UserList(limit, pageToken, sortBy)\n\n// - OR -\n\n// UserListAllPages: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `UserList` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.UserListAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.UserList" - } - } - }, - "/user/api-calls/{id}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", - "operationId": "get_api_call_for_user", - "parameters": [ - { - "description": "The ID of the API call.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" + "/file/conversions": { + "get": { + "description": "This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "operationId": "list_file_conversions", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + }, + { + "description": "The status to filter by.", + "in": "query", + "name": "status", + "schema": { + "$ref": "#/components/schemas/FileConversionStatus", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List file conversions.", + "tags": [ + "file" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListConversions: List file conversions.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListConversionsAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nfileConversionResultsPage, err := client.File.ListConversions(limit, pageToken, sortBy, status)\n\n// - OR -\n\n// ListConversionsAllPages: List file conversions.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// This method is a wrapper around the `ListConversions` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nFileConversion, err := client.File.ListConversionsAllPages(sortBy, status)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ListConversions" + }, + "x-python": { + "example": "from kittycad.models import FileConversionResultsPage\nfrom kittycad.api.file import list_file_conversions\nfrom kittycad.types import Response\n\nfc: FileConversionResultsPage = list_file_conversions.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=FileConversionStatus)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversionResultsPage] = list_file_conversions.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=FileConversionStatus)\n\n# OR run async\nfc: FileConversionResultsPage = await list_file_conversions.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=FileConversionStatus)\n\n# OR run async with more info\nresponse: Response[FileConversionResultsPage] = await list_file_conversions.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=FileConversionStatus)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.list_file_conversions.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get an API call for a user.", - "tags": [ - "api-calls" - ], - "x-go": { - "example": "// GetForUser: Get an API call for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.GetForUser(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetForUser" - } - } - }, - "/user/api-tokens": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", - "operationId": "list_api_tokens_for_user", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiTokenResultsPage" + "/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", + "operationId": "get_file_conversion", + "parameters": [ + { + "description": "The ID of the file conversion.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionWithOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a file conversion.", + "tags": [ + "file" + ], + "x-go": { + "example": "// GetConversion: Get a file conversion.\n//\n// Get the status and output of an async file conversion.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n// If the user is not authenticated to view the specified file conversion, then it is not returned.\n// Only KittyCAD employees with the proper access can view file conversions for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the file conversion.\nfileConversionWithOutput, err := client.File.GetConversion(id)\n\n// - OR -\n\n// GetConversionWithBase64Helper will automatically base64 encode and decode the contents\n// of the file body.\n//\n// This function is a wrapper around the GetConversion function.\nfileConversionWithOutput, err := client.File.GetConversionWithBase64Helper(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" + }, + "x-python": { + "example": "from kittycad.models import FileConversionWithOutput\nfrom kittycad.api.file import get_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversionWithOutput = get_file_conversion_with_base64_helper.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversionWithOutput] = get_file_conversion_with_base64_helper.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversionWithOutput = await get_file_conversion_with_base64_helper.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversionWithOutput] = await get_file_conversion_with_base64_helper.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.get_file_conversion_with_base64_helper.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "List API tokens for your user.", - "tags": [ - "api-tokens" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListForUser: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPITokenResultsPage, err := client.APIToken.ListForUser(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPIToken, err := client.APIToken.ListForUserAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.ListForUser" - } - }, - "post": { - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", - "operationId": "create_api_token_for_user", - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" + "/ping": { + "get": { + "operationId": "ping", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pong", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Return pong.", + "tags": [ + "meta" + ], + "x-go": { + "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" + }, + "x-python": { + "example": "from kittycad.models import Pong\nfrom kittycad.api.meta import ping\nfrom kittycad.types import Response\n\nfc: Pong = ping.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Pong] = ping.sync_detailed(client=client)\n\n# OR run async\nfc: Pong = await ping.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Pong] = await ping.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.ping.html" } - } - }, - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Create a new API token for your user.", - "tags": [ - "api-tokens" - ], - "x-go": { - "example": "// CreateForUser: Create a new API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\naPIToken, err := client.APIToken.CreateForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.CreateForUser" - } - } - }, - "/user/api-tokens/{token}": { - "delete": { - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", - "operationId": "delete_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "/user": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "summary": "Get your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetSelf: Get your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nuser, err := client.User.GetSelf()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelf" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Delete an API token for your user.", - "tags": [ - "api-tokens" - ], - "x-go": { - "example": "// DeleteForUser: Delete an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters:\n//\t- `token`: The API token.\nif err := client.APIToken.DeleteForUser(token); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser" - } - }, - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", - "operationId": "get_api_token_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" + "x-python": { + "example": "from kittycad.models import User\nfrom kittycad.api.users import get_user_self\nfrom kittycad.types import Response\n\nfc: User = get_user_self.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[User] = get_user_self.sync_detailed(client=client)\n\n# OR run async\nfc: User = await get_user_self.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[User] = await get_user_self.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user_self.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get an API token for your user.", - "tags": [ - "api-tokens" - ], - "x-go": { - "example": "// GetForUser: Get an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\naPIToken, err := client.APIToken.GetForUser(token)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser" - } - } - }, - "/user/extended": { - "get": { - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self_extended", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" + "/user/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "user_list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API calls for your user.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// UserList: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `UserListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.UserList(limit, pageToken, sortBy)\n\n// - OR -\n\n// UserListAllPages: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `UserList` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.UserListAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.UserList" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPriceResultsPage\nfrom kittycad.api.api-calls import user_list_api_calls\nfrom kittycad.types import Response\n\nfc: ApiCallWithPriceResultsPage = user_list_api_calls.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPriceResultsPage] = user_list_api_calls.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiCallWithPriceResultsPage = await user_list_api_calls.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPriceResultsPage] = await user_list_api_calls.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.user_list_api_calls.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get extended information about your user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// GetSelfExtended: Get extended information about your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" - } - } - }, - "/user/file/conversions": { - "get": { - "description": "This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe file conversions are returned in order of creation, with the most recently created file conversions first.", - "operationId": "list_file_conversions_for_user", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversionResultsPage" + "/user/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", + "operationId": "get_api_call_for_user", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get an API call for a user.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// GetForUser: Get an API call for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.GetForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPrice\nfrom kittycad.api.api-calls import get_api_call_for_user\nfrom kittycad.types import Response\n\nfc: ApiCallWithPrice = get_api_call_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPrice] = get_api_call_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: ApiCallWithPrice = await get_api_call_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPrice] = await get_api_call_for_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_api_call_for_user.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "List file conversions for your user.", - "tags": [ - "file" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListConversionsForUser: List file conversions for your user.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The file conversions are returned in order of creation, with the most recently created file conversions first.\n//\n// To iterate over all pages, use the `ListConversionsForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nfileConversionResultsPage, err := client.File.ListConversionsForUser(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListConversionsForUserAllPages: List file conversions for your user.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The file conversions are returned in order of creation, with the most recently created file conversions first.\n//\n// This method is a wrapper around the `ListConversionsForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nFileConversion, err := client.File.ListConversionsForUserAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ListConversionsForUser" - } - } - }, - "/user/file/conversions/{id}": { - "get": { - "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", - "operationId": "get_file_conversion_for_user", - "parameters": [ - { - "description": "The ID of the file conversion.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversionWithOutput" + "/user/api-tokens": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", + "operationId": "list_api_tokens_for_user", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API tokens for your user.", + "tags": [ + "api-tokens" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListForUser: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPITokenResultsPage, err := client.APIToken.ListForUser(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nAPIToken, err := client.APIToken.ListForUserAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.ListForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiTokenResultsPage\nfrom kittycad.api.api-tokens import list_api_tokens_for_user\nfrom kittycad.types import Response\n\nfc: ApiTokenResultsPage = list_api_tokens_for_user.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiTokenResultsPage] = list_api_tokens_for_user.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiTokenResultsPage = await list_api_tokens_for_user.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiTokenResultsPage] = await list_api_tokens_for_user.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.list_api_tokens_for_user.html" } - } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "post": { + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", + "operationId": "create_api_token_for_user", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "summary": "Create a new API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// CreateForUser: Create a new API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\naPIToken, err := client.APIToken.CreateForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.CreateForUser" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Get a file conversion for your user.", - "tags": [ - "file" - ], - "x-go": { - "example": "// GetConversionForUser: Get a file conversion for your user.\n//\n// Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the file conversion.\nfileConversionWithOutput, err := client.File.GetConversionForUser(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" - } - } - }, - "/user/session/{token}": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", - "operationId": "get_session_for_user", - "parameters": [ - { - "description": "The API token.", - "in": "path", - "name": "token", - "required": true, - "schema": { - "format": "uuid", - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" + "x-python": { + "example": "from kittycad.models import ApiToken\nfrom kittycad.api.api-tokens import create_api_token_for_user\nfrom kittycad.types import Response\n\nfc: ApiToken = create_api_token_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiToken] = create_api_token_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: ApiToken = await create_api_token_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[ApiToken] = await create_api_token_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.create_api_token_for_user.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get a session for your user.", - "tags": [ - "sessions" - ], - "x-go": { - "example": "// GetForUser: Get a session for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\nsession, err := client.Session.GetForUser(token)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#SessionService.GetForUser" - } - } - }, - "/users": { - "get": { - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResultsPage" + "/user/api-tokens/{token}": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", + "operationId": "delete_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Delete an API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// DeleteForUser: Delete an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters:\n//\t- `token`: The API token.\nif err := client.APIToken.DeleteForUser(token); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.api-tokens import delete_api_token_for_user\nfrom kittycad.types import Response\n\nfc: Error = delete_api_token_for_user.sync(client=client, token=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_api_token_for_user.sync_detailed(client=client, token=\"\")\n\n# OR run async\nfc: Error = await delete_api_token_for_user.asyncio(client=client, token=\"\")\n\n# OR run async with more info\nresponse: Response[Error] = await delete_api_token_for_user.asyncio_detailed(client=client, token=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.delete_api_token_for_user.html" } - } }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" + "summary": "Get an API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// GetForUser: Get an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\naPIToken, err := client.APIToken.GetForUser(token)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser" }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "List users.", - "tags": [ - "users" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// List: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nuserResultsPage, err := client.User.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nUser, err := client.User.ListAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.List" - } - } - }, - "/users-extended": { - "get": { - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users_extended", - "parameters": [ - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUserResultsPage" + "x-python": { + "example": "from kittycad.models import ApiToken\nfrom kittycad.api.api-tokens import get_api_token_for_user\nfrom kittycad.types import Response\n\nfc: ApiToken = get_api_token_for_user.sync(client=client, token=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiToken] = get_api_token_for_user.sync_detailed(client=client, token=\"\")\n\n# OR run async\nfc: ApiToken = await get_api_token_for_user.asyncio(client=client, token=\"\")\n\n# OR run async with more info\nresponse: Response[ApiToken] = await get_api_token_for_user.asyncio_detailed(client=client, token=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-tokens.get_api_token_for_user.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "List users with extended information.", - "tags": [ - "users" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListExtended: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListExtendedAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nextendedUserResultsPage, err := client.User.ListExtended(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListExtendedAllPages: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `ListExtended` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nExtendedUser, err := client.User.ListExtendedAllPages(sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.ListExtended" - } - } - }, - "/users-extended/{id}": { - "get": { - "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", - "operationId": "get_user_extended", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" + "/user/extended": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self_extended", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get extended information about your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetSelfExtended: Get extended information about your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" + }, + "x-python": { + "example": "from kittycad.models import ExtendedUser\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.types import Response\n\nfc: ExtendedUser = get_user_self_extended.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ExtendedUser] = get_user_self_extended.sync_detailed(client=client)\n\n# OR run async\nfc: ExtendedUser = await get_user_self_extended.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[ExtendedUser] = await get_user_self_extended.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user_self_extended.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get extended information about a user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// GetExtended: Get extended information about a user.\n//\n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nextendedUser, err := client.User.GetExtended(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended" - } - } - }, - "/users/{id}": { - "get": { - "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", - "operationId": "get_user", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" + "/user/file/conversions": { + "get": { + "description": "This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe file conversions are returned in order of creation, with the most recently created file conversions first.", + "operationId": "list_file_conversions_for_user", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List file conversions for your user.", + "tags": [ + "file" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListConversionsForUser: List file conversions for your user.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The file conversions are returned in order of creation, with the most recently created file conversions first.\n//\n// To iterate over all pages, use the `ListConversionsForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nfileConversionResultsPage, err := client.File.ListConversionsForUser(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListConversionsForUserAllPages: List file conversions for your user.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The file conversions are returned in order of creation, with the most recently created file conversions first.\n//\n// This method is a wrapper around the `ListConversionsForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nFileConversion, err := client.File.ListConversionsForUserAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ListConversionsForUser" + }, + "x-python": { + "example": "from kittycad.models import FileConversionResultsPage\nfrom kittycad.api.file import list_file_conversions_for_user\nfrom kittycad.types import Response\n\nfc: FileConversionResultsPage = list_file_conversions_for_user.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversionResultsPage] = list_file_conversions_for_user.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: FileConversionResultsPage = await list_file_conversions_for_user.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[FileConversionResultsPage] = await list_file_conversions_for_user.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.list_file_conversions_for_user.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "Get a user.", - "tags": [ - "users" - ], - "x-go": { - "example": "// Get: Get a user.\n//\n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nuser, err := client.User.Get(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get" - } - } - }, - "/users/{id}/api-calls": { - "get": { - "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls_for_user", - "parameters": [ - { - "description": "The user ID.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - { - "description": "Maximum number of items returned by a single call", - "in": "query", - "name": "limit", - "schema": { - "format": "uint32", - "minimum": 1, - "nullable": true, - "type": "integer" - }, - "style": "form" - }, - { - "description": "Token returned by previous call to retreive the subsequent page", - "in": "query", - "name": "page_token", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + "/user/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", + "operationId": "get_file_conversion_for_user", + "parameters": [ + { + "description": "The ID of the file conversion.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionWithOutput", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a file conversion for your user.", + "tags": [ + "file" + ], + "x-go": { + "example": "// GetConversionForUser: Get a file conversion for your user.\n//\n// Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the file conversion.\nfileConversionWithOutput, err := client.File.GetConversionForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" + }, + "x-python": { + "example": "from kittycad.models import FileConversionWithOutput\nfrom kittycad.api.file import get_file_conversion_for_user\nfrom kittycad.types import Response\n\nfc: FileConversionWithOutput = get_file_conversion_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversionWithOutput] = get_file_conversion_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversionWithOutput = await get_file_conversion_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversionWithOutput] = await get_file_conversion_for_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.get_file_conversion_for_user.html" } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } }, - "summary": "List API calls for a user.", - "tags": [ - "api-calls" - ], - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListForUser: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.ListForUser(id, limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListForUserAllPages(id , sortBy)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListForUser" + "/user/session/{token}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_session_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a session for your user.", + "tags": [ + "sessions" + ], + "x-go": { + "example": "// GetForUser: Get a session for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\nsession, err := client.Session.GetForUser(token)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#SessionService.GetForUser" + }, + "x-python": { + "example": "from kittycad.models import Session\nfrom kittycad.api.sessions import get_session_for_user\nfrom kittycad.types import Response\n\nfc: Session = get_session_for_user.sync(client=client, token=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Session] = get_session_for_user.sync_detailed(client=client, token=\"\")\n\n# OR run async\nfc: Session = await get_session_for_user.asyncio(client=client, token=\"\")\n\n# OR run async with more info\nresponse: Response[Session] = await get_session_for_user.asyncio_detailed(client=client, token=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.sessions.get_session_for_user.html" + } + } + }, + "/users": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List users.", + "tags": [ + "users" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// List: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nuserResultsPage, err := client.User.List(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListAllPages: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `List` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nUser, err := client.User.ListAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.List" + }, + "x-python": { + "example": "from kittycad.models import UserResultsPage\nfrom kittycad.api.users import list_users\nfrom kittycad.types import Response\n\nfc: UserResultsPage = list_users.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[UserResultsPage] = list_users.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: UserResultsPage = await list_users.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[UserResultsPage] = await list_users.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.list_users.html" + } + } + }, + "/users-extended": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users_extended", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUserResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List users with extended information.", + "tags": [ + "users" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListExtended: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListExtendedAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nextendedUserResultsPage, err := client.User.ListExtended(limit, pageToken, sortBy)\n\n// - OR -\n\n// ListExtendedAllPages: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// This method is a wrapper around the `ListExtended` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\nExtendedUser, err := client.User.ListExtendedAllPages(sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.ListExtended" + }, + "x-python": { + "example": "from kittycad.models import ExtendedUserResultsPage\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.types import Response\n\nfc: ExtendedUserResultsPage = list_users_extended.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ExtendedUserResultsPage] = list_users_extended.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ExtendedUserResultsPage = await list_users_extended.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ExtendedUserResultsPage] = await list_users_extended.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.list_users_extended.html" + } + } + }, + "/users-extended/{id}": { + "get": { + "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user_extended", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get extended information about a user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetExtended: Get extended information about a user.\n//\n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nextendedUser, err := client.User.GetExtended(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended" + }, + "x-python": { + "example": "from kittycad.models import ExtendedUser\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.types import Response\n\nfc: ExtendedUser = get_user_extended.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ExtendedUser] = get_user_extended.sync_detailed(client=client, id=)\n\n# OR run async\nfc: ExtendedUser = await get_user_extended.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[ExtendedUser] = await get_user_extended.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user_extended.html" + } + } + }, + "/users/{id}": { + "get": { + "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "Get a user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// Get: Get a user.\n//\n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nuser, err := client.User.Get(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get" + }, + "x-python": { + "example": "from kittycad.models import User\nfrom kittycad.api.users import get_user\nfrom kittycad.types import Response\n\nfc: User = get_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[User] = get_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: User = await get_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[User] = await get_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.get_user.html" + } + } + }, + "/users/{id}/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls_for_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "summary": "List API calls for a user.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListForUser: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\naPICallWithPriceResultsPage, err := client.APICall.ListForUser(id, limit, pageToken, sortBy)\n\n// - OR -\n\n// ListForUserAllPages: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// This method is a wrapper around the `ListForUser` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListForUserAllPages(id , sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListForUser" + }, + "x-python": { + "example": "from kittycad.models import ApiCallWithPriceResultsPage\nfrom kittycad.api.api-calls import list_api_calls_for_user\nfrom kittycad.types import Response\n\nfc: ApiCallWithPriceResultsPage = list_api_calls_for_user.sync(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[ApiCallWithPriceResultsPage] = list_api_calls_for_user.sync_detailed(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async\nfc: ApiCallWithPriceResultsPage = await list_api_calls_for_user.asyncio(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)\n\n# OR run async with more info\nresponse: Response[ApiCallWithPriceResultsPage] = await list_api_calls_for_user.asyncio_detailed(client=client, id=, limit=\"\", page_token=, sort_by=CreatedAtSortMode)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.list_api_calls_for_user.html" + } + } } - } - } - }, - "tags": [ - { - "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/api-calls" - }, - "name": "api-calls" }, - { - "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/api-tokens" - }, - "name": "api-tokens" - }, - { - "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/file" - }, - "name": "file" - }, - { - "description": "Meta information about the API.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/meta" - }, - "name": "meta" - }, - { - "description": "Sessions allow users to call the API from their session cookie in the browser.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/sessions" - }, - "name": "sessions" - }, - { - "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/users" - }, - "name": "users" - } - ] + "tags": [ + { + "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-calls" + }, + "name": "api-calls" + }, + { + "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-tokens" + }, + "name": "api-tokens" + }, + { + "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/file" + }, + "name": "file" + }, + { + "description": "Meta information about the API.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/meta" + }, + "name": "meta" + }, + { + "description": "Sessions allow users to call the API from their session cookie in the browser.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/sessions" + }, + "name": "sessions" + }, + { + "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/users" + }, + "name": "users" + } + ] } \ No newline at end of file