diff --git a/generate/generate.py b/generate/generate.py index d8461c72d..cff6a6cb7 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -81,12 +81,17 @@ def generatePaths(cwd: str, parser: dict) -> dict: data = parser paths = data['paths'] for p in paths: - for method in paths[p]: - print('METHOD: ', method.upper()) - # Skip OPTIONS. - if method.upper() != 'OPTIONS': - endpoint = paths[p][method] - data = generatePath(path, p, method, endpoint, data) + # If p starts with /oauth2 we can skip it. + # We don't care about generating methods for those. + if p.startswith('/oauth2'): + continue + else: + for method in paths[p]: + print('METHOD: ', method.upper()) + # Skip OPTIONS. + if method.upper() != 'OPTIONS': + endpoint = paths[p][method] + data = generatePath(path, p, method, endpoint, data) return data @@ -115,7 +120,9 @@ def generatePath( request_body_refs = getRequestBodyRefs(endpoint) request_body_type = getRequestBodyType(endpoint) - success_type = endpoint_refs[0] + success_type = "" + if len(endpoint_refs) > 0: + success_type = endpoint_refs[0] if fn_name == 'get_file_conversion' or fn_name == 'create_file_conversion': fn_name += '_with_base64_helper' @@ -349,8 +356,13 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio f.write("\t\t]\n") else: raise Exception("Unknown array type") + elif json['type'] == 'string': + f.write( + "\t\tresponse_" + + response_code + + " = response.text\n") else: - raise Exception("Unknown type") + raise Exception("Unknown type", json['type']) else: f.write( "\t\tresponse_" + @@ -644,7 +656,7 @@ def generateType(path: str, name: str, schema: dict, data: dict): type_name = schema['type'] if type_name == 'object': generateObjectType(file_path, name, schema, type_name, data) - elif type_name == 'string' and 'enum' in schema: + elif type_name == 'string' and 'enum' in schema and schema['enum'] != [None]: generateEnumType(file_path, name, schema, type_name) elif type_name == 'integer': generateIntegerType(file_path, name, schema, type_name) @@ -719,9 +731,17 @@ def generateEnumType(path: str, name: str, schema: dict, type_name: str): f.write("class " + name + "(str, Enum):\n") # Iterate over the properties. for value in schema['enum']: + enum_name = camel_to_screaming_snake(value) + if enum_name == '': + enum_name = 'EMPTY' + elif enum_name == '1': + enum_name = 'ONE' + elif enum_name == '2': + enum_name = 'TWO' + f.write( "\t" + - camel_to_screaming_snake(value) + + enum_name + " = '" + value + "'\n") @@ -934,6 +954,16 @@ def renderTypeToDict( elif 'type' in property_schema['items']: if property_schema['items']['type'] == 'string': property_type = 'str' + elif property_schema['items']['type'] == 'array': + if 'items' in property_schema['items']: + if property_schema['items']['items']['type'] == 'string': + property_type = 'List[str]' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") else: print(" property: ", property_schema) raise Exception("Unknown property type") @@ -1074,6 +1104,16 @@ def renderTypeInit( elif 'type' in property_schema['items']: if property_schema['items']['type'] == 'string': property_type = 'str' + elif property_schema['items']['type'] == 'array': + if 'items' in property_schema['items']: + if property_schema['items']['items']['type'] == 'string': + property_type = 'List[str]' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") else: print(" property: ", property_schema) raise Exception("Unknown property type") @@ -1207,6 +1247,16 @@ def renderTypeFromDict( elif 'type' in property_schema['items']: if property_schema['items']['type'] == 'string': property_type = 'str' + elif property_schema['items']['type'] == 'array': + if 'items' in property_schema['items']: + if property_schema['items']['items']['type'] == 'string': + property_type = 'List[str]' + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") + else: + print(" property: ", property_schema) + raise Exception("Unknown property type") else: raise Exception( " unknown array type: ", @@ -1373,10 +1423,26 @@ def getEndpointRefs(endpoint: dict, data: dict) -> [str]: refs.append('[' + ref + ']') else: raise Exception("Unknown array type") + elif json['type'] == 'string': + refs.append('str') else: raise Exception("Unknown type ", json['type']) else: refs.append('dict') + elif content_type == '*/*': + s = content[content_type]['schema'] + if s == {}: + # We don't care it's an empty body. + continue + else: + # Throw an error for an unsupported content type. + print("content: ", content) + raise Exception( + "Unsupported content type: ", content_type) + else: + # Throw an error for an unsupported content type. + print("content: ", content) + raise Exception("Unsupported content type: ", content_type) elif '$ref' in response: schema_name = response['$ref'].replace( '#/components/responses/', '') @@ -1423,6 +1489,18 @@ def getRequestBodyRefs(endpoint: dict) -> [str]: if '$ref' in json: ref = json['$ref'].replace('#/components/schemas/', '') refs.append(ref) + elif content_type == 'application/octet-stream': + # do nothing we dont't care + continue + elif content_type == 'application/x-www-form-urlencoded': + form = content[content_type]['schema'] + if '$ref' in form: + ref = form['$ref'].replace('#/components/schemas/', '') + refs.append(ref) + else: + # Throw an error for an unsupported content type. + print("content: ", content) + raise Exception("Unsupported content type: ", content_type) return refs @@ -1444,6 +1522,11 @@ def getRequestBodyType(endpoint: dict) -> str: return 'bytes' elif content_type == 'application/octet-stream': return 'bytes' + elif content_type == 'application/x-www-form-urlencoded': + json = content[content_type]['schema'] + if '$ref' in json: + ref = json['$ref'].replace('#/components/schemas/', '') + return ref else: print(" unsupported content type: ", content_type) raise Exception("unsupported content type") @@ -1470,6 +1553,8 @@ def camel_to_screaming_snake(name: str): ' ', '').upper().replace( '-', + '_').replace( + ':', '_') diff --git a/kittycad/api/api-calls/list_async_operations.py b/kittycad/api/api-calls/list_async_operations.py index 445c45fd2..115957938 100644 --- a/kittycad/api/api-calls/list_async_operations.py +++ b/kittycad/api/api-calls/list_async_operations.py @@ -6,14 +6,14 @@ from ...client import Client from ...models.async_api_call_results_page import AsyncApiCallResultsPage from ...models.error import Error from ...models.created_at_sort_mode import CreatedAtSortMode -from ...models.api_call_status import APICallStatus +from ...models.api_call_status import ApiCallStatus from ...types import Response def _get_kwargs( limit: int, page_token: str, sort_by: CreatedAtSortMode, - status: APICallStatus, + status: ApiCallStatus, *, client: Client, ) -> Dict[str, Any]: @@ -56,7 +56,7 @@ def sync_detailed( limit: int, page_token: str, sort_by: CreatedAtSortMode, - status: APICallStatus, + status: ApiCallStatus, *, client: Client, ) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]: @@ -80,7 +80,7 @@ def sync( limit: int, page_token: str, sort_by: CreatedAtSortMode, - status: APICallStatus, + status: ApiCallStatus, *, client: Client, ) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]: @@ -100,7 +100,7 @@ async def asyncio_detailed( limit: int, page_token: str, sort_by: CreatedAtSortMode, - status: APICallStatus, + status: ApiCallStatus, *, client: Client, ) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]: @@ -122,7 +122,7 @@ async def asyncio( limit: int, page_token: str, sort_by: CreatedAtSortMode, - status: APICallStatus, + status: ApiCallStatus, *, client: Client, ) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]: diff --git a/kittycad/api/hidden/listen_auth_email.py b/kittycad/api/hidden/listen_auth_email.py new file mode 100644 index 000000000..17844c6fe --- /dev/null +++ b/kittycad/api/hidden/listen_auth_email.py @@ -0,0 +1,108 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.error import Error +from ...models.email_authentication_form import EmailAuthenticationForm +from ...types import Response + +def _get_kwargs( + body: EmailAuthenticationForm, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/auth/email".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(), + "content": body, + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]: + if response.status_code == 204: + response_204 = None + return response_204 + 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, Error]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + body: EmailAuthenticationForm, + *, + client: Client, +) -> Response[Union[Any, Error]]: + kwargs = _get_kwargs( + body=body, + client=client, + ) + + response = httpx.post( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + body: EmailAuthenticationForm, + *, + client: Client, +) -> Optional[Union[Any, Error]]: + + return sync_detailed( + body=body, + client=client, + ).parsed + + +async def asyncio_detailed( + body: EmailAuthenticationForm, + *, + client: Client, +) -> Response[Union[Any, Error]]: + kwargs = _get_kwargs( + body=body, + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.post(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + body: EmailAuthenticationForm, + *, + client: Client, +) -> Optional[Union[Any, Error]]: + + return ( + await asyncio_detailed( + body=body, + client=client, + ) + ).parsed diff --git a/kittycad/api/hidden/listen_auth_email_callback.py b/kittycad/api/hidden/listen_auth_email_callback.py new file mode 100644 index 000000000..3ffe5fdb5 --- /dev/null +++ b/kittycad/api/hidden/listen_auth_email_callback.py @@ -0,0 +1,125 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.empty import Empty +from ...models.error import Error +from ...types import Response + +def _get_kwargs( + callback_url: str, + email: str, + token: str, + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/auth/email/callback?callback_url={callback_url}&email={email}&token={token}".format(client.base_url, callback_url=callback_url, email=email, 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, Empty, Error]]: + if response.status_code == 302: + response_302 = Empty.from_dict(response.json()) + return response_302 + 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, Empty, Error]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + callback_url: str, + email: str, + token: str, + *, + client: Client, +) -> Response[Union[Any, Empty, Error]]: + kwargs = _get_kwargs( + callback_url=callback_url, + email=email, + token=token, + client=client, + ) + + response = httpx.get( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + callback_url: str, + email: str, + token: str, + *, + client: Client, +) -> Optional[Union[Any, Empty, Error]]: + + return sync_detailed( + callback_url=callback_url, + email=email, + token=token, + client=client, + ).parsed + + +async def asyncio_detailed( + callback_url: str, + email: str, + token: str, + *, + client: Client, +) -> Response[Union[Any, Empty, Error]]: + kwargs = _get_kwargs( + callback_url=callback_url, + email=email, + 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( + callback_url: str, + email: str, + token: str, + *, + client: Client, +) -> Optional[Union[Any, Empty, Error]]: + + return ( + await asyncio_detailed( + callback_url=callback_url, + email=email, + token=token, + client=client, + ) + ).parsed diff --git a/kittycad/api/hidden/login.py b/kittycad/api/hidden/logout.py similarity index 87% rename from kittycad/api/hidden/login.py rename to kittycad/api/hidden/logout.py index e8739671f..fb7048598 100644 --- a/kittycad/api/hidden/login.py +++ b/kittycad/api/hidden/logout.py @@ -4,15 +4,13 @@ import httpx from ...client import Client from ...models.error import Error -from ...models.login_params import LoginParams from ...types import Response def _get_kwargs( - body: LoginParams, *, client: Client, ) -> Dict[str, Any]: - url = "{}/login".format(client.base_url) + url = "{}/logout".format(client.base_url) headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -22,7 +20,6 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), - "content": body, } @@ -49,12 +46,10 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, Error]]: def sync_detailed( - body: LoginParams, *, client: Client, ) -> Response[Union[Any, Error]]: kwargs = _get_kwargs( - body=body, client=client, ) @@ -67,24 +62,21 @@ def sync_detailed( def sync( - body: LoginParams, *, client: Client, ) -> Optional[Union[Any, Error]]: + """ This is used in logout scenarios. """ return sync_detailed( - body=body, client=client, ).parsed async def asyncio_detailed( - body: LoginParams, *, client: Client, ) -> Response[Union[Any, Error]]: kwargs = _get_kwargs( - body=body, client=client, ) @@ -95,14 +87,13 @@ async def asyncio_detailed( async def asyncio( - body: LoginParams, *, client: Client, ) -> Optional[Union[Any, Error]]: + """ This is used in logout scenarios. """ return ( await asyncio_detailed( - body=body, client=client, ) ).parsed diff --git a/kittycad/api/oauth2/__init__.py b/kittycad/api/oauth2/__init__.py new file mode 100644 index 000000000..9fa63bf5c --- /dev/null +++ b/kittycad/api/oauth2/__init__.py @@ -0,0 +1 @@ +""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ diff --git a/kittycad/api/users/get_user_self_extended.py b/kittycad/api/users/get_user_self_extended.py index 75f3b02d0..0a12d8020 100644 --- a/kittycad/api/users/get_user_self_extended.py +++ b/kittycad/api/users/get_user_self_extended.py @@ -67,7 +67,7 @@ def sync( client: Client, ) -> Optional[Union[Any, ExtendedUser, Error]]: """ Get the user information for the authenticated user. -Alternatively, you can also use the `/users/me` endpoint. """ +Alternatively, you can also use the `/users-extended/me` endpoint. """ return sync_detailed( client=client, @@ -93,7 +93,7 @@ async def asyncio( client: Client, ) -> Optional[Union[Any, ExtendedUser, Error]]: """ Get the user information for the authenticated user. -Alternatively, you can also use the `/users/me` endpoint. """ +Alternatively, you can also use the `/users-extended/me` endpoint. """ return ( await asyncio_detailed( diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 5725ba1be..51e28e822 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -1,30 +1,40 @@ """ Contains all the data models used in inputs/outputs """ -from .api_call_status import APICallStatus +from .account_provider import AccountProvider from .address import Address from .api_call_query_group import ApiCallQueryGroup from .api_call_query_group_by import ApiCallQueryGroupBy +from .api_call_status import ApiCallStatus from .api_call_with_price import ApiCallWithPrice from .api_call_with_price_results_page import ApiCallWithPriceResultsPage from .api_token import ApiToken from .api_token_results_page import ApiTokenResultsPage -from .async_api_call_type import AsyncAPICallType from .async_api_call import AsyncApiCall from .async_api_call_results_page import AsyncApiCallResultsPage +from .async_api_call_type import AsyncApiCallType +from .base64_data import Base64Data from .billing_info import BillingInfo from .cache_metadata import CacheMetadata from .card_details import CardDetails from .cluster import Cluster from .code_language import CodeLanguage from .code_output import CodeOutput +from .commit import Commit from .connection import Connection from .created_at_sort_mode import CreatedAtSortMode from .currency import Currency from .customer import Customer +from .device_access_token_request_form import DeviceAccessTokenRequestForm +from .device_auth_request_form import DeviceAuthRequestForm +from .device_auth_verify_params import DeviceAuthVerifyParams +from .docker_system_info import DockerSystemInfo from .duration import Duration +from .email_authentication_form import EmailAuthenticationForm +from .empty import Empty from .engine_metadata import EngineMetadata from .environment import Environment from .error import Error +from .executor_metadata import ExecutorMetadata from .extended_user import ExtendedUser from .extended_user_results_page import ExtendedUserResultsPage from .file_conversion import FileConversion @@ -35,27 +45,37 @@ from .file_source_format import FileSourceFormat from .file_system_metadata import FileSystemMetadata from .file_volume import FileVolume from .gateway import Gateway +from .index_info import IndexInfo from .invoice import Invoice from .invoice_line_item import InvoiceLineItem from .invoice_status import InvoiceStatus +from .ip_addr import IpAddr 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 .login_params import LoginParams from .meta_cluster_info import MetaClusterInfo from .metadata import Metadata from .method import Method +from .o_auth2_client_info import OAuth2ClientInfo +from .o_auth2_grant_type import OAuth2GrantType from .output_file import OutputFile from .payment_intent import PaymentIntent from .payment_method import PaymentMethod from .payment_method_card_checks import PaymentMethodCardChecks from .payment_method_type import PaymentMethodType from .phone_number import PhoneNumber +from .plugins_info import PluginsInfo from .pong import Pong +from .registry_service_config import RegistryServiceConfig +from .runtime import Runtime from .session import Session from .status_code import StatusCode +from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum +from .system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum +from .system_info_default_address_pools import SystemInfoDefaultAddressPools +from .system_info_isolation_enum import SystemInfoIsolationEnum from .unit_conversion import UnitConversion from .unit_metric_format import UnitMetricFormat from .update_user import UpdateUser diff --git a/kittycad/models/account_provider.py b/kittycad/models/account_provider.py new file mode 100644 index 000000000..e64437b6f --- /dev/null +++ b/kittycad/models/account_provider.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AccountProvider(str, Enum): + GOOGLE = 'google' + GITHUB = 'github' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_status.py b/kittycad/models/api_call_status.py index 7d56584ec..0abae14b2 100644 --- a/kittycad/models/api_call_status.py +++ b/kittycad/models/api_call_status.py @@ -1,7 +1,7 @@ from enum import Enum -class APICallStatus(str, Enum): +class ApiCallStatus(str, Enum): QUEUED = 'Queued' UPLOADED = 'Uploaded' IN_PROGRESS = 'In Progress' diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index 28c1575ee..f5a040bbc 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -4,7 +4,9 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr from dateutil.parser import isoparse +from ..models.duration import Duration from ..models.uuid import Uuid +from ..models.ip_addr import IpAddr from ..models.method import Method from ..models.status_code import StatusCode from ..types import UNSET, Unset @@ -17,11 +19,11 @@ class ApiCallWithPrice: """ """ completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET - duration: Union[Unset, int] = UNSET + duration: Union[Unset, Duration] = UNSET email: Union[Unset, str] = UNSET endpoint: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET - ip_address: Union[Unset, str] = UNSET + ip_address: Union[Unset, IpAddr] = UNSET method: Union[Unset, Method] = UNSET minutes: Union[Unset, int] = UNSET origin: Union[Unset, str] = UNSET @@ -46,11 +48,15 @@ class ApiCallWithPrice: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - duration = self.duration + duration: Union[Unset, str] = UNSET + if not isinstance(self.duration, Unset): + duration = self.duration.value email = self.email endpoint = self.endpoint id = self.id - ip_address = self.ip_address + ip_address: Union[Unset, str] = UNSET + if not isinstance(self.ip_address, Unset): + ip_address = self.ip_address.value method: Union[Unset, str] = UNSET if not isinstance(self.method, Unset): method = self.method.value @@ -139,7 +145,12 @@ class ApiCallWithPrice: else: created_at = isoparse(_created_at) - duration = d.pop("duration", UNSET) + _duration = d.pop("duration", UNSET) + duration: Union[Unset, Duration] + if isinstance(_duration, Unset): + duration = UNSET + else: + duration = Duration(_duration) email = d.pop("email", UNSET) @@ -147,7 +158,12 @@ class ApiCallWithPrice: id = d.pop("id", UNSET) - ip_address = d.pop("ip_address", UNSET) + _ip_address = d.pop("ip_address", UNSET) + ip_address: Union[Unset, IpAddr] + if isinstance(_ip_address, Unset): + ip_address = UNSET + else: + ip_address = IpAddr(_ip_address) _method = d.pop("method", UNSET) method: Union[Unset, Method] diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index 345105bef..b8a19aa9c 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -5,8 +5,8 @@ import attr from dateutil.parser import isoparse from ..models.uuid import Uuid -from ..models.api_call_status import APICallStatus -from ..models.async_api_call_type import AsyncAPICallType +from ..models.api_call_status import ApiCallStatus +from ..models.async_api_call_type import AsyncApiCallType from ..types import UNSET, Unset T = TypeVar("T", bound="AsyncApiCall") @@ -22,8 +22,8 @@ class AsyncApiCall: input: Union[Unset, Any] = UNSET output: Union[Unset, Any] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, APICallStatus] = UNSET - type: Union[Unset, AsyncAPICallType] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: Union[Unset, AsyncApiCallType] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET worker: Union[Unset, str] = UNSET @@ -117,18 +117,18 @@ class AsyncApiCall: started_at = isoparse(_started_at) _status = d.pop("status", UNSET) - status: Union[Unset, APICallStatus] + status: Union[Unset, ApiCallStatus] if isinstance(_status, Unset): status = UNSET else: - status = APICallStatus(_status) + status = ApiCallStatus(_status) _type = d.pop("type", UNSET) - type: Union[Unset, AsyncAPICallType] + type: Union[Unset, AsyncApiCallType] if isinstance(_type, Unset): type = UNSET else: - type = AsyncAPICallType(_type) + type = AsyncApiCallType(_type) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/async_api_call_type.py b/kittycad/models/async_api_call_type.py index 480916479..98bed02d1 100644 --- a/kittycad/models/async_api_call_type.py +++ b/kittycad/models/async_api_call_type.py @@ -1,7 +1,7 @@ from enum import Enum -class AsyncAPICallType(str, Enum): +class AsyncApiCallType(str, Enum): FILE_CONVERSION = 'FileConversion' FILE_VOLUME = 'FileVolume' FILE_MASS = 'FileMass' diff --git a/kittycad/models/base64_data.py b/kittycad/models/base64_data.py new file mode 100644 index 000000000..4b90230a8 --- /dev/null +++ b/kittycad/models/base64_data.py @@ -0,0 +1,4 @@ +class Base64Data(str): + + def __str__(self) -> str: + return self diff --git a/kittycad/models/code_language.py b/kittycad/models/code_language.py index 33eccd299..c8461d8ab 100644 --- a/kittycad/models/code_language.py +++ b/kittycad/models/code_language.py @@ -3,7 +3,6 @@ from enum import Enum class CodeLanguage(str, Enum): GO = 'go' - RUST = 'rust' PYTHON = 'python' NODE = 'node' diff --git a/kittycad/models/commit.py b/kittycad/models/commit.py new file mode 100644 index 000000000..91f9edf36 --- /dev/null +++ b/kittycad/models/commit.py @@ -0,0 +1,61 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Commit") + + +@attr.s(auto_attribs=True) +class Commit: + """ """ + expected: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expected = self.expected + id = self.id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if expected is not UNSET: + field_dict['expected'] = expected + if id is not UNSET: + field_dict['id'] = id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expected = d.pop("expected", UNSET) + + id = d.pop("id", UNSET) + + commit = cls( + expected=expected, + id=id, + ) + + commit.additional_properties = d + return commit + + @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/connection.py b/kittycad/models/connection.py index 1b9c83f49..01b21a4ab 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -8,7 +8,6 @@ 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="Connection") @@ -33,10 +32,8 @@ class Connection: http_port: Union[Unset, int] = UNSET http_req_stats: Union[Unset, Any] = UNSET https_port: Union[Unset, int] = UNSET - id: Union[Unset, int] = UNSET in_bytes: Union[Unset, int] = UNSET in_msgs: Union[Unset, int] = UNSET - ip: Union[Unset, str] = UNSET jetstream: Union[Unset, Jetstream] = UNSET leaf: Union[Unset, LeafNode] = UNSET leafnodes: Union[Unset, int] = UNSET @@ -54,7 +51,6 @@ class Connection: proto: Union[Unset, int] = UNSET remotes: Union[Unset, int] = UNSET routes: Union[Unset, int] = UNSET - rtt: Union[Unset, Duration] = UNSET server_id: Union[Unset, str] = UNSET server_name: Union[Unset, str] = UNSET slow_consumers: Union[Unset, int] = UNSET @@ -92,10 +88,8 @@ class Connection: http_port = self.http_port http_req_stats = self.http_req_stats https_port = self.https_port - id = self.id in_bytes = self.in_bytes in_msgs = self.in_msgs - ip = self.ip jetstream: Union[Unset, str] = UNSET if not isinstance(self.jetstream, Unset): jetstream = self.jetstream.value @@ -119,9 +113,6 @@ class Connection: proto = self.proto remotes = self.remotes routes = self.routes - rtt: Union[Unset, str] = UNSET - if not isinstance(self.rtt, Unset): - rtt = self.rtt.value server_id = self.server_id server_name = self.server_name slow_consumers = self.slow_consumers @@ -171,14 +162,10 @@ class Connection: field_dict['http_req_stats'] = http_req_stats if https_port is not UNSET: field_dict['https_port'] = https_port - if id is not UNSET: - field_dict['id'] = id if in_bytes is not UNSET: field_dict['in_bytes'] = in_bytes if in_msgs is not UNSET: field_dict['in_msgs'] = in_msgs - if ip is not UNSET: - field_dict['ip'] = ip if jetstream is not UNSET: field_dict['jetstream'] = jetstream if leaf is not UNSET: @@ -213,8 +200,6 @@ class Connection: field_dict['remotes'] = remotes if routes is not UNSET: field_dict['routes'] = routes - if rtt is not UNSET: - field_dict['rtt'] = rtt if server_id is not UNSET: field_dict['server_id'] = server_id if server_name is not UNSET: @@ -289,14 +274,10 @@ class Connection: http_req_stats = d.pop("http_req_stats", UNSET) https_port = d.pop("https_port", UNSET) - id = d.pop("id", UNSET) - in_bytes = d.pop("in_bytes", UNSET) in_msgs = d.pop("in_msgs", UNSET) - ip = d.pop("ip", UNSET) - _jetstream = d.pop("jetstream", UNSET) jetstream: Union[Unset, Jetstream] if isinstance(_jetstream, Unset): @@ -346,13 +327,6 @@ class Connection: routes = d.pop("routes", UNSET) - _rtt = d.pop("rtt", UNSET) - rtt: Union[Unset, Duration] - if isinstance(_rtt, Unset): - rtt = UNSET - else: - rtt = Duration(_rtt) - server_id = d.pop("server_id", UNSET) server_name = d.pop("server_name", UNSET) @@ -397,10 +371,8 @@ class Connection: http_port=http_port, http_req_stats=http_req_stats, https_port=https_port, - id=id, in_bytes=in_bytes, in_msgs=in_msgs, - ip=ip, jetstream=jetstream, leaf=leaf, leafnodes=leafnodes, @@ -418,7 +390,6 @@ class Connection: proto=proto, remotes=remotes, routes=routes, - rtt=rtt, server_id=server_id, server_name=server_name, slow_consumers=slow_consumers, diff --git a/kittycad/models/device_access_token_request_form.py b/kittycad/models/device_access_token_request_form.py new file mode 100644 index 000000000..52c1e5d9e --- /dev/null +++ b/kittycad/models/device_access_token_request_form.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.o_auth2_grant_type import OAuth2GrantType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DeviceAccessTokenRequestForm") + + +@attr.s(auto_attribs=True) +class DeviceAccessTokenRequestForm: + """ """ + client_id: Union[Unset, str] = UNSET + device_code: Union[Unset, str] = UNSET + grant_type: Union[Unset, OAuth2GrantType] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + client_id = self.client_id + device_code = self.device_code + grant_type: Union[Unset, str] = UNSET + if not isinstance(self.grant_type, Unset): + grant_type = self.grant_type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_id is not UNSET: + field_dict['client_id'] = client_id + if device_code is not UNSET: + field_dict['device_code'] = device_code + if grant_type is not UNSET: + field_dict['grant_type'] = grant_type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + client_id = d.pop("client_id", UNSET) + + device_code = d.pop("device_code", UNSET) + + _grant_type = d.pop("grant_type", UNSET) + grant_type: Union[Unset, OAuth2GrantType] + if isinstance(_grant_type, Unset): + grant_type = UNSET + else: + grant_type = OAuth2GrantType(_grant_type) + + device_access_token_request_form = cls( + client_id=client_id, + device_code=device_code, + grant_type=grant_type, + ) + + device_access_token_request_form.additional_properties = d + return device_access_token_request_form + + @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/login_params.py b/kittycad/models/device_auth_request_form.py similarity index 69% rename from kittycad/models/login_params.py rename to kittycad/models/device_auth_request_form.py index 3ec5a8f7b..d14b1da09 100644 --- a/kittycad/models/login_params.py +++ b/kittycad/models/device_auth_request_form.py @@ -4,38 +4,38 @@ import attr from ..types import UNSET, Unset -T = TypeVar("T", bound="LoginParams") +T = TypeVar("T", bound="DeviceAuthRequestForm") @attr.s(auto_attribs=True) -class LoginParams: +class DeviceAuthRequestForm: """ """ - session: Union[Unset, str] = UNSET + client_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - session = self.session + client_id = self.client_id field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if session is not UNSET: - field_dict['session'] = session + if client_id is not UNSET: + field_dict['client_id'] = client_id return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() - session = d.pop("session", UNSET) + client_id = d.pop("client_id", UNSET) - login_params = cls( - session=session, + device_auth_request_form = cls( + client_id=client_id, ) - login_params.additional_properties = d - return login_params + device_auth_request_form.additional_properties = d + return device_auth_request_form @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/device_auth_verify_params.py b/kittycad/models/device_auth_verify_params.py new file mode 100644 index 000000000..3e95100b6 --- /dev/null +++ b/kittycad/models/device_auth_verify_params.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="DeviceAuthVerifyParams") + + +@attr.s(auto_attribs=True) +class DeviceAuthVerifyParams: + """ """ + user_code: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + user_code = self.user_code + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user_code is not UNSET: + field_dict['user_code'] = user_code + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + user_code = d.pop("user_code", UNSET) + + device_auth_verify_params = cls( + user_code=user_code, + ) + + device_auth_verify_params.additional_properties = d + return device_auth_verify_params + + @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/docker_system_info.py b/kittycad/models/docker_system_info.py new file mode 100644 index 000000000..24ad44bd1 --- /dev/null +++ b/kittycad/models/docker_system_info.py @@ -0,0 +1,546 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum +from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum +from ..models.commit import Commit +from ..models.system_info_isolation_enum import SystemInfoIsolationEnum +from ..models.plugins_info import PluginsInfo +from ..models.registry_service_config import RegistryServiceConfig +from ..models.runtime import Runtime +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DockerSystemInfo") + + +@attr.s(auto_attribs=True) +class DockerSystemInfo: + """ """ + architecture: Union[Unset, str] = UNSET + bridge_nf_ip6tables: Union[Unset, bool] = False + bridge_nf_iptables: Union[Unset, bool] = False + cgroup_driver: Union[Unset, SystemInfoCgroupDriverEnum] = UNSET + cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum] = UNSET + cluster_advertise: Union[Unset, str] = UNSET + cluster_store: Union[Unset, str] = UNSET + containerd_commit: Union[Unset, Commit] = UNSET + containers: Union[Unset, int] = UNSET + containers_paused: Union[Unset, int] = UNSET + containers_running: Union[Unset, int] = UNSET + containers_stopped: Union[Unset, int] = UNSET + cpu_cfs_period: Union[Unset, bool] = False + cpu_cfs_quota: Union[Unset, bool] = False + cpu_set: Union[Unset, bool] = False + cpu_shares: Union[Unset, bool] = False + debug: Union[Unset, bool] = False + from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools + default_address_pools: Union[Unset, + List[SystemInfoDefaultAddressPools]] = UNSET + default_runtime: Union[Unset, str] = UNSET + docker_root_dir: Union[Unset, str] = UNSET + driver: Union[Unset, str] = UNSET + driver_status: Union[Unset, List[List[str]]] = UNSET + experimental_build: Union[Unset, bool] = False + http_proxy: Union[Unset, str] = UNSET + https_proxy: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + images: Union[Unset, int] = UNSET + index_server_address: Union[Unset, str] = UNSET + init_binary: Union[Unset, str] = UNSET + init_commit: Union[Unset, Commit] = UNSET + ipv4_forwarding: Union[Unset, bool] = False + isolation: Union[Unset, SystemInfoIsolationEnum] = UNSET + kernel_memory: Union[Unset, bool] = False + kernel_memory_tcp: Union[Unset, bool] = False + kernel_version: Union[Unset, str] = UNSET + labels: Union[Unset, List[str]] = UNSET + live_restore_enabled: Union[Unset, bool] = False + logging_driver: Union[Unset, str] = UNSET + mem_total: Union[Unset, int] = UNSET + memory_limit: Union[Unset, bool] = False + n_events_listener: Union[Unset, int] = UNSET + n_fd: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + ncpu: Union[Unset, int] = UNSET + no_proxy: Union[Unset, str] = UNSET + oom_kill_disable: Union[Unset, bool] = False + operating_system: Union[Unset, str] = UNSET + os_type: Union[Unset, str] = UNSET + os_version: Union[Unset, str] = UNSET + pids_limit: Union[Unset, bool] = False + plugins: Union[Unset, PluginsInfo] = UNSET + product_license: Union[Unset, str] = UNSET + registry_config: Union[Unset, RegistryServiceConfig] = UNSET + runc_commit: Union[Unset, Commit] = UNSET + runtimes: Union[Unset, Any] = UNSET + security_options: Union[Unset, List[str]] = UNSET + server_version: Union[Unset, str] = UNSET + swap_limit: Union[Unset, bool] = False + system_time: Union[Unset, str] = UNSET + warnings: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + architecture = self.architecture + bridge_nf_ip6tables = self.bridge_nf_ip6tables + bridge_nf_iptables = self.bridge_nf_iptables + cgroup_driver: Union[Unset, str] = UNSET + if not isinstance(self.cgroup_driver, Unset): + cgroup_driver = self.cgroup_driver.value + cgroup_version: Union[Unset, str] = UNSET + if not isinstance(self.cgroup_version, Unset): + cgroup_version = self.cgroup_version.value + cluster_advertise = self.cluster_advertise + cluster_store = self.cluster_store + containerd_commit: Union[Unset, str] = UNSET + if not isinstance(self.containerd_commit, Unset): + containerd_commit = self.containerd_commit.value + containers = self.containers + containers_paused = self.containers_paused + containers_running = self.containers_running + containers_stopped = self.containers_stopped + cpu_cfs_period = self.cpu_cfs_period + cpu_cfs_quota = self.cpu_cfs_quota + cpu_set = self.cpu_set + cpu_shares = self.cpu_shares + debug = self.debug + from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools + default_address_pools: Union[Unset, + List[SystemInfoDefaultAddressPools]] = UNSET + if not isinstance(self.default_address_pools, Unset): + default_address_pools = self.default_address_pools + default_runtime = self.default_runtime + docker_root_dir = self.docker_root_dir + driver = self.driver + driver_status: Union[Unset, List[List[str]]] = UNSET + if not isinstance(self.driver_status, Unset): + driver_status = self.driver_status + experimental_build = self.experimental_build + http_proxy = self.http_proxy + https_proxy = self.https_proxy + id = self.id + images = self.images + index_server_address = self.index_server_address + init_binary = self.init_binary + init_commit: Union[Unset, str] = UNSET + if not isinstance(self.init_commit, Unset): + init_commit = self.init_commit.value + ipv4_forwarding = self.ipv4_forwarding + isolation: Union[Unset, str] = UNSET + if not isinstance(self.isolation, Unset): + isolation = self.isolation.value + kernel_memory = self.kernel_memory + kernel_memory_tcp = self.kernel_memory_tcp + kernel_version = self.kernel_version + labels: Union[Unset, List[str]] = UNSET + if not isinstance(self.labels, Unset): + labels = self.labels + live_restore_enabled = self.live_restore_enabled + logging_driver = self.logging_driver + mem_total = self.mem_total + memory_limit = self.memory_limit + n_events_listener = self.n_events_listener + n_fd = self.n_fd + name = self.name + ncpu = self.ncpu + no_proxy = self.no_proxy + oom_kill_disable = self.oom_kill_disable + operating_system = self.operating_system + os_type = self.os_type + os_version = self.os_version + pids_limit = self.pids_limit + plugins: Union[Unset, str] = UNSET + if not isinstance(self.plugins, Unset): + plugins = self.plugins.value + product_license = self.product_license + registry_config: Union[Unset, str] = UNSET + if not isinstance(self.registry_config, Unset): + registry_config = self.registry_config.value + runc_commit: Union[Unset, str] = UNSET + if not isinstance(self.runc_commit, Unset): + runc_commit = self.runc_commit.value + runtimes = self.runtimes + security_options: Union[Unset, List[str]] = UNSET + if not isinstance(self.security_options, Unset): + security_options = self.security_options + server_version = self.server_version + swap_limit = self.swap_limit + system_time = self.system_time + warnings: Union[Unset, List[str]] = UNSET + if not isinstance(self.warnings, Unset): + warnings = self.warnings + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if architecture is not UNSET: + field_dict['architecture'] = architecture + if bridge_nf_ip6tables is not UNSET: + field_dict['bridge_nf_ip6tables'] = bridge_nf_ip6tables + if bridge_nf_iptables is not UNSET: + field_dict['bridge_nf_iptables'] = bridge_nf_iptables + if cgroup_driver is not UNSET: + field_dict['cgroup_driver'] = cgroup_driver + if cgroup_version is not UNSET: + field_dict['cgroup_version'] = cgroup_version + if cluster_advertise is not UNSET: + field_dict['cluster_advertise'] = cluster_advertise + if cluster_store is not UNSET: + field_dict['cluster_store'] = cluster_store + if containerd_commit is not UNSET: + field_dict['containerd_commit'] = containerd_commit + if containers is not UNSET: + field_dict['containers'] = containers + if containers_paused is not UNSET: + field_dict['containers_paused'] = containers_paused + if containers_running is not UNSET: + field_dict['containers_running'] = containers_running + if containers_stopped is not UNSET: + field_dict['containers_stopped'] = containers_stopped + if cpu_cfs_period is not UNSET: + field_dict['cpu_cfs_period'] = cpu_cfs_period + if cpu_cfs_quota is not UNSET: + field_dict['cpu_cfs_quota'] = cpu_cfs_quota + if cpu_set is not UNSET: + field_dict['cpu_set'] = cpu_set + if cpu_shares is not UNSET: + field_dict['cpu_shares'] = cpu_shares + if debug is not UNSET: + field_dict['debug'] = debug + if default_address_pools is not UNSET: + field_dict['default_address_pools'] = default_address_pools + if default_runtime is not UNSET: + field_dict['default_runtime'] = default_runtime + if docker_root_dir is not UNSET: + field_dict['docker_root_dir'] = docker_root_dir + if driver is not UNSET: + field_dict['driver'] = driver + if driver_status is not UNSET: + field_dict['driver_status'] = driver_status + if experimental_build is not UNSET: + field_dict['experimental_build'] = experimental_build + if http_proxy is not UNSET: + field_dict['http_proxy'] = http_proxy + if https_proxy is not UNSET: + field_dict['https_proxy'] = https_proxy + if id is not UNSET: + field_dict['id'] = id + if images is not UNSET: + field_dict['images'] = images + if index_server_address is not UNSET: + field_dict['index_server_address'] = index_server_address + if init_binary is not UNSET: + field_dict['init_binary'] = init_binary + if init_commit is not UNSET: + field_dict['init_commit'] = init_commit + if ipv4_forwarding is not UNSET: + field_dict['ipv4_forwarding'] = ipv4_forwarding + if isolation is not UNSET: + field_dict['isolation'] = isolation + if kernel_memory is not UNSET: + field_dict['kernel_memory'] = kernel_memory + if kernel_memory_tcp is not UNSET: + field_dict['kernel_memory_tcp'] = kernel_memory_tcp + if kernel_version is not UNSET: + field_dict['kernel_version'] = kernel_version + if labels is not UNSET: + field_dict['labels'] = labels + if live_restore_enabled is not UNSET: + field_dict['live_restore_enabled'] = live_restore_enabled + if logging_driver is not UNSET: + field_dict['logging_driver'] = logging_driver + if mem_total is not UNSET: + field_dict['mem_total'] = mem_total + if memory_limit is not UNSET: + field_dict['memory_limit'] = memory_limit + if n_events_listener is not UNSET: + field_dict['n_events_listener'] = n_events_listener + if n_fd is not UNSET: + field_dict['n_fd'] = n_fd + if name is not UNSET: + field_dict['name'] = name + if ncpu is not UNSET: + field_dict['ncpu'] = ncpu + if no_proxy is not UNSET: + field_dict['no_proxy'] = no_proxy + if oom_kill_disable is not UNSET: + field_dict['oom_kill_disable'] = oom_kill_disable + if operating_system is not UNSET: + field_dict['operating_system'] = operating_system + if os_type is not UNSET: + field_dict['os_type'] = os_type + if os_version is not UNSET: + field_dict['os_version'] = os_version + if pids_limit is not UNSET: + field_dict['pids_limit'] = pids_limit + if plugins is not UNSET: + field_dict['plugins'] = plugins + if product_license is not UNSET: + field_dict['product_license'] = product_license + if registry_config is not UNSET: + field_dict['registry_config'] = registry_config + if runc_commit is not UNSET: + field_dict['runc_commit'] = runc_commit + if runtimes is not UNSET: + field_dict['runtimes'] = runtimes + if security_options is not UNSET: + field_dict['security_options'] = security_options + if server_version is not UNSET: + field_dict['server_version'] = server_version + if swap_limit is not UNSET: + field_dict['swap_limit'] = swap_limit + if system_time is not UNSET: + field_dict['system_time'] = system_time + if warnings is not UNSET: + field_dict['warnings'] = warnings + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + architecture = d.pop("architecture", UNSET) + + bridge_nf_ip6tables = d.pop("bridge_nf_ip6tables", UNSET) + + bridge_nf_iptables = d.pop("bridge_nf_iptables", UNSET) + + _cgroup_driver = d.pop("cgroup_driver", UNSET) + cgroup_driver: Union[Unset, SystemInfoCgroupDriverEnum] + if isinstance(_cgroup_driver, Unset): + cgroup_driver = UNSET + else: + cgroup_driver = SystemInfoCgroupDriverEnum(_cgroup_driver) + + _cgroup_version = d.pop("cgroup_version", UNSET) + cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum] + if isinstance(_cgroup_version, Unset): + cgroup_version = UNSET + else: + cgroup_version = SystemInfoCgroupVersionEnum(_cgroup_version) + + cluster_advertise = d.pop("cluster_advertise", UNSET) + + cluster_store = d.pop("cluster_store", UNSET) + + _containerd_commit = d.pop("containerd_commit", UNSET) + containerd_commit: Union[Unset, Commit] + if isinstance(_containerd_commit, Unset): + containerd_commit = UNSET + else: + containerd_commit = Commit(_containerd_commit) + + containers = d.pop("containers", UNSET) + + containers_paused = d.pop("containers_paused", UNSET) + + containers_running = d.pop("containers_running", UNSET) + + containers_stopped = d.pop("containers_stopped", UNSET) + + cpu_cfs_period = d.pop("cpu_cfs_period", UNSET) + + cpu_cfs_quota = d.pop("cpu_cfs_quota", UNSET) + + cpu_set = d.pop("cpu_set", UNSET) + + cpu_shares = d.pop("cpu_shares", UNSET) + + debug = d.pop("debug", UNSET) + + from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools + default_address_pools = cast( + List[SystemInfoDefaultAddressPools], d.pop( + "default_address_pools", UNSET)) + + default_runtime = d.pop("default_runtime", UNSET) + + docker_root_dir = d.pop("docker_root_dir", UNSET) + + driver = d.pop("driver", UNSET) + + driver_status = cast(List[List[str]], d.pop("driver_status", UNSET)) + + experimental_build = d.pop("experimental_build", UNSET) + + http_proxy = d.pop("http_proxy", UNSET) + + https_proxy = d.pop("https_proxy", UNSET) + + id = d.pop("id", UNSET) + + images = d.pop("images", UNSET) + + index_server_address = d.pop("index_server_address", UNSET) + + init_binary = d.pop("init_binary", UNSET) + + _init_commit = d.pop("init_commit", UNSET) + init_commit: Union[Unset, Commit] + if isinstance(_init_commit, Unset): + init_commit = UNSET + else: + init_commit = Commit(_init_commit) + + ipv4_forwarding = d.pop("ipv4_forwarding", UNSET) + + _isolation = d.pop("isolation", UNSET) + isolation: Union[Unset, SystemInfoIsolationEnum] + if isinstance(_isolation, Unset): + isolation = UNSET + else: + isolation = SystemInfoIsolationEnum(_isolation) + + kernel_memory = d.pop("kernel_memory", UNSET) + + kernel_memory_tcp = d.pop("kernel_memory_tcp", UNSET) + + kernel_version = d.pop("kernel_version", UNSET) + + labels = cast(List[str], d.pop("labels", UNSET)) + + live_restore_enabled = d.pop("live_restore_enabled", UNSET) + + logging_driver = d.pop("logging_driver", UNSET) + + mem_total = d.pop("mem_total", UNSET) + + memory_limit = d.pop("memory_limit", UNSET) + + n_events_listener = d.pop("n_events_listener", UNSET) + + n_fd = d.pop("n_fd", UNSET) + + name = d.pop("name", UNSET) + + ncpu = d.pop("ncpu", UNSET) + + no_proxy = d.pop("no_proxy", UNSET) + + oom_kill_disable = d.pop("oom_kill_disable", UNSET) + + operating_system = d.pop("operating_system", UNSET) + + os_type = d.pop("os_type", UNSET) + + os_version = d.pop("os_version", UNSET) + + pids_limit = d.pop("pids_limit", UNSET) + + _plugins = d.pop("plugins", UNSET) + plugins: Union[Unset, PluginsInfo] + if isinstance(_plugins, Unset): + plugins = UNSET + else: + plugins = PluginsInfo(_plugins) + + product_license = d.pop("product_license", UNSET) + + _registry_config = d.pop("registry_config", UNSET) + registry_config: Union[Unset, RegistryServiceConfig] + if isinstance(_registry_config, Unset): + registry_config = UNSET + else: + registry_config = RegistryServiceConfig(_registry_config) + + _runc_commit = d.pop("runc_commit", UNSET) + runc_commit: Union[Unset, Commit] + if isinstance(_runc_commit, Unset): + runc_commit = UNSET + else: + runc_commit = Commit(_runc_commit) + + runtimes = d.pop("runtimes", UNSET) + security_options = cast(List[str], d.pop("security_options", UNSET)) + + server_version = d.pop("server_version", UNSET) + + swap_limit = d.pop("swap_limit", UNSET) + + system_time = d.pop("system_time", UNSET) + + warnings = cast(List[str], d.pop("warnings", UNSET)) + + docker_system_info = cls( + architecture=architecture, + bridge_nf_ip6tables=bridge_nf_ip6tables, + bridge_nf_iptables=bridge_nf_iptables, + cgroup_driver=cgroup_driver, + cgroup_version=cgroup_version, + cluster_advertise=cluster_advertise, + cluster_store=cluster_store, + containerd_commit=containerd_commit, + containers=containers, + containers_paused=containers_paused, + containers_running=containers_running, + containers_stopped=containers_stopped, + cpu_cfs_period=cpu_cfs_period, + cpu_cfs_quota=cpu_cfs_quota, + cpu_set=cpu_set, + cpu_shares=cpu_shares, + debug=debug, + default_address_pools=default_address_pools, + default_runtime=default_runtime, + docker_root_dir=docker_root_dir, + driver=driver, + driver_status=driver_status, + experimental_build=experimental_build, + http_proxy=http_proxy, + https_proxy=https_proxy, + id=id, + images=images, + index_server_address=index_server_address, + init_binary=init_binary, + init_commit=init_commit, + ipv4_forwarding=ipv4_forwarding, + isolation=isolation, + kernel_memory=kernel_memory, + kernel_memory_tcp=kernel_memory_tcp, + kernel_version=kernel_version, + labels=labels, + live_restore_enabled=live_restore_enabled, + logging_driver=logging_driver, + mem_total=mem_total, + memory_limit=memory_limit, + n_events_listener=n_events_listener, + n_fd=n_fd, + name=name, + ncpu=ncpu, + no_proxy=no_proxy, + oom_kill_disable=oom_kill_disable, + operating_system=operating_system, + os_type=os_type, + os_version=os_version, + pids_limit=pids_limit, + plugins=plugins, + product_license=product_license, + registry_config=registry_config, + runc_commit=runc_commit, + runtimes=runtimes, + security_options=security_options, + server_version=server_version, + swap_limit=swap_limit, + system_time=system_time, + warnings=warnings, + ) + + docker_system_info.additional_properties = d + return docker_system_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/email_authentication_form.py b/kittycad/models/email_authentication_form.py new file mode 100644 index 000000000..722010f59 --- /dev/null +++ b/kittycad/models/email_authentication_form.py @@ -0,0 +1,61 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EmailAuthenticationForm") + + +@attr.s(auto_attribs=True) +class EmailAuthenticationForm: + """ """ + callback_url: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + callback_url = self.callback_url + email = self.email + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if callback_url is not UNSET: + field_dict['callback_url'] = callback_url + if email is not UNSET: + field_dict['email'] = email + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + callback_url = d.pop("callback_url", UNSET) + + email = d.pop("email", UNSET) + + email_authentication_form = cls( + callback_url=callback_url, + email=email, + ) + + email_authentication_form.additional_properties = d + return email_authentication_form + + @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/empty.py b/kittycad/models/empty.py new file mode 100644 index 000000000..52112ef10 --- /dev/null +++ b/kittycad/models/empty.py @@ -0,0 +1,4 @@ +class Empty(str): + + def __str__(self) -> str: + return self diff --git a/kittycad/models/executor_metadata.py b/kittycad/models/executor_metadata.py new file mode 100644 index 000000000..de02ef20a --- /dev/null +++ b/kittycad/models/executor_metadata.py @@ -0,0 +1,84 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.docker_system_info import DockerSystemInfo +from ..models.environment import Environment +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ExecutorMetadata") + + +@attr.s(auto_attribs=True) +class ExecutorMetadata: + """ """ + docker_info: Union[Unset, DockerSystemInfo] = UNSET + environment: Union[Unset, Environment] = UNSET + git_hash: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + docker_info: Union[Unset, str] = UNSET + if not isinstance(self.docker_info, Unset): + docker_info = self.docker_info.value + environment: Union[Unset, str] = UNSET + if not isinstance(self.environment, Unset): + environment = self.environment.value + git_hash = self.git_hash + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if docker_info is not UNSET: + field_dict['docker_info'] = docker_info + if environment is not UNSET: + field_dict['environment'] = environment + if git_hash is not UNSET: + field_dict['git_hash'] = git_hash + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _docker_info = d.pop("docker_info", UNSET) + docker_info: Union[Unset, DockerSystemInfo] + if isinstance(_docker_info, Unset): + docker_info = UNSET + else: + docker_info = DockerSystemInfo(_docker_info) + + _environment = d.pop("environment", UNSET) + environment: Union[Unset, Environment] + if isinstance(_environment, Unset): + environment = UNSET + else: + environment = Environment(_environment) + + git_hash = d.pop("git_hash", UNSET) + + executor_metadata = cls( + docker_info=docker_info, + environment=environment, + git_hash=git_hash, + ) + + executor_metadata.additional_properties = d + return executor_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.py b/kittycad/models/file_conversion.py index 96dd3e28a..f13733eb8 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -5,9 +5,10 @@ import attr from dateutil.parser import isoparse from ..models.uuid import Uuid +from ..models.base64_data import Base64Data from ..models.file_output_format import FileOutputFormat from ..models.file_source_format import FileSourceFormat -from ..models.api_call_status import APICallStatus +from ..models.api_call_status import ApiCallStatus from ..types import UNSET, Unset T = TypeVar("T", bound="FileConversion") @@ -20,11 +21,11 @@ class FileConversion: created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET - output: Union[Unset, str] = UNSET + output: Union[Unset, Base64Data] = UNSET output_format: Union[Unset, FileOutputFormat] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, APICallStatus] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -39,7 +40,9 @@ class FileConversion: created_at = self.created_at.isoformat() error = self.error id = self.id - output = self.output + output: Union[Unset, str] = UNSET + if not isinstance(self.output, Unset): + output = self.output.value output_format: Union[Unset, str] = UNSET if not isinstance(self.output_format, Unset): output_format = self.output_format.value @@ -106,7 +109,12 @@ class FileConversion: id = d.pop("id", UNSET) - output = d.pop("output", UNSET) + _output = d.pop("output", UNSET) + output: Union[Unset, Base64Data] + if isinstance(_output, Unset): + output = UNSET + else: + output = Base64Data(_output) _output_format = d.pop("output_format", UNSET) output_format: Union[Unset, FileOutputFormat] @@ -130,11 +138,11 @@ class FileConversion: started_at = isoparse(_started_at) _status = d.pop("status", UNSET) - status: Union[Unset, APICallStatus] + status: Union[Unset, ApiCallStatus] if isinstance(_status, Unset): status = UNSET else: - status = APICallStatus(_status) + status = ApiCallStatus(_status) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index fa4deaed6..e30042937 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..models.file_source_format import FileSourceFormat -from ..models.api_call_status import APICallStatus +from ..models.api_call_status import ApiCallStatus from ..types import UNSET, Unset T = TypeVar("T", bound="FileDensity") @@ -23,7 +23,7 @@ class FileDensity: material_mass: Union[Unset, float] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, APICallStatus] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -122,11 +122,11 @@ class FileDensity: started_at = isoparse(_started_at) _status = d.pop("status", UNSET) - status: Union[Unset, APICallStatus] + status: Union[Unset, ApiCallStatus] if isinstance(_status, Unset): status = UNSET else: - status = APICallStatus(_status) + status = ApiCallStatus(_status) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index 0f44b95df..b91499464 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..models.file_source_format import FileSourceFormat -from ..models.api_call_status import APICallStatus +from ..models.api_call_status import ApiCallStatus from ..types import UNSET, Unset T = TypeVar("T", bound="FileMass") @@ -23,7 +23,7 @@ class FileMass: material_density: Union[Unset, float] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, APICallStatus] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -122,11 +122,11 @@ class FileMass: started_at = isoparse(_started_at) _status = d.pop("status", UNSET) - status: Union[Unset, APICallStatus] + status: Union[Unset, ApiCallStatus] if isinstance(_status, Unset): status = UNSET else: - status = APICallStatus(_status) + status = ApiCallStatus(_status) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 8e56b7107..ee2615e03 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..models.file_source_format import FileSourceFormat -from ..models.api_call_status import APICallStatus +from ..models.api_call_status import ApiCallStatus from ..types import UNSET, Unset T = TypeVar("T", bound="FileVolume") @@ -21,7 +21,7 @@ class FileVolume: id: Union[Unset, str] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, APICallStatus] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET volume: Union[Unset, float] = UNSET @@ -114,11 +114,11 @@ class FileVolume: started_at = isoparse(_started_at) _status = d.pop("status", UNSET) - status: Union[Unset, APICallStatus] + status: Union[Unset, ApiCallStatus] if isinstance(_status, Unset): status = UNSET else: - status = APICallStatus(_status) + status = ApiCallStatus(_status) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/index_info.py b/kittycad/models/index_info.py new file mode 100644 index 000000000..eff60e668 --- /dev/null +++ b/kittycad/models/index_info.py @@ -0,0 +1,77 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="IndexInfo") + + +@attr.s(auto_attribs=True) +class IndexInfo: + """ """ + mirrors: Union[Unset, List[str]] = UNSET + name: Union[Unset, str] = UNSET + official: Union[Unset, bool] = False + secure: Union[Unset, bool] = False + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + mirrors: Union[Unset, List[str]] = UNSET + if not isinstance(self.mirrors, Unset): + mirrors = self.mirrors + name = self.name + official = self.official + secure = self.secure + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if mirrors is not UNSET: + field_dict['mirrors'] = mirrors + if name is not UNSET: + field_dict['name'] = name + if official is not UNSET: + field_dict['official'] = official + if secure is not UNSET: + field_dict['secure'] = secure + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + mirrors = cast(List[str], d.pop("mirrors", UNSET)) + + name = d.pop("name", UNSET) + + official = d.pop("official", UNSET) + + secure = d.pop("secure", UNSET) + + index_info = cls( + mirrors=mirrors, + name=name, + official=official, + secure=secure, + ) + + index_info.additional_properties = d + return index_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/invoice.py b/kittycad/models/invoice.py index 0def7d80f..5634ca9d5 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -21,21 +21,24 @@ class Invoice: attempted: Union[Unset, bool] = False created_at: Union[Unset, datetime.datetime] = UNSET currency: Union[Unset, Currency] = UNSET + customer_email: Union[Unset, str] = UNSET + customer_id: Union[Unset, str] = UNSET + default_payment_method: Union[Unset, str] = UNSET description: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET - invoice_pdf: Union[Unset, str] = UNSET - invoice_url: Union[Unset, str] = UNSET from ..models.invoice_line_item import InvoiceLineItem lines: Union[Unset, List[InvoiceLineItem]] = UNSET metadata: Union[Unset, Any] = UNSET number: Union[Unset, str] = UNSET paid: Union[Unset, bool] = False + pdf: Union[Unset, str] = UNSET receipt_number: Union[Unset, str] = UNSET statement_descriptor: Union[Unset, str] = UNSET status: Union[Unset, InvoiceStatus] = UNSET subtotal: Union[Unset, int] = UNSET tax: Union[Unset, int] = UNSET total: Union[Unset, int] = UNSET + url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -51,10 +54,11 @@ class Invoice: currency: Union[Unset, str] = UNSET if not isinstance(self.currency, Unset): currency = self.currency.value + customer_email = self.customer_email + customer_id = self.customer_id + default_payment_method = self.default_payment_method description = self.description id = self.id - invoice_pdf = self.invoice_pdf - invoice_url = self.invoice_url from ..models.invoice_line_item import InvoiceLineItem lines: Union[Unset, List[InvoiceLineItem]] = UNSET if not isinstance(self.lines, Unset): @@ -62,6 +66,7 @@ class Invoice: metadata = self.metadata number = self.number paid = self.paid + pdf = self.pdf receipt_number = self.receipt_number statement_descriptor = self.statement_descriptor status: Union[Unset, str] = UNSET @@ -70,6 +75,7 @@ class Invoice: subtotal = self.subtotal tax = self.tax total = self.total + url = self.url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -88,14 +94,16 @@ class Invoice: field_dict['created_at'] = created_at if currency is not UNSET: field_dict['currency'] = currency + if customer_email is not UNSET: + field_dict['customer_email'] = customer_email + if customer_id is not UNSET: + field_dict['customer_id'] = customer_id + if default_payment_method is not UNSET: + field_dict['default_payment_method'] = default_payment_method if description is not UNSET: field_dict['description'] = description if id is not UNSET: field_dict['id'] = id - if invoice_pdf is not UNSET: - field_dict['invoice_pdf'] = invoice_pdf - if invoice_url is not UNSET: - field_dict['invoice_url'] = invoice_url if lines is not UNSET: field_dict['lines'] = lines if metadata is not UNSET: @@ -104,6 +112,8 @@ class Invoice: field_dict['number'] = number if paid is not UNSET: field_dict['paid'] = paid + if pdf is not UNSET: + field_dict['pdf'] = pdf if receipt_number is not UNSET: field_dict['receipt_number'] = receipt_number if statement_descriptor is not UNSET: @@ -116,6 +126,8 @@ class Invoice: field_dict['tax'] = tax if total is not UNSET: field_dict['total'] = total + if url is not UNSET: + field_dict['url'] = url return field_dict @@ -146,14 +158,16 @@ class Invoice: else: currency = Currency(_currency) + customer_email = d.pop("customer_email", UNSET) + + customer_id = d.pop("customer_id", UNSET) + + default_payment_method = d.pop("default_payment_method", UNSET) + description = d.pop("description", UNSET) id = d.pop("id", UNSET) - invoice_pdf = d.pop("invoice_pdf", UNSET) - - invoice_url = d.pop("invoice_url", UNSET) - from ..models.invoice_line_item import InvoiceLineItem lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET)) @@ -162,6 +176,8 @@ class Invoice: paid = d.pop("paid", UNSET) + pdf = d.pop("pdf", UNSET) + receipt_number = d.pop("receipt_number", UNSET) statement_descriptor = d.pop("statement_descriptor", UNSET) @@ -179,6 +195,8 @@ class Invoice: total = d.pop("total", UNSET) + url = d.pop("url", UNSET) + invoice = cls( amount_due=amount_due, amount_paid=amount_paid, @@ -187,20 +205,23 @@ class Invoice: attempted=attempted, created_at=created_at, currency=currency, + customer_email=customer_email, + customer_id=customer_id, + default_payment_method=default_payment_method, description=description, id=id, - invoice_pdf=invoice_pdf, - invoice_url=invoice_url, lines=lines, metadata=metadata, number=number, paid=paid, + pdf=pdf, receipt_number=receipt_number, statement_descriptor=statement_descriptor, status=status, subtotal=subtotal, tax=tax, total=total, + url=url, ) invoice.additional_properties = d diff --git a/kittycad/models/ip_addr.py b/kittycad/models/ip_addr.py new file mode 100644 index 000000000..21161a859 --- /dev/null +++ b/kittycad/models/ip_addr.py @@ -0,0 +1,4 @@ +class IpAddr(str): + + def __str__(self) -> str: + return self diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index fdd264535..2147cc923 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -5,6 +5,7 @@ import attr from ..models.cache_metadata import CacheMetadata from ..models.engine_metadata import EngineMetadata from ..models.environment import Environment +from ..models.executor_metadata import ExecutorMetadata from ..models.file_system_metadata import FileSystemMetadata from ..models.connection import Connection from ..types import UNSET, Unset @@ -18,6 +19,7 @@ class Metadata: cache: Union[Unset, CacheMetadata] = UNSET engine: Union[Unset, EngineMetadata] = UNSET environment: Union[Unset, Environment] = UNSET + executor: Union[Unset, ExecutorMetadata] = UNSET fs: Union[Unset, FileSystemMetadata] = UNSET git_hash: Union[Unset, str] = UNSET pubsub: Union[Unset, Connection] = UNSET @@ -34,6 +36,9 @@ class Metadata: environment: Union[Unset, str] = UNSET if not isinstance(self.environment, Unset): environment = self.environment.value + executor: Union[Unset, str] = UNSET + if not isinstance(self.executor, Unset): + executor = self.executor.value fs: Union[Unset, str] = UNSET if not isinstance(self.fs, Unset): fs = self.fs.value @@ -51,6 +56,8 @@ class Metadata: field_dict['engine'] = engine if environment is not UNSET: field_dict['environment'] = environment + if executor is not UNSET: + field_dict['executor'] = executor if fs is not UNSET: field_dict['fs'] = fs if git_hash is not UNSET: @@ -84,6 +91,13 @@ class Metadata: else: environment = Environment(_environment) + _executor = d.pop("executor", UNSET) + executor: Union[Unset, ExecutorMetadata] + if isinstance(_executor, Unset): + executor = UNSET + else: + executor = ExecutorMetadata(_executor) + _fs = d.pop("fs", UNSET) fs: Union[Unset, FileSystemMetadata] if isinstance(_fs, Unset): @@ -104,6 +118,7 @@ class Metadata: cache=cache, engine=engine, environment=environment, + executor=executor, fs=fs, git_hash=git_hash, pubsub=pubsub, diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py new file mode 100644 index 000000000..6d90cfa07 --- /dev/null +++ b/kittycad/models/o_auth2_client_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="OAuth2ClientInfo") + + +@attr.s(auto_attribs=True) +class OAuth2ClientInfo: + """ """ + csrf_token: Union[Unset, str] = UNSET + pkce_code_verifier: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + csrf_token = self.csrf_token + pkce_code_verifier = self.pkce_code_verifier + url = self.url + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if csrf_token is not UNSET: + field_dict['csrf_token'] = csrf_token + if pkce_code_verifier is not UNSET: + field_dict['pkce_code_verifier'] = pkce_code_verifier + if url is not UNSET: + field_dict['url'] = url + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + csrf_token = d.pop("csrf_token", UNSET) + + pkce_code_verifier = d.pop("pkce_code_verifier", UNSET) + + url = d.pop("url", UNSET) + + o_auth2_client_info = cls( + csrf_token=csrf_token, + pkce_code_verifier=pkce_code_verifier, + url=url, + ) + + o_auth2_client_info.additional_properties = d + return o_auth2_client_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/o_auth2_grant_type.py b/kittycad/models/o_auth2_grant_type.py new file mode 100644 index 000000000..5f9a0bce9 --- /dev/null +++ b/kittycad/models/o_auth2_grant_type.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class OAuth2GrantType(str, Enum): + URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = 'urn:ietf:params:oauth:grant-type:device_code' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/plugins_info.py b/kittycad/models/plugins_info.py new file mode 100644 index 000000000..a1f0bca5e --- /dev/null +++ b/kittycad/models/plugins_info.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PluginsInfo") + + +@attr.s(auto_attribs=True) +class PluginsInfo: + """ """ + authorization: Union[Unset, List[str]] = UNSET + log: Union[Unset, List[str]] = UNSET + network: Union[Unset, List[str]] = UNSET + volume: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + authorization: Union[Unset, List[str]] = UNSET + if not isinstance(self.authorization, Unset): + authorization = self.authorization + log: Union[Unset, List[str]] = UNSET + if not isinstance(self.log, Unset): + log = self.log + network: Union[Unset, List[str]] = UNSET + if not isinstance(self.network, Unset): + network = self.network + volume: Union[Unset, List[str]] = UNSET + if not isinstance(self.volume, Unset): + volume = self.volume + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if authorization is not UNSET: + field_dict['authorization'] = authorization + if log is not UNSET: + field_dict['log'] = log + if network is not UNSET: + field_dict['network'] = network + if volume is not UNSET: + field_dict['volume'] = volume + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + authorization = cast(List[str], d.pop("authorization", UNSET)) + + log = cast(List[str], d.pop("log", UNSET)) + + network = cast(List[str], d.pop("network", UNSET)) + + volume = cast(List[str], d.pop("volume", UNSET)) + + plugins_info = cls( + authorization=authorization, + log=log, + network=network, + volume=volume, + ) + + plugins_info.additional_properties = d + return plugins_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/registry_service_config.py b/kittycad/models/registry_service_config.py new file mode 100644 index 000000000..4592745bb --- /dev/null +++ b/kittycad/models/registry_service_config.py @@ -0,0 +1,98 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..models.index_info import IndexInfo +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegistryServiceConfig") + + +@attr.s(auto_attribs=True) +class RegistryServiceConfig: + """ """ + allow_nondistributable_artifacts_cid_rs: Union[Unset, List[str]] = UNSET + allow_nondistributable_artifacts_hostnames: Union[Unset, List[str]] = UNSET + index_configs: Union[Unset, Any] = UNSET + insecure_registry_cid_rs: Union[Unset, List[str]] = UNSET + mirrors: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + allow_nondistributable_artifacts_cid_rs: Union[Unset, + List[str]] = UNSET + if not isinstance(self.allow_nondistributable_artifacts_cid_rs, Unset): + allow_nondistributable_artifacts_cid_rs = self.allow_nondistributable_artifacts_cid_rs + allow_nondistributable_artifacts_hostnames: Union[Unset, + List[str]] = UNSET + if not isinstance( + self.allow_nondistributable_artifacts_hostnames, + Unset): + allow_nondistributable_artifacts_hostnames = self.allow_nondistributable_artifacts_hostnames + index_configs = self.index_configs + insecure_registry_cid_rs: Union[Unset, List[str]] = UNSET + if not isinstance(self.insecure_registry_cid_rs, Unset): + insecure_registry_cid_rs = self.insecure_registry_cid_rs + mirrors: Union[Unset, List[str]] = UNSET + if not isinstance(self.mirrors, Unset): + mirrors = self.mirrors + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if allow_nondistributable_artifacts_cid_rs is not UNSET: + field_dict['allow_nondistributable_artifacts_cid_rs'] = allow_nondistributable_artifacts_cid_rs + if allow_nondistributable_artifacts_hostnames is not UNSET: + field_dict['allow_nondistributable_artifacts_hostnames'] = allow_nondistributable_artifacts_hostnames + if index_configs is not UNSET: + field_dict['index_configs'] = index_configs + if insecure_registry_cid_rs is not UNSET: + field_dict['insecure_registry_cid_rs'] = insecure_registry_cid_rs + if mirrors is not UNSET: + field_dict['mirrors'] = mirrors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + allow_nondistributable_artifacts_cid_rs = cast( + List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET)) + + allow_nondistributable_artifacts_hostnames = cast( + List[str], d.pop("allow_nondistributable_artifacts_hostnames", UNSET)) + + index_configs = d.pop("index_configs", UNSET) + insecure_registry_cid_rs = cast( + List[str], d.pop( + "insecure_registry_cid_rs", UNSET)) + + mirrors = cast(List[str], d.pop("mirrors", UNSET)) + + registry_service_config = cls( + allow_nondistributable_artifacts_cid_rs=allow_nondistributable_artifacts_cid_rs, + allow_nondistributable_artifacts_hostnames=allow_nondistributable_artifacts_hostnames, + index_configs=index_configs, + insecure_registry_cid_rs=insecure_registry_cid_rs, + mirrors=mirrors, + ) + + registry_service_config.additional_properties = d + return registry_service_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/runtime.py b/kittycad/models/runtime.py new file mode 100644 index 000000000..19b8c793e --- /dev/null +++ b/kittycad/models/runtime.py @@ -0,0 +1,63 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Runtime") + + +@attr.s(auto_attribs=True) +class Runtime: + """ """ + path: Union[Unset, str] = UNSET + runtime_args: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path = self.path + runtime_args: Union[Unset, List[str]] = UNSET + if not isinstance(self.runtime_args, Unset): + runtime_args = self.runtime_args + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict['path'] = path + if runtime_args is not UNSET: + field_dict['runtime_args'] = runtime_args + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + path = d.pop("path", UNSET) + + runtime_args = cast(List[str], d.pop("runtime_args", UNSET)) + + runtime = cls( + path=path, + runtime_args=runtime_args, + ) + + runtime.additional_properties = d + return runtime + + @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/system_info_cgroup_driver_enum.py b/kittycad/models/system_info_cgroup_driver_enum.py new file mode 100644 index 000000000..c164d25c8 --- /dev/null +++ b/kittycad/models/system_info_cgroup_driver_enum.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class SystemInfoCgroupDriverEnum(str, Enum): + EMPTY = '' + CGROUPFS = 'cgroupfs' + SYSTEMD = 'systemd' + NONE = 'none' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/system_info_cgroup_version_enum.py b/kittycad/models/system_info_cgroup_version_enum.py new file mode 100644 index 000000000..0834a45ee --- /dev/null +++ b/kittycad/models/system_info_cgroup_version_enum.py @@ -0,0 +1,10 @@ +from enum import Enum + + +class SystemInfoCgroupVersionEnum(str, Enum): + EMPTY = '' + ONE = '1' + TWO = '2' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/system_info_default_address_pools.py b/kittycad/models/system_info_default_address_pools.py new file mode 100644 index 000000000..2106f3bef --- /dev/null +++ b/kittycad/models/system_info_default_address_pools.py @@ -0,0 +1,61 @@ +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SystemInfoDefaultAddressPools") + + +@attr.s(auto_attribs=True) +class SystemInfoDefaultAddressPools: + """ """ + base: Union[Unset, str] = UNSET + size: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + base = self.base + size = self.size + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if base is not UNSET: + field_dict['base'] = base + if size is not UNSET: + field_dict['size'] = size + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + base = d.pop("base", UNSET) + + size = d.pop("size", UNSET) + + system_info_default_address_pools = cls( + base=base, + size=size, + ) + + system_info_default_address_pools.additional_properties = d + return system_info_default_address_pools + + @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/system_info_isolation_enum.py b/kittycad/models/system_info_isolation_enum.py new file mode 100644 index 000000000..917ae0ebb --- /dev/null +++ b/kittycad/models/system_info_isolation_enum.py @@ -0,0 +1,11 @@ +from enum import Enum + + +class SystemInfoIsolationEnum(str, Enum): + EMPTY = '' + DEFAULT = 'default' + HYPERV = 'hyperv' + PROCESS = 'process' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_conversion.py b/kittycad/models/unit_conversion.py index 25265792f..9de6b32a8 100644 --- a/kittycad/models/unit_conversion.py +++ b/kittycad/models/unit_conversion.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..models.unit_metric_format import UnitMetricFormat -from ..models.api_call_status import APICallStatus +from ..models.api_call_status import ApiCallStatus from ..types import UNSET, Unset T = TypeVar("T", bound="UnitConversion") @@ -24,7 +24,7 @@ class UnitConversion: output_format: Union[Unset, UnitMetricFormat] = UNSET src_format: Union[Unset, UnitMetricFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, APICallStatus] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET user_id: Union[Unset, str] = UNSET @@ -135,11 +135,11 @@ class UnitConversion: started_at = isoparse(_started_at) _status = d.pop("status", UNSET) - status: Union[Unset, APICallStatus] + status: Union[Unset, ApiCallStatus] if isinstance(_status, Unset): status = UNSET else: - status = APICallStatus(_status) + status = ApiCallStatus(_status) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/spec.json b/spec.json index bcdde3964..70cc657a5 100644 --- a/spec.json +++ b/spec.json @@ -1,8162 +1,9310 @@ { - "openapi": "3.0.3", - "info": { - "title": "KittyCAD API", - "description": "API server for KittyCAD", - "contact": { - "url": "https://kittycad.io", - "email": "api@kittycad.io" - }, - "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-rust": { - "client": "use kittycad::Client;\n\n// Authenticate via an API token.\nlet client = Client::new(\"$TOKEN\");\n\n// - OR -\n\n// Authenticate with your token and host parsed from the environment variables:\n// KITTYCAD_API_TOKEN.\nlet client = Client::new_from_env();", - "install": "[dependencies]\nkittycad = \"0.1.3\"" - } - }, - "paths": { - "/": { - "get": { - "tags": [ - "meta" - ], - "summary": "Get OpenAPI schema.", - "operationId": "get_schema", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": {} - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } + "openapi": "3.0.3", + "info": { + "title": "KittyCAD API", + "description": "API server for KittyCAD", + "contact": { + "url": "https://kittycad.io", + "email": "api@kittycad.io" }, + "version": "0.1.0", "x-go": { - "example": "// GetSchema: Get OpenAPI schema.\nresponseGetSchema, err := client.Meta.GetSchema()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetSchema" + "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-rust": { - "example": "/**\n* Get OpenAPI schema.\n*\n* This function performs a `GET` to the `/` endpoint.\n*/\nclient.meta().get_schema().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.get_schema" + "client": "use kittycad::Client;\n\n// Authenticate via an API token.\nlet client = Client::new(\"$TOKEN\");\n\n// - OR -\n\n// Authenticate with your token and host parsed from the environment variables:\n// KITTYCAD_API_TOKEN.\nlet client = Client::new_from_env();", + "install": "[dependencies]\nkittycad = \"0.1.3\"" + }, + "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" } - } }, - "/_meta/info": { - "get": { - "tags": [ - "meta", - "hidden" - ], - "summary": "Get the metadata about our currently running server.", - "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": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Metadata" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get the metadata about our currently running server.\n*\n* This function performs a `GET` to the `/_meta/info` endpoint.\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.\n*/\nlet metadata = client.meta().get_data().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.get_data" - } - } - }, - "/api-call-metrics": { - "get": { - "tags": [ - "api-calls", - "hidden" - ], - "summary": "Get API call metrics.", - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", - "operationId": "get_api_call_metrics", - "parameters": [ - { - "in": "query", - "name": "group_by", - "description": "What field to group the metrics by.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ApiCallQueryGroupBy" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_ApiCallQueryGroup", - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiCallQueryGroup" - } - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get API call metrics.\n*\n* This function performs a `GET` to the `/api-call-metrics` endpoint.\n*\n* This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n*\n* **Parameters:**\n*\n* * `group_by: crate::types::ApiCallQueryGroupBy` -- The field of an API call to group by.\n*/\nlet vec_crate_types_api_call_query_group = client.api_calls().get_call_metrics(group_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_call_metrics" - } - } - }, - "/api-calls": { - "get": { - "tags": [ - "api-calls", - "hidden" - ], - "summary": "List API calls.", - "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": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 retrieve 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-rust": { - "example": "/**\n* List API calls.\n*\n* This function performs a `GET` to the `/api-calls` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_calls(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API calls.\n*\n* This function performs a `GET` to the `/api-calls` endpoint.\n*\n* As opposed to `list_calls`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_all_calls(sort_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_calls" - } - } - }, - "/api-calls/{id}": { - "get": { - "tags": [ - "api-calls", - "hidden" - ], - "summary": "Get details of an API call.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The ID of the API call.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get details of an API call.\n*\n* This function performs a `GET` to the `/api-calls/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the API call.\n*/\nlet api_call_with_price = client.api_calls().get_call(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_call" - } - } - }, - "/async/operations": { - "get": { - "tags": [ - "api-calls", - "hidden" - ], - "summary": "List async operations.", - "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", - "operationId": "list_async_operations", - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - }, - { - "in": "query", - "name": "status", - "description": "The status to filter by.", - "schema": { - "$ref": "#/components/schemas/ApiCallStatus" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-dropshot-pagination": true, - "x-go": { - "example": "// ListAsyncOperations: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListAsyncOperationsAllPages` 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 retrieve the subsequent page\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nasyncAPICallResultsPage, err := client.APICall.ListAsyncOperations(limit, pageToken, sortBy, status)\n\n// - OR -\n\n// ListAsyncOperationsAllPages: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// This method is a wrapper around the `ListAsyncOperations` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nAsyncAPICall, err := client.APICall.ListAsyncOperationsAllPages(sortBy, status)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListAsyncOperations" - }, - "x-rust": { - "example": "/**\n* List async operations.\n*\n* This function performs a `GET` to the `/async/operations` endpoint.\n*\n* For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n* This endpoint requires authentication by a KittyCAD employee.\n*\n* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n* * `status: crate::types::ApiCallStatus` -- The status of an async API call.\n*/\nlet vec_crate_types_async_api_call = client.api_calls().list_async_operations(limit, page_token, sort_by, status).await?;\n\n// - OR -\n\n/**\n* List async operations.\n*\n* This function performs a `GET` to the `/async/operations` endpoint.\n*\n* As opposed to `list_async_operations`, this function returns all the pages of the request at once.\n*\n* For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n* This endpoint requires authentication by a KittyCAD employee.\n*/\nlet vec_crate_types_async_api_call = client.api_calls().list_all_async_operations(sort_by, status).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_async_operations" - } - } - }, - "/async/operations/{id}": { - "get": { - "tags": [ - "api-calls" - ], - "summary": "Get an async operation.", - "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", - "operationId": "get_async_operation", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the async operation.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// GetAsyncOperation: Get an async operation.\n//\n// Get the status and output of an async operation.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n// If the user is not authenticated to view the specified async operation, then it is not returned.\n// Only KittyCAD employees with the proper access can view async operations for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.APICall.GetAsyncOperation(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetAsyncOperation" - }, - "x-rust": { - "example": "/**\n* Get an async operation.\n*\n* This function performs a `GET` to the `/async/operations/{id}` endpoint.\n*\n* Get the status and output of an async operation.\n* This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n* If the user is not authenticated to view the specified async operation, then it is not returned.\n* Only KittyCAD employees with the proper access can view async operations for other users.\n*\n* **Parameters:**\n*\n* * `id: &str` -- The ID of the async operation.\n*/\nlet async_api_call_output = client.api_calls().get_async_operation(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_async_operation" - } - } - }, - "/auth/email": { - "post": { - "tags": [ - "hidden" - ], - "summary": "Create an email verification request for a user.", - "operationId": "listen_auth_email", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmailAuthenticationForm" - } - } - }, - "required": true - }, - "responses": { - "204": { - "description": "resource updated", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// ListenAuthEmail: Create an email verification request for a user.\nif err := client.Hidden.ListenAuthEmail(body); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.ListenAuthEmail" - }, - "x-rust": { - "example": "/**\n* Create an email verification request for a user.\n*\n* This function performs a `POST` to the `/auth/email` endpoint.\n*/\nclient.hidden().listen_auth_email(body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/hidden/struct.Hidden.html#method.listen_auth_email" - } - }, - "options": { - "tags": [ - "hidden" - ], - "summary": "OPTIONS endpoint for email authentication.", - "description": "This is necessary for some preflight requests, specifically DELETE, PUT, and POST since it has a request body.", - "operationId": "options_auth_email", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Null", - "type": "string", - "enum": [ - null - ] - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/auth/email/callback": { - "get": { - "tags": [ - "hidden" - ], - "summary": "Listen for callbacks for email verification for users.", - "operationId": "listen_auth_email_callback", - "parameters": [ - { - "in": "query", - "name": "callback_url", - "description": "The URL to redirect back to after we have authenticated.", - "schema": { - "nullable": true, - "type": "string", - "format": "uri" - }, - "style": "form" - }, - { - "in": "query", - "name": "email", - "description": "The user's email.", - "required": true, - "schema": { - "type": "string", - "format": "email" - }, - "style": "form" - }, - { - "in": "query", - "name": "token", - "description": "The verification token.", - "required": true, - "schema": { - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "302": { - "description": "Temporary Redirect", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// ListenAuthEmailCallback: Listen for callbacks for email verification for users.\n//\n// Parameters:\n//\t- `callbackUrl`: The URL to redirect back to after we have authenticated.\n//\t- `email`: The user's email.\n//\t- `token`: The verification token.\nif err := client.Hidden.ListenAuthEmailCallback(callbackUrl, email, token); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.ListenAuthEmailCallback" - }, - "x-rust": { - "example": "/**\n* Listen for callbacks for email verification for users.\n*\n* This function performs a `GET` to the `/auth/email/callback` endpoint.\n*\n* **Parameters:**\n*\n* * `callback_url: &url::Url` -- The URL to redirect back to after we have authenticated.\n* * `email: &str` -- The user's email.\n* * `token: &str` -- The verification token.\n*/\nlet string = client.hidden().listen_auth_email_callback(callback_url, email, token).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/hidden/struct.Hidden.html#method.listen_auth_email_callback" - } - } - }, - "/file/conversion/{src_format}/{output_format}": { - "post": { - "tags": [ - "file" - ], - "summary": "Convert CAD file.", - "description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, 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 operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_conversion", - "parameters": [ - { - "in": "path", - "name": "output_format", - "description": "The format the file should be converted to.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileOutputFormat" - }, - "style": "simple" - }, - { - "in": "path", - "name": "src_format", - "description": "The format of the file to convert.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "simple" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 25MB, 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 operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversion, 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.\nfileConversion, err := client.File.CreateConversionWithBase64Helper(outputFormat, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" - }, - "x-rust": { - "example": "/**\n* Convert CAD file.\n*\n* This function performs a `POST` to the `/file/conversion/{src_format}/{output_format}` endpoint.\n*\n* Convert a CAD file from one format to another. If the file being converted is larger than 25MB, 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 operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `output_format: crate::types::FileOutputFormat` -- The format the file should be converted to.\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_conversion = client.file().create_conversion(output_format, src_format, body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_conversion" - } - } - }, - "/file/conversions/{id}": { - "get": { - "tags": [ - "file" - ], - "summary": "Get a file conversion.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The ID of the async operation.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 async operation.\nasyncAPICallOutput, 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.\nasyncAPICallOutput, err := client.File.GetConversionWithBase64Helper(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" - }, - "x-rust": { - "example": "/**\n* Get a file conversion.\n*\n* This function performs a `GET` to the `/file/conversions/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the async operation.\n*/\nlet async_api_call_output = client.file().get_conversion(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.get_conversion" - } - } - }, - "/file/density": { - "post": { - "tags": [ - "file", - "beta" - ], - "summary": "Get CAD file density.", - "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_density", - "parameters": [ - { - "in": "query", - "name": "material_mass", - "description": "The material mass.", - "required": true, - "schema": { - "type": "number", - "format": "float" - }, - "style": "form" - }, - { - "in": "query", - "name": "src_format", - "description": "The format of the file.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileDensity" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateDensity: Get CAD file density.\n//\n// Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialMass`: The material mass.\n//\t- `srcFormat`: The format of the file.\nfileDensity, err := client.File.CreateDensity(materialMass, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateDensity" - }, - "x-rust": { - "example": "/**\n* Get CAD file density.\n*\n* This function performs a `POST` to the `/file/density` endpoint.\n*\n* Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n* If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `material_mass: f64` -- The material mass.\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_density = client.file().create_density(material_mass, src_format, body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_density" - } - } - }, - "/file/execute/{lang}": { - "post": { - "tags": [ - "file", - "hidden" - ], - "summary": "Execute a KittyCAD program in a specific language.", - "operationId": "create_file_execution", - "parameters": [ - { - "in": "path", - "name": "lang", - "description": "The language of the code.", - "required": true, - "schema": { - "$ref": "#/components/schemas/CodeLanguage" - }, - "style": "simple" - }, - { - "in": "query", - "name": "output", - "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CodeOutput" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateExecution: Execute a KittyCAD program in a specific language.\n//\n// Parameters:\n//\t- `lang`: The language of the code.\n//\t- `output`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\ncodeOutput, err := client.File.CreateExecution(lang, output, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateExecution" - }, - "x-rust": { - "example": "/**\n* Execute a KittyCAD program in a specific language.\n*\n* This function performs a `POST` to the `/file/execute/{lang}` endpoint.\n*\n* **Parameters:**\n*\n* * `lang: crate::types::CodeLanguage` -- The language code is written in.\n* * `output: &str` -- The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\n*/\nlet code_output = client.file().create_execution(lang, output, body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_execution" - } - } - }, - "/file/mass": { - "post": { - "tags": [ - "file", - "beta" - ], - "summary": "Get CAD file mass.", - "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_mass", - "parameters": [ - { - "in": "query", - "name": "material_density", - "description": "The material density.", - "required": true, - "schema": { - "type": "number", - "format": "float" - }, - "style": "form" - }, - { - "in": "query", - "name": "src_format", - "description": "The format of the file.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileMass" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateMass: Get CAD file mass.\n//\n// Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialDensity`: The material density.\n//\t- `srcFormat`: The format of the file.\nfileMass, err := client.File.CreateMass(materialDensity, srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateMass" - }, - "x-rust": { - "example": "/**\n* Get CAD file mass.\n*\n* This function performs a `POST` to the `/file/mass` endpoint.\n*\n* Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n* If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `material_density: f64` -- The material density.\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_mass = client.file().create_mass(material_density, src_format, body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_mass" - } - } - }, - "/file/volume": { - "post": { - "tags": [ - "file", - "beta" - ], - "summary": "Get CAD file volume.", - "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_volume", - "parameters": [ - { - "in": "query", - "name": "src_format", - "description": "The format of the file.", - "required": true, - "schema": { - "$ref": "#/components/schemas/FileSourceFormat" - }, - "style": "form" - } - ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileVolume" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateVolume: Get CAD file volume.\n//\n// Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `srcFormat`: The format of the file.\nfileVolume, err := client.File.CreateVolume(srcFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateVolume" - }, - "x-rust": { - "example": "/**\n* Get CAD file volume.\n*\n* This function performs a `POST` to the `/file/volume` endpoint.\n*\n* Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n* If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_volume = client.file().create_volume(src_format, body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_volume" - } - } - }, - "/logout": { - "post": { - "tags": [ - "hidden" - ], - "summary": "This endpoint removes the session cookie for a user.", - "description": "This is used in logout scenarios.", - "operationId": "logout", - "responses": { - "204": { - "description": "resource updated", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// Logout: This endpoint removes the session cookie for a user.\n//\n// This is used in logout scenarios.\nif err := client.Hidden.Logout(); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.Logout" - }, - "x-rust": { - "example": "/**\n* This endpoint removes the session cookie for a user.\n*\n* This function performs a `POST` to the `/logout` endpoint.\n*\n* This is used in logout scenarios.\n*/\nclient.hidden().logout().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/hidden/struct.Hidden.html#method.logout" - } - } - }, - "/oauth2/device/auth": { - "post": { - "tags": [ - "oauth2", - "hidden" - ], - "summary": "Start an OAuth 2.0 Device Authorization Grant.", - "description": "This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.", - "operationId": "device_auth_request", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/DeviceAuthRequestForm" - } - } - }, - "required": true - }, - "responses": { - "default": { - "description": "", - "content": { - "*/*": { - "schema": {} - } - } - } - }, - "x-rust": { - "example": "/**\n* Start an OAuth 2.0 Device Authorization Grant.\n*\n* This function performs a `POST` to the `/oauth2/device/auth` endpoint.\n*\n* This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.\n*/\nclient.oauth_2().device_auth_request().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_request" - } - } - }, - "/oauth2/device/confirm": { - "post": { - "tags": [ - "oauth2", - "hidden" - ], - "summary": "Confirm an OAuth 2.0 Device Authorization Grant.", - "description": "This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`.", - "operationId": "device_auth_confirm", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceAuthVerifyParams" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Null", - "type": "string", - "enum": [ - null - ] - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-rust": { - "example": "/**\n* Confirm an OAuth 2.0 Device Authorization Grant.\n*\n* This function performs a `POST` to the `/oauth2/device/confirm` endpoint.\n*\n* This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`.\n*/\nlet string = client.oauth_2().device_auth_confirm(body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_confirm" - } - } - }, - "/oauth2/device/token": { - "post": { - "tags": [ - "oauth2", - "hidden" - ], - "summary": "Request a device access token.", - "description": "This endpoint should be polled by the client until the user code is verified and the grant is confirmed.", - "operationId": "device_access_token", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/DeviceAccessTokenRequestForm" - } - } - }, - "required": true - }, - "responses": { - "default": { - "description": "", - "content": { - "*/*": { - "schema": {} - } - } - } - }, - "x-rust": { - "example": "/**\n* Request a device access token.\n*\n* This function performs a `POST` to the `/oauth2/device/token` endpoint.\n*\n* This endpoint should be polled by the client until the user code is verified and the grant is confirmed.\n*/\nclient.oauth_2().device_access_token().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_access_token" - } - } - }, - "/oauth2/device/verify": { - "get": { - "tags": [ - "oauth2", - "hidden" - ], - "summary": "Verify an OAuth 2.0 Device Authorization Grant.", - "description": "This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `state` parameter to get them back here on completion. If they are logged in, serve up the console verification page so they can verify the user code.", - "operationId": "device_auth_verify", - "parameters": [ - { - "in": "query", - "name": "user_code", - "description": "The user code.", - "required": true, - "schema": { - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "302": { - "description": "Temporary Redirect", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-rust": { - "example": "/**\n* Verify an OAuth 2.0 Device Authorization Grant.\n*\n* This function performs a `GET` to the `/oauth2/device/verify` endpoint.\n*\n* This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `state` parameter to get them back here on completion. If they are logged in, serve up the console verification page so they can verify the user code.\n*\n* **Parameters:**\n*\n* * `user_code: &str` -- The user code.\n*/\nlet string = client.oauth_2().device_auth_verify(user_code).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_verify" - } - } - }, - "/oauth2/provider/{provider}/callback": { - "get": { - "tags": [ - "oauth2", - "hidden" - ], - "summary": "Listen for callbacks for the OAuth 2.0 provider.", - "operationId": "listen_oauth2_provider_callback", - "parameters": [ - { - "in": "path", - "name": "provider", - "description": "The provider.", - "required": true, - "schema": { - "$ref": "#/components/schemas/AccountProvider" - }, - "style": "simple" - }, - { - "in": "query", - "name": "code", - "description": "The authorization code.", - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "state", - "description": "The state that we had passed in through the user consent URL.", - "schema": { - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "302": { - "description": "Temporary Redirect", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Set-Cookie": { - "description": "Set-Cookie header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-rust": { - "example": "/**\n* Listen for callbacks for the OAuth 2.0 provider.\n*\n* This function performs a `GET` to the `/oauth2/provider/{provider}/callback` endpoint.\n*\n* **Parameters:**\n*\n* * `provider: crate::types::AccountProvider` -- An account provider.\n* * `code: &str` -- The authorization code.\n* * `state: &str` -- The state that we had passed in through the user consent URL.\n*/\nlet string = client.oauth_2().listen_oauth2_provider_callback(code, provider, state).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.listen_oauth2_provider_callback" - } - } - }, - "/oauth2/provider/{provider}/consent": { - "get": { - "tags": [ - "oauth2", - "hidden" - ], - "summary": "Get the consent URL and other information for the OAuth 2.0 provider.", - "operationId": "listen_oauth2_provider_consent", - "parameters": [ - { - "in": "path", - "name": "provider", - "description": "The provider.", - "required": true, - "schema": { - "$ref": "#/components/schemas/AccountProvider" - }, - "style": "simple" - }, - { - "in": "query", - "name": "callback_url", - "description": "The URL to redirect back to after we have authenticated.", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuth2ClientInfo" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-rust": { - "example": "/**\n* Get the consent URL and other information for the OAuth 2.0 provider.\n*\n* This function performs a `GET` to the `/oauth2/provider/{provider}/consent` endpoint.\n*\n* **Parameters:**\n*\n* * `provider: crate::types::AccountProvider` -- An account provider.\n* * `callback_url: &str` -- The URL to redirect back to after we have authenticated.\n*/\nlet o_auth_2_client_info = client.oauth_2().listen_oauth2_provider_consent(callback_url, provider).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.listen_oauth2_provider_consent" - } - } - }, - "/ping": { - "get": { - "tags": [ - "meta" - ], - "summary": "Return pong.", - "operationId": "ping", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pong" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" - }, - "x-rust": { - "example": "/**\n* Return pong.\n*\n* This function performs a `GET` to the `/ping` endpoint.\n*/\nlet pong = client.meta().ping().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.ping" - } - } - }, - "/unit/conversion/{src_format}/{output_format}": { - "post": { - "tags": [ - "unit", - "beta" - ], - "summary": "Convert units.", - "description": "Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.", - "operationId": "create_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "output_format", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricFormat" - }, - "style": "simple" - }, - { - "in": "path", - "name": "src_format", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMetricFormat" - }, - "style": "simple" - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "float" - }, - "style": "form" - } - ], - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitConversion" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateConversion: Convert units.\n//\n// Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n//\n// Parameters:\n//\t- `outputFormat`: The output format of the unit.\n//\t- `srcFormat`: The source format of the unit.\n//\t- `value`: The initial value.\nunitConversion, err := client.Unit.CreateConversion(outputFormat, srcFormat, value)\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.\nunitConversion, err := client.Unit.CreateConversionWithBase64Helper(outputFormat, srcFormat, value)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UnitService.CreateConversion" - }, - "x-rust": { - "example": "/**\n* Convert units.\n*\n* This function performs a `POST` to the `/unit/conversion/{src_format}/{output_format}` endpoint.\n*\n* Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n*\n* **Parameters:**\n*\n* * `output_format: crate::types::UnitMetricFormat` -- The valid types of metric unit formats.\n* * `src_format: crate::types::UnitMetricFormat` -- The valid types of metric unit formats.\n* * `value: f64` -- The initial value.\n*/\nlet unit_conversion = client.unit().create_conversion(output_format, src_format, value).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.create_conversion" - } - } - }, - "/user": { - "get": { - "tags": [ - "users" - ], - "summary": "Get your user.", - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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" - }, - "x-rust": { - "example": "/**\n* Get your user.\n*\n* This function performs a `GET` to the `/user` endpoint.\n*\n* Get the user information for the authenticated user.\n* Alternatively, you can also use the `/users/me` endpoint.\n*/\nlet user = client.users().get_self().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_self" - } - }, - "put": { - "tags": [ - "users" - ], - "summary": "Update your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", - "operationId": "update_user_self", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateUser" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// UpdateSelf: Update your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\nuser, err := client.User.UpdateSelf(body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSelf" - }, - "x-rust": { - "example": "/**\n* Update your user.\n*\n* This function performs a `PUT` to the `/user` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\n*/\nlet user = client.users().update_self(body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.update_self" - } - }, - "options": { - "tags": [ - "hidden" - ], - "summary": "OPTIONS endpoint for users.", - "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", - "operationId": "options_user_self", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Null", - "type": "string", - "enum": [ - null - ] - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/user/api-calls": { - "get": { - "tags": [ - "api-calls" - ], - "summary": "List API calls for your user.", - "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": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 retrieve 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-rust": { - "example": "/**\n* List API calls for your user.\n*\n* This function performs a `GET` to the `/user/api-calls` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_call_with_price = client.api_calls().user_list_calls(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API calls for your user.\n*\n* This function performs a `GET` to the `/user/api-calls` endpoint.\n*\n* As opposed to `user_list_calls`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_call_with_price = client.api_calls().user_list_all_calls(sort_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.user_list_calls" - } - } - }, - "/user/api-calls/{id}": { - "get": { - "tags": [ - "api-calls" - ], - "summary": "Get an API call for a user.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The ID of the API call.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get an API call for a user.\n*\n* This function performs a `GET` to the `/user/api-calls/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the API call.\n*/\nlet api_call_with_price = client.api_calls().get_call_for_user(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_call_for_user" - } - } - }, - "/user/api-tokens": { - "get": { - "tags": [ - "api-tokens" - ], - "summary": "List API tokens for your user.", - "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": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiTokenResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 retrieve 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-rust": { - "example": "/**\n* List API tokens for your user.\n*\n* This function performs a `GET` to the `/user/api-tokens` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_token = client.api_tokens().list_tokens_for_user(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API tokens for your user.\n*\n* This function performs a `GET` to the `/user/api-tokens` endpoint.\n*\n* As opposed to `list_tokens_for_user`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_token = client.api_tokens().list_all_tokens_for_user(sort_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.list_tokens_for_user" - } - }, - "post": { - "tags": [ - "api-tokens" - ], - "summary": "Create a new API token for your user.", - "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": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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" - }, - "x-rust": { - "example": "/**\n* Create a new API token for your user.\n*\n* This function performs a `POST` to the `/user/api-tokens` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\n*/\nlet api_token = client.api_tokens().create_token_for_user().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.create_token_for_user" - } - } - }, - "/user/api-tokens/{token}": { - "get": { - "tags": [ - "api-tokens" - ], - "summary": "Get an API token for your user.", - "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": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiToken" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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" - }, - "x-rust": { - "example": "/**\n* Get an API token for your user.\n*\n* This function performs a `GET` to the `/user/api-tokens/{token}` endpoint.\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*\n* * `token: &str` -- The API token.\n*/\nlet api_token = client.api_tokens().get_token_for_user(token).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.get_token_for_user" - } - }, - "delete": { - "tags": [ - "api-tokens" - ], - "summary": "Delete an API token for your user.", - "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": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Delete an API token for your user.\n*\n* This function performs a `DELETE` to the `/user/api-tokens/{token}` endpoint.\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*\n* * `token: &str` -- The API token.\n*/\nclient.api_tokens().delete_token_for_user(token).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.delete_token_for_user" - } - }, - "options": { - "tags": [ - "hidden" - ], - "summary": "OPTIONS endpoint for API tokens.", - "description": "This is necessary for some preflight requests, specifically DELETE.", - "operationId": "options_api_token_for_user", - "parameters": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Null", - "type": "string", - "enum": [ - null - ] - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/user/extended": { - "get": { - "tags": [ - "users" - ], - "summary": "Get extended information about your user.", - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users-extended/me` endpoint.", - "operationId": "get_user_self_extended", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-extended/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" - }, - "x-rust": { - "example": "/**\n* Get extended information about your user.\n*\n* This function performs a `GET` to the `/user/extended` endpoint.\n*\n* Get the user information for the authenticated user.\n* Alternatively, you can also use the `/users-extended/me` endpoint.\n*/\nlet extended_user = client.users().get_self_extended().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_self_extended" - } - } - }, - "/user/file/conversions/{id}": { - "get": { - "tags": [ - "file" - ], - "summary": "Get a file conversion for your user.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The ID of the async operation.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AsyncApiCallOutput" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 async operation.\nasyncAPICallOutput, err := client.File.GetConversionForUser(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" - }, - "x-rust": { - "example": "/**\n* Get a file conversion for your user.\n*\n* This function performs a `GET` to the `/user/file/conversions/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the async operation.\n*/\nlet async_api_call_output = client.file().get_conversion_for_user(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.get_conversion_for_user" - } - } - }, - "/user/payment": { - "get": { - "tags": [ - "payments" - ], - "summary": "Get payment info about your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.", - "operationId": "get_payment_information_for_user", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// GetInformationForUser: Get payment info about your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\ncustomer, err := client.Payment.GetInformationForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.GetInformationForUser" - }, - "x-rust": { - "example": "/**\n* Get payment info about your user.\n*\n* This function performs a `GET` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\n*/\nlet customer = client.payments().get_information_for_user().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.get_information_for_user" - } - }, - "put": { - "tags": [ - "payments" - ], - "summary": "Update payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.", - "operationId": "update_payment_information_for_user", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingInfo" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// UpdateInformationForUser: Update payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\ncustomer, err := client.Payment.UpdateInformationForUser(body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateInformationForUser" - }, - "x-rust": { - "example": "/**\n* Update payment info for your user.\n*\n* This function performs a `PUT` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\n*/\nlet customer = client.payments().update_information_for_user(body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.update_information_for_user" - } - }, - "post": { - "tags": [ - "payments" - ], - "summary": "Create payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.", - "operationId": "create_payment_information_for_user", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingInfo" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateInformationForUser: Create payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\ncustomer, err := client.Payment.CreateInformationForUser(body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateInformationForUser" - }, - "x-rust": { - "example": "/**\n* Create payment info for your user.\n*\n* This function performs a `POST` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\n*/\nlet customer = client.payments().create_information_for_user(body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.create_information_for_user" - } - }, - "delete": { - "tags": [ - "payments" - ], - "summary": "Delete payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", - "operationId": "delete_payment_information_for_user", - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// DeleteInformationForUser: Delete payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\nif err := client.Payment.DeleteInformationForUser(); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteInformationForUser" - }, - "x-rust": { - "example": "/**\n* Delete payment info for your user.\n*\n* This function performs a `DELETE` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\n*/\nclient.payments().delete_information_for_user().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.delete_information_for_user" - } - }, - "options": { - "tags": [ - "hidden" - ], - "summary": "OPTIONS endpoint for user payment information.", - "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", - "operationId": "options_payment_information_for_user", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Null", - "type": "string", - "enum": [ - null - ] - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/user/payment/intent": { - "post": { - "tags": [ - "payments", - "hidden" - ], - "summary": "Create a payment intent for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.", - "operationId": "create_payment_intent_for_user", - "responses": { - "201": { - "description": "successful creation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentIntent" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// CreateIntentForUser: Create a payment intent for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\npaymentIntent, err := client.Payment.CreateIntentForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateIntentForUser" - }, - "x-rust": { - "example": "/**\n* Create a payment intent for your user.\n*\n* This function performs a `POST` to the `/user/payment/intent` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\n*/\nlet payment_intent = client.payments().create_intent_for_user().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.create_intent_for_user" - } - } - }, - "/user/payment/invoices": { - "get": { - "tags": [ - "payments" - ], - "summary": "List invoices for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", - "operationId": "list_invoices_for_user", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_Invoice", - "type": "array", - "items": { - "$ref": "#/components/schemas/Invoice" - } - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// ListInvoicesForUser: List invoices for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\nInvoice, err := client.Payment.ListInvoicesForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListInvoicesForUser" - }, - "x-rust": { - "example": "/**\n* List invoices for your user.\n*\n* This function performs a `GET` to the `/user/payment/invoices` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\n*/\nlet vec_crate_types_invoice = client.payments().list_invoices_for_user().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.list_invoices_for_user" - } - } - }, - "/user/payment/methods": { - "get": { - "tags": [ - "payments" - ], - "summary": "List payment methods for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.", - "operationId": "list_payment_methods_for_user", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_PaymentMethod", - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethod" - } - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// ListMethodsForUser: List payment methods for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\nPaymentMethod, err := client.Payment.ListMethodsForUser()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListMethodsForUser" - }, - "x-rust": { - "example": "/**\n* List payment methods for your user.\n*\n* This function performs a `GET` to the `/user/payment/methods` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\n*/\nlet vec_crate_types_payment_method = client.payments().list_methods_for_user().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.list_methods_for_user" - } - } - }, - "/user/payment/methods/{id}": { - "delete": { - "tags": [ - "payments", - "hidden" - ], - "summary": "Delete a payment method for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.", - "operationId": "delete_payment_method_for_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the payment method.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "204": { - "description": "successful deletion", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// DeleteMethodForUser: Delete a payment method for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n//\n// Parameters:\n//\t- `id`: The ID of the payment method.\nif err := client.Payment.DeleteMethodForUser(id); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteMethodForUser" - }, - "x-rust": { - "example": "/**\n* Delete a payment method for your user.\n*\n* This function performs a `DELETE` to the `/user/payment/methods/{id}` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n*\n* **Parameters:**\n*\n* * `id: &str` -- The ID of the payment method.\n*/\nclient.payments().delete_method_for_user(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.delete_method_for_user" - } - }, - "options": { - "tags": [ - "hidden" - ], - "summary": "OPTIONS endpoint for user payment methods.", - "description": "This is necessary for some preflight requests, specifically DELETE.", - "operationId": "options_payment_methods_for_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the payment method.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "title": "Null", - "type": "string", - "enum": [ - null - ] - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, - "/user/session/{token}": { - "get": { - "tags": [ - "sessions" - ], - "summary": "Get a session for your user.", - "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": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get a session for your user.\n*\n* This function performs a `GET` to the `/user/session/{token}` endpoint.\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*\n* * `token: &str` -- The API token.\n*/\nlet session = client.sessions().get_for_user(token).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/sessions/struct.Sessions.html#method.get_for_user" - } - } - }, - "/users": { - "get": { - "tags": [ - "users", - "hidden" - ], - "summary": "List users.", - "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": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 retrieve 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-rust": { - "example": "/**\n* List users.\n*\n* This function performs a `GET` to the `/users` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_user = client.users().list(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List users.\n*\n* This function performs a `GET` to the `/users` endpoint.\n*\n* As opposed to `list`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_user = client.users().list_all(sort_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.list" - } - } - }, - "/users-extended": { - "get": { - "tags": [ - "users", - "hidden" - ], - "summary": "List users with extended information.", - "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": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUserResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 retrieve 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-rust": { - "example": "/**\n* List users with extended information.\n*\n* This function performs a `GET` to the `/users-extended` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_extended_user = client.users().list_extended(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List users with extended information.\n*\n* This function performs a `GET` to the `/users-extended` endpoint.\n*\n* As opposed to `list_extended`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_extended_user = client.users().list_all_extended(sort_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.list_extended" - } - } - }, - "/users-extended/{id}": { - "get": { - "tags": [ - "users", - "hidden" - ], - "summary": "Get extended information about a user.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The user ID.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get extended information about a user.\n*\n* This function performs a `GET` to the `/users-extended/{id}` endpoint.\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*\n* * `id: &str` -- The user ID.\n*/\nlet extended_user = client.users().get_extended(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_extended" - } - } - }, - "/users/{id}": { - "get": { - "tags": [ - "users", - "hidden" - ], - "summary": "Get a user.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The user ID.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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-rust": { - "example": "/**\n* Get a user.\n*\n* This function performs a `GET` to the `/users/{id}` endpoint.\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*\n* * `id: &str` -- The user ID.\n*/\nlet user = client.users().get(id).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get" - } - } - }, - "/users/{id}/api-calls": { - "get": { - "tags": [ - "api-calls", - "hidden" - ], - "summary": "List API calls for a user.", - "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": [ - { - "in": "path", - "name": "id", - "description": "The user ID.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - }, - "style": "form" - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - }, - "style": "form" - } - ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "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 retrieve 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-rust": { - "example": "/**\n* List API calls for a user.\n*\n* This function performs a `GET` to the `/users/{id}/api-calls` endpoint.\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* **Parameters:**\n*\n* * `id: &str` -- The user ID.\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_calls_for_user(id, limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API calls for a user.\n*\n* This function performs a `GET` to the `/users/{id}/api-calls` endpoint.\n*\n* As opposed to `list_calls_for_user`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_all_calls_for_user(id, sort_by).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_calls_for_user" - } - } - } - }, - "components": { - "responses": { - "Error": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "schemas": { - "AccountProvider": { - "description": "An account provider.", - "type": "string", - "enum": [ - "google", - "github" - ] - }, - "Address": { - "description": "An address.", - "type": "object", - "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component.", - "type": "string" - }, - "created_at": { - "description": "The time and date the address was created.", - "type": "string", - "format": "partial-date-time" - }, - "id": { - "description": "The unique identifier of the address.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" - }, - "street2": { - "description": "The second street component.", - "type": "string" - }, - "updated_at": { - "description": "The time and date the address was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID that this address belongs to.", - "type": "string" - }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "updated_at" - ] - }, - "ApiCallQueryGroup": { - "description": "A response for a query on the API call table that is grouped by something.", - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int64" - }, - "query": { - "type": "string" - } - }, - "required": [ - "count", - "query" - ] - }, - "ApiCallQueryGroupBy": { - "description": "The field of an API call to group by.", - "type": "string", - "enum": [ - "email", - "method", - "endpoint", - "user_id", - "origin", - "ip_address" - ] - }, - "ApiCallStatus": { - "description": "The status of an async API call.", - "type": "string", - "enum": [ - "Queued", - "Uploaded", - "In Progress", - "Completed", - "Failed" - ] - }, - "ApiCallWithPrice": { - "description": "An API call with the price.\n\nThis is a join of the `ApiCall` and `ApiCallPrice` tables.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The date and time the API call completed billing.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The date and time the API call was created.", - "type": "string", - "format": "partial-date-time" - }, - "duration": { - "nullable": true, - "description": "The duration of the API call.", - "allOf": [ - { - "$ref": "#/components/schemas/Duration" - } - ] - }, - "email": { - "description": "The user's email address.", - "type": "string", - "format": "email" - }, - "endpoint": { - "description": "The endpoint requested by the API call.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the API call.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "ip_address": { - "description": "The ip address of the origin.", - "default": "", - "allOf": [ - { - "$ref": "#/components/schemas/IpAddr" - } - ] - }, - "method": { - "description": "The HTTP method requsted by the API call.", - "allOf": [ - { - "$ref": "#/components/schemas/Method" - } - ] - }, - "minutes": { - "nullable": true, - "description": "The number of minutes the API call was billed for.", - "type": "integer", - "format": "int32" - }, - "origin": { - "description": "The origin of the API call.", - "type": "string" - }, - "price": { - "nullable": true, - "description": "The price of the API call.", - "type": "number" - }, - "request_body": { - "nullable": true, - "description": "The request body sent by the API call.", - "type": "string" - }, - "request_query_params": { - "description": "The request query params sent by the API call.", - "type": "string" - }, - "response_body": { - "nullable": true, - "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", - "type": "string" - }, - "started_at": { - "nullable": true, - "description": "The date and time the API call started billing.", - "type": "string", - "format": "partial-date-time" - }, - "status_code": { - "nullable": true, - "description": "The status code returned by the API call.", - "allOf": [ - { - "$ref": "#/components/schemas/StatusCode" - } - ] - }, - "stripe_invoice_item_id": { - "description": "The Stripe invoice item ID of the API call if it is billable.", - "type": "string" - }, - "token": { - "description": "The API token that made the API call.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "updated_at": { - "description": "The date and time the API call was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "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" - ] - }, - "ApiCallWithPriceResultsPage": { - "description": "A single page of results", - "type": "object", - "properties": { - "items": { - "description": "list of items on this page of results", - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiCallWithPrice" - } - }, - "next_page": { - "nullable": true, - "description": "token used to fetch the next page of results (if any)", - "type": "string" - } - }, - "required": [ - "items" - ] - }, - "ApiToken": { - "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", - "type": "object", - "properties": { - "created_at": { - "description": "The date and time the API token was created.", - "type": "string", - "format": "partial-date-time" - }, - "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": { - "description": "The API token itself.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "updated_at": { - "description": "The date and time the API token was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The ID of the user that owns the API token.", - "type": "string" - } - }, - "required": [ - "created_at", - "is_valid", - "token", - "updated_at" - ] - }, - "ApiTokenResultsPage": { - "description": "A single page of results", - "type": "object", - "properties": { - "items": { - "description": "list of items on this page of results", - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiToken" - } - }, - "next_page": { - "nullable": true, - "description": "token used to fetch the next page of results (if any)", - "type": "string" - } - }, - "required": [ - "items" - ] - }, - "AsyncApiCall": { - "description": "An async API call.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the async API call was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the async API call was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the async API call.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "input": { - "description": "The JSON input for the API call. These are determined by the endpoint that is run." - }, - "output": { - "nullable": true, - "description": "The JSON output for the API call. These are determined by the endpoint that is run." - }, - "started_at": { - "nullable": true, - "description": "The time and date the async API call was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the async API call.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "type": { - "description": "The type of async API call.", - "allOf": [ - { - "$ref": "#/components/schemas/AsyncApiCallType" - } - ] - }, - "updated_at": { - "description": "The time and date the async API call was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the async API call.", - "type": "string" - }, - "worker": { - "description": "The worker node that is performing or performed the async API call.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "status", - "type", - "updated_at" - ] - }, - "AsyncApiCallOutput": { - "description": "The output from the async API call.", - "oneOf": [ - { - "description": "A file conversion.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the file conversion was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "output": { - "nullable": true, - "description": "The converted file, if completed, base64 encoded.", - "allOf": [ - { - "$ref": "#/components/schemas/Base64Data" - } - ] - }, - "output_format": { - "description": "The output format of the file conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/FileOutputFormat" - } - ] - }, - "src_format": { - "description": "The source format of the file conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the file conversion was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the file conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "type": { - "type": "string", - "enum": [ - "FileConversion" - ] - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "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", - "type", - "updated_at" - ] - }, - { - "description": "A file mass.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the mass was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the mass was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "mass": { - "nullable": true, - "description": "The resulting mass.", - "type": "number", - "format": "double" - }, - "material_density": { - "description": "The material density as denoted by the user.", - "default": 0, - "type": "number", - "format": "float" - }, - "src_format": { - "description": "The source format of the file.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the mass was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the mass.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "type": { - "type": "string", - "enum": [ - "FileMass" - ] - }, - "updated_at": { - "description": "The time and date the mass was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the mass.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ] - }, - { - "description": "A file volume.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the volume was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the volume was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "src_format": { - "description": "The source format of the file.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the volume was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the volume.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "type": { - "type": "string", - "enum": [ - "FileVolume" - ] - }, - "updated_at": { - "description": "The time and date the volume was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the volume.", - "type": "string" - }, - "volume": { - "nullable": true, - "description": "The resulting volume.", - "type": "number", - "format": "double" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ] - }, - { - "description": "A file density.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the density was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the density was created.", - "type": "string", - "format": "partial-date-time" - }, - "density": { - "nullable": true, - "description": "The resulting density.", - "type": "number", - "format": "double" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "material_mass": { - "description": "The material mass as denoted by the user.", - "default": 0, - "type": "number", - "format": "float" - }, - "src_format": { - "description": "The source format of the file.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the density was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the density.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "type": { - "type": "string", - "enum": [ - "FileDensity" - ] - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "type", - "updated_at" - ] - } - ] - }, - "AsyncApiCallResultsPage": { - "description": "A single page of results", - "type": "object", - "properties": { - "items": { - "description": "list of items on this page of results", - "type": "array", - "items": { - "$ref": "#/components/schemas/AsyncApiCall" - } - }, - "next_page": { - "nullable": true, - "description": "token used to fetch the next page of results (if any)", - "type": "string" - } - }, - "required": [ - "items" - ] - }, - "AsyncApiCallType": { - "description": "The type of async API call.", - "type": "string", - "enum": [ - "FileConversion", - "FileVolume", - "FileMass", - "FileDensity" - ] - }, - "Base64Data": { - "title": "String", - "type": "string", - "format": "byte" - }, - "BillingInfo": { - "description": "The billing information for payments.", - "type": "object", - "properties": { - "address": { - "nullable": true, - "description": "The address of the customer.", - "allOf": [ - { - "$ref": "#/components/schemas/Address" - } - ] - }, - "name": { - "description": "The name of the customer.", - "type": "string" - }, - "phone": { - "description": "The phone for the customer.", - "default": "", - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ] - } - } - }, - "CacheMetadata": { - "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", - "type": "object", - "properties": { - "ok": { - "description": "If the cache returned an ok response from ping.", - "type": "boolean" - } - }, - "required": [ - "ok" - ] - }, - "CardDetails": { - "description": "The card details of a payment method.", - "type": "object", - "properties": { - "brand": { - "description": "Card brand.\n\nCan be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", - "type": "string" - }, - "checks": { - "description": "Checks on Card address and CVC if provided.", - "default": {}, - "allOf": [ - { - "$ref": "#/components/schemas/PaymentMethodCardChecks" - } - ] - }, - "country": { - "description": "Two-letter ISO code representing the country of the card.", - "type": "string" - }, - "exp_month": { - "description": "Two-digit number representing the card's expiration month.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "exp_year": { - "description": "Four-digit number representing the card's expiration year.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "fingerprint": { - "description": "Uniquely identifies this particular card number.", - "type": "string" - }, - "funding": { - "description": "Card funding type.\n\nCan be `credit`, `debit`, `prepaid`, or `unknown`.", - "type": "string" - }, - "last4": { - "description": "The last four digits of the card.", - "type": "string" - } - } - }, - "Cluster": { - "description": "Cluster information.", - "type": "object", - "properties": { - "addr": { - "nullable": true, - "description": "The IP address of the cluster.", - "type": "string" - }, - "auth_timeout": { - "description": "The auth timeout of the cluster.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "cluster_port": { - "description": "The port of the cluster.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "name": { - "description": "The name of the cluster.", - "default": "", - "type": "string" - }, - "tls_timeout": { - "description": "The TLS timeout for the cluster.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "urls": { - "description": "The urls of the cluster.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "CodeLanguage": { - "description": "The language code is written in.", - "type": "string", - "enum": [ - "go", - "python", - "node" - ] - }, - "CodeOutput": { - "description": "Output of the code being executed.", - "type": "object", - "properties": { - "output_files": { - "description": "The contents of the files requested if they were passed.", - "type": "array", - "items": { - "$ref": "#/components/schemas/OutputFile" - } - }, - "stderr": { - "description": "The stderr of the code.", - "default": "", - "type": "string" - }, - "stdout": { - "description": "The stdout of the code.", - "default": "", - "type": "string" - } - } - }, - "Commit": { - "description": "Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.", - "type": "object", - "properties": { - "expected": { - "nullable": true, - "description": "Commit ID of external tool expected by dockerd as set at build time.", - "type": "string" - }, - "id": { - "nullable": true, - "description": "Actual commit ID of external tool.", - "type": "string" - } - } - }, - "Connection": { - "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", - "type": "object", - "properties": { - "auth_timeout": { - "description": "The auth timeout of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "cluster": { - "description": "Information about the cluster.", - "default": { - "auth_timeout": 0, - "cluster_port": 0, - "name": "", - "tls_timeout": 0 - }, - "allOf": [ - { - "$ref": "#/components/schemas/Cluster" - } - ] - }, - "config_load_time": { - "description": "The time the configuration was loaded.", - "type": "string", - "format": "date-time" - }, - "connections": { - "description": "The number of connections to the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "cores": { - "description": "The CPU core usage of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "cpu": { - "nullable": true, - "type": "number", - "format": "double" - }, - "gateway": { - "description": "Information about the gateway.", - "default": { - "auth_timeout": 0, - "host": "", - "name": "", - "port": 0, - "tls_timeout": 0 - }, - "allOf": [ - { - "$ref": "#/components/schemas/Gateway" - } - ] - }, - "git_commit": { - "description": "The git commit.", - "default": "", - "type": "string" - }, - "go": { - "description": "The go version.", - "default": "", - "type": "string" - }, - "gomaxprocs": { - "description": "`GOMAXPROCS` of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "host": { - "description": "The host of the server.", - "type": "string" - }, - "http_base_path": { - "description": "The http base path of the server.", - "default": "", - "type": "string" - }, - "http_host": { - "description": "The http host of the server.", - "default": "", - "type": "string" - }, - "http_port": { - "description": "The http port of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "http_req_stats": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "https_port": { - "description": "The https port of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "in_bytes": { - "description": "The count of inbound bytes for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "in_msgs": { - "description": "The number of inbound messages for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "jetstream": { - "description": "Jetstream information.", - "default": { - "config": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" - }, - "meta": { - "cluster_size": 0, - "leader": "", - "name": "" - }, - "stats": { - "accounts": 0, - "api": { - "errors": 0, - "inflight": 0, - "total": 0 + "paths": { + "/": { + "get": { + "tags": [ + "meta" + ], + "summary": "Get OpenAPI schema.", + "operationId": "get_schema", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": {} + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } }, - "ha_assets": 0, - "memory": 0, - "reserved_memory": 0, - "reserved_store": 0, - "store": 0 - } + "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-rust": { + "example": "/**\n* Get OpenAPI schema.\n*\n* This function performs a `GET` to the `/` endpoint.\n*/\nclient.meta().get_schema().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.get_schema" + }, + "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" + } + } + }, + "/_meta/info": { + "get": { + "tags": [ + "meta", + "hidden" + ], + "summary": "Get the metadata about our currently running server.", + "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": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Metadata", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get the metadata about our currently running server.\n*\n* This function performs a `GET` to the `/_meta/info` endpoint.\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.\n*/\nlet metadata = client.meta().get_data().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.get_data" + }, + "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" + } + } + }, + "/api-call-metrics": { + "get": { + "tags": [ + "api-calls", + "hidden" + ], + "summary": "Get API call metrics.", + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "in": "query", + "name": "group_by", + "description": "What field to group the metrics by.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_ApiCallQueryGroup", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup", + "x-scope": [ + "" + ] + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get API call metrics.\n*\n* This function performs a `GET` to the `/api-call-metrics` endpoint.\n*\n* This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n*\n* **Parameters:**\n*\n* * `group_by: crate::types::ApiCallQueryGroupBy` -- The field of an API call to group by.\n*/\nlet vec_crate_types_api_call_query_group = client.api_calls().get_call_metrics(group_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_call_metrics" + }, + "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" + } + } + }, + "/api-calls": { + "get": { + "tags": [ + "api-calls", + "hidden" + ], + "summary": "List API calls.", + "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": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 retrieve 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-rust": { + "example": "/**\n* List API calls.\n*\n* This function performs a `GET` to the `/api-calls` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_calls(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API calls.\n*\n* This function performs a `GET` to the `/api-calls` endpoint.\n*\n* As opposed to `list_calls`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_all_calls(sort_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_calls" + }, + "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" + } + } + }, + "/api-calls/{id}": { + "get": { + "tags": [ + "api-calls", + "hidden" + ], + "summary": "Get details of an API call.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The ID of the API call.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get details of an API call.\n*\n* This function performs a `GET` to the `/api-calls/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the API call.\n*/\nlet api_call_with_price = client.api_calls().get_call(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_call" + }, + "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" + } + } + }, + "/async/operations": { + "get": { + "tags": [ + "api-calls", + "hidden" + ], + "summary": "List async operations.", + "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "operationId": "list_async_operations", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + }, + { + "in": "query", + "name": "status", + "description": "The status to filter by.", + "schema": { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListAsyncOperations: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListAsyncOperationsAllPages` 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 retrieve the subsequent page\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nasyncAPICallResultsPage, err := client.APICall.ListAsyncOperations(limit, pageToken, sortBy, status)\n\n// - OR -\n\n// ListAsyncOperationsAllPages: List async operations.\n//\n// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// This method is a wrapper around the `ListAsyncOperations` method.\n// This method returns all the pages at once.\n//\n// Parameters:\n//\t- `sortBy`\n//\t- `status`: The status to filter by.\nAsyncAPICall, err := client.APICall.ListAsyncOperationsAllPages(sortBy, status)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListAsyncOperations" + }, + "x-rust": { + "example": "/**\n* List async operations.\n*\n* This function performs a `GET` to the `/async/operations` endpoint.\n*\n* For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n* This endpoint requires authentication by a KittyCAD employee.\n*\n* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n* * `status: crate::types::ApiCallStatus` -- The status of an async API call.\n*/\nlet vec_crate_types_async_api_call = client.api_calls().list_async_operations(limit, page_token, sort_by, status).await?;\n\n// - OR -\n\n/**\n* List async operations.\n*\n* This function performs a `GET` to the `/async/operations` endpoint.\n*\n* As opposed to `list_async_operations`, this function returns all the pages of the request at once.\n*\n* For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n* This endpoint requires authentication by a KittyCAD employee.\n*/\nlet vec_crate_types_async_api_call = client.api_calls().list_all_async_operations(sort_by, status).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_async_operations" + }, + "x-python": { + "example": "from kittycad.models import AsyncApiCallResultsPage\nfrom kittycad.api.api-calls import list_async_operations\nfrom kittycad.types import Response\n\nfc: AsyncApiCallResultsPage = list_async_operations.sync(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=ApiCallStatus)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[AsyncApiCallResultsPage] = list_async_operations.sync_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=ApiCallStatus)\n\n# OR run async\nfc: AsyncApiCallResultsPage = await list_async_operations.asyncio(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=ApiCallStatus)\n\n# OR run async with more info\nresponse: Response[AsyncApiCallResultsPage] = await list_async_operations.asyncio_detailed(client=client, limit=\"\", page_token=, sort_by=CreatedAtSortMode, status=ApiCallStatus)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.list_async_operations.html" + } + } + }, + "/async/operations/{id}": { + "get": { + "tags": [ + "api-calls" + ], + "summary": "Get an async operation.", + "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", + "operationId": "get_async_operation", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the async operation.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// GetAsyncOperation: Get an async operation.\n//\n// Get the status and output of an async operation.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n// If the user is not authenticated to view the specified async operation, then it is not returned.\n// Only KittyCAD employees with the proper access can view async operations for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the async operation.\nasyncAPICallOutput, err := client.APICall.GetAsyncOperation(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetAsyncOperation" + }, + "x-rust": { + "example": "/**\n* Get an async operation.\n*\n* This function performs a `GET` to the `/async/operations/{id}` endpoint.\n*\n* Get the status and output of an async operation.\n* This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n* If the user is not authenticated to view the specified async operation, then it is not returned.\n* Only KittyCAD employees with the proper access can view async operations for other users.\n*\n* **Parameters:**\n*\n* * `id: &str` -- The ID of the async operation.\n*/\nlet async_api_call_output = client.api_calls().get_async_operation(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_async_operation" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.api-calls import get_async_operation\nfrom kittycad.types import Response\n\nfc: FileConversion = get_async_operation.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = get_async_operation.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await get_async_operation.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await get_async_operation.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.api-calls.get_async_operation.html" + } + } + }, + "/auth/email": { + "post": { + "tags": [ + "hidden" + ], + "summary": "Create an email verification request for a user.", + "operationId": "listen_auth_email", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailAuthenticationForm", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// ListenAuthEmail: Create an email verification request for a user.\nif err := client.Hidden.ListenAuthEmail(body); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.ListenAuthEmail" + }, + "x-rust": { + "example": "/**\n* Create an email verification request for a user.\n*\n* This function performs a `POST` to the `/auth/email` endpoint.\n*/\nclient.hidden().listen_auth_email(body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/hidden/struct.Hidden.html#method.listen_auth_email" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.hidden import listen_auth_email\nfrom kittycad.types import Response\n\nfc: Error = listen_auth_email.sync(client=client, body=EmailAuthenticationForm)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = listen_auth_email.sync_detailed(client=client, body=EmailAuthenticationForm)\n\n# OR run async\nfc: Error = await listen_auth_email.asyncio(client=client, body=EmailAuthenticationForm)\n\n# OR run async with more info\nresponse: Response[Error] = await listen_auth_email.asyncio_detailed(client=client, body=EmailAuthenticationForm)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.hidden.listen_auth_email.html" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/Jetstream" - } - ] - }, - "leaf": { - "description": "Information about leaf nodes.", - "default": { - "auth_timeout": 0, - "host": "", - "port": 0, - "tls_timeout": 0 + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint for email authentication.", + "description": "This is necessary for some preflight requests, specifically DELETE, PUT, and POST since it has a request body.", + "operationId": "options_auth_email", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Null", + "type": "string", + "enum": [ + null + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + } + } + }, + "/auth/email/callback": { + "get": { + "tags": [ + "hidden" + ], + "summary": "Listen for callbacks for email verification for users.", + "operationId": "listen_auth_email_callback", + "parameters": [ + { + "in": "query", + "name": "callback_url", + "description": "The URL to redirect back to after we have authenticated.", + "schema": { + "nullable": true, + "type": "string", + "format": "uri" + }, + "style": "form" + }, + { + "in": "query", + "name": "email", + "description": "The user's email.", + "required": true, + "schema": { + "type": "string", + "format": "email" + }, + "style": "form" + }, + { + "in": "query", + "name": "token", + "description": "The verification token.", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// ListenAuthEmailCallback: Listen for callbacks for email verification for users.\n//\n// Parameters:\n//\t- `callbackUrl`: The URL to redirect back to after we have authenticated.\n//\t- `email`: The user's email.\n//\t- `token`: The verification token.\nif err := client.Hidden.ListenAuthEmailCallback(callbackUrl, email, token); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.ListenAuthEmailCallback" + }, + "x-rust": { + "example": "/**\n* Listen for callbacks for email verification for users.\n*\n* This function performs a `GET` to the `/auth/email/callback` endpoint.\n*\n* **Parameters:**\n*\n* * `callback_url: &url::Url` -- The URL to redirect back to after we have authenticated.\n* * `email: &str` -- The user's email.\n* * `token: &str` -- The verification token.\n*/\nlet string = client.hidden().listen_auth_email_callback(callback_url, email, token).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/hidden/struct.Hidden.html#method.listen_auth_email_callback" + }, + "x-python": { + "example": "from kittycad.models import Empty\nfrom kittycad.api.hidden import listen_auth_email_callback\nfrom kittycad.types import Response\n\nfc: Empty = listen_auth_email_callback.sync(client=client, callback_url=\"\", email=\"\", token=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Empty] = listen_auth_email_callback.sync_detailed(client=client, callback_url=\"\", email=\"\", token=)\n\n# OR run async\nfc: Empty = await listen_auth_email_callback.asyncio(client=client, callback_url=\"\", email=\"\", token=)\n\n# OR run async with more info\nresponse: Response[Empty] = await listen_auth_email_callback.asyncio_detailed(client=client, callback_url=\"\", email=\"\", token=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.hidden.listen_auth_email_callback.html" + } + } + }, + "/file/conversion/{src_format}/{output_format}": { + "post": { + "tags": [ + "file" + ], + "summary": "Convert CAD file.", + "description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, 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 operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_conversion", + "parameters": [ + { + "in": "path", + "name": "output_format", + "description": "The format the file should be converted to.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileOutputFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "in": "path", + "name": "src_format", + "description": "The format of the file to convert.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversion", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 25MB, 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 operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversion, 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.\nfileConversion, err := client.File.CreateConversionWithBase64Helper(outputFormat, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" + }, + "x-rust": { + "example": "/**\n* Convert CAD file.\n*\n* This function performs a `POST` to the `/file/conversion/{src_format}/{output_format}` endpoint.\n*\n* Convert a CAD file from one format to another. If the file being converted is larger than 25MB, 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 operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `output_format: crate::types::FileOutputFormat` -- The format the file should be converted to.\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_conversion = client.file().create_conversion(output_format, src_format, body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_conversion" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import create_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = create_file_conversion_with_base64_helper.sync(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = create_file_conversion_with_base64_helper.sync_detailed(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileConversion = await create_file_conversion_with_base64_helper.asyncio(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await create_file_conversion_with_base64_helper.asyncio_detailed(client=client, output_format=FileOutputFormat, src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_conversion_with_base64_helper.html" + } + } + }, + "/file/conversions/{id}": { + "get": { + "tags": [ + "file" + ], + "summary": "Get a file conversion.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The ID of the async operation.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 async operation.\nasyncAPICallOutput, 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.\nasyncAPICallOutput, err := client.File.GetConversionWithBase64Helper(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" + }, + "x-rust": { + "example": "/**\n* Get a file conversion.\n*\n* This function performs a `GET` to the `/file/conversions/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the async operation.\n*/\nlet async_api_call_output = client.file().get_conversion(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.get_conversion" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import get_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = get_file_conversion_with_base64_helper.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = get_file_conversion_with_base64_helper.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await get_file_conversion_with_base64_helper.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = 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" + } + } + }, + "/file/density": { + "post": { + "tags": [ + "file", + "beta" + ], + "summary": "Get CAD file density.", + "description": "Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_density", + "parameters": [ + { + "in": "query", + "name": "material_mass", + "description": "The material mass.", + "required": true, + "schema": { + "type": "number", + "format": "float" + }, + "style": "form" + }, + { + "in": "query", + "name": "src_format", + "description": "The format of the file.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileDensity", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateDensity: Get CAD file density.\n//\n// Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialMass`: The material mass.\n//\t- `srcFormat`: The format of the file.\nfileDensity, err := client.File.CreateDensity(materialMass, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateDensity" + }, + "x-rust": { + "example": "/**\n* Get CAD file density.\n*\n* This function performs a `POST` to the `/file/density` endpoint.\n*\n* Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n* If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `material_mass: f64` -- The material mass.\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_density = client.file().create_density(material_mass, src_format, body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_density" + }, + "x-python": { + "example": "from kittycad.models import FileDensity\nfrom kittycad.api.file import create_file_density\nfrom kittycad.types import Response\n\nfc: FileDensity = create_file_density.sync(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileDensity] = create_file_density.sync_detailed(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileDensity = await create_file_density.asyncio(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileDensity] = await create_file_density.asyncio_detailed(client=client, material_mass=\"\", src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_density.html" + } + } + }, + "/file/execute/{lang}": { + "post": { + "tags": [ + "file", + "hidden" + ], + "summary": "Execute a KittyCAD program in a specific language.", + "operationId": "create_file_execution", + "parameters": [ + { + "in": "path", + "name": "lang", + "description": "The language of the code.", + "required": true, + "schema": { + "$ref": "#/components/schemas/CodeLanguage", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "output", + "description": "The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CodeOutput", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateExecution: Execute a KittyCAD program in a specific language.\n//\n// Parameters:\n//\t- `lang`: The language of the code.\n//\t- `output`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\ncodeOutput, err := client.File.CreateExecution(lang, output, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateExecution" + }, + "x-rust": { + "example": "/**\n* Execute a KittyCAD program in a specific language.\n*\n* This function performs a `POST` to the `/file/execute/{lang}` endpoint.\n*\n* **Parameters:**\n*\n* * `lang: crate::types::CodeLanguage` -- The language code is written in.\n* * `output: &str` -- The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\n*/\nlet code_output = client.file().create_execution(lang, output, body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_execution" + }, + "x-python": { + "example": "from kittycad.models import CodeOutput\nfrom kittycad.api.file import create_file_execution\nfrom kittycad.types import Response\n\nfc: CodeOutput = create_file_execution.sync(client=client, lang=CodeLanguage, output=, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[CodeOutput] = create_file_execution.sync_detailed(client=client, lang=CodeLanguage, output=, body=bytes)\n\n# OR run async\nfc: CodeOutput = await create_file_execution.asyncio(client=client, lang=CodeLanguage, output=, body=bytes)\n\n# OR run async with more info\nresponse: Response[CodeOutput] = await create_file_execution.asyncio_detailed(client=client, lang=CodeLanguage, output=, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_execution.html" + } + } + }, + "/file/mass": { + "post": { + "tags": [ + "file", + "beta" + ], + "summary": "Get CAD file mass.", + "description": "Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_mass", + "parameters": [ + { + "in": "query", + "name": "material_density", + "description": "The material density.", + "required": true, + "schema": { + "type": "number", + "format": "float" + }, + "style": "form" + }, + { + "in": "query", + "name": "src_format", + "description": "The format of the file.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileMass", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateMass: Get CAD file mass.\n//\n// Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `materialDensity`: The material density.\n//\t- `srcFormat`: The format of the file.\nfileMass, err := client.File.CreateMass(materialDensity, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateMass" + }, + "x-rust": { + "example": "/**\n* Get CAD file mass.\n*\n* This function performs a `POST` to the `/file/mass` endpoint.\n*\n* Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n* If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `material_density: f64` -- The material density.\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_mass = client.file().create_mass(material_density, src_format, body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_mass" + }, + "x-python": { + "example": "from kittycad.models import FileMass\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.types import Response\n\nfc: FileMass = create_file_mass.sync(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileMass] = create_file_mass.sync_detailed(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileMass = await create_file_mass.asyncio(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileMass] = await create_file_mass.asyncio_detailed(client=client, material_density=\"\", src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_mass.html" + } + } + }, + "/file/volume": { + "post": { + "tags": [ + "file", + "beta" + ], + "summary": "Get CAD file volume.", + "description": "Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_volume", + "parameters": [ + { + "in": "query", + "name": "src_format", + "description": "The format of the file.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileVolume", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateVolume: Get CAD file volume.\n//\n// Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters:\n//\t- `srcFormat`: The format of the file.\nfileVolume, err := client.File.CreateVolume(srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateVolume" + }, + "x-rust": { + "example": "/**\n* Get CAD file volume.\n*\n* This function performs a `POST` to the `/file/volume` endpoint.\n*\n* Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n* If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n*\n* **Parameters:**\n*\n* * `src_format: crate::types::FileSourceFormat` -- The valid types of source file formats.\n*/\nlet file_volume = client.file().create_volume(src_format, body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.create_volume" + }, + "x-python": { + "example": "from kittycad.models import FileVolume\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.types import Response\n\nfc: FileVolume = create_file_volume.sync(client=client, src_format=FileSourceFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileVolume] = create_file_volume.sync_detailed(client=client, src_format=FileSourceFormat, body=bytes)\n\n# OR run async\nfc: FileVolume = await create_file_volume.asyncio(client=client, src_format=FileSourceFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileVolume] = await create_file_volume.asyncio_detailed(client=client, src_format=FileSourceFormat, body=bytes)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.create_file_volume.html" + } + } + }, + "/logout": { + "post": { + "tags": [ + "hidden" + ], + "summary": "This endpoint removes the session cookie for a user.", + "description": "This is used in logout scenarios.", + "operationId": "logout", + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// Logout: This endpoint removes the session cookie for a user.\n//\n// This is used in logout scenarios.\nif err := client.Hidden.Logout(); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#HiddenService.Logout" + }, + "x-rust": { + "example": "/**\n* This endpoint removes the session cookie for a user.\n*\n* This function performs a `POST` to the `/logout` endpoint.\n*\n* This is used in logout scenarios.\n*/\nclient.hidden().logout().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/hidden/struct.Hidden.html#method.logout" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.hidden import logout\nfrom kittycad.types import Response\n\nfc: Error = logout.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = logout.sync_detailed(client=client)\n\n# OR run async\nfc: Error = await logout.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Error] = await logout.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.hidden.logout.html" + } + } + }, + "/oauth2/device/auth": { + "post": { + "tags": [ + "oauth2", + "hidden" + ], + "summary": "Start an OAuth 2.0 Device Authorization Grant.", + "description": "This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.", + "operationId": "device_auth_request", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DeviceAuthRequestForm", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + }, + "x-rust": { + "example": "/**\n* Start an OAuth 2.0 Device Authorization Grant.\n*\n* This function performs a `POST` to the `/oauth2/device/auth` endpoint.\n*\n* This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.\n*/\nclient.oauth_2().device_auth_request().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_request" + }, + "x-python": { + "example": "from kittycad.models import \nfrom kittycad.api.oauth2 import device_auth_request\nfrom kittycad.types import Response\n\nfc: = device_auth_request.sync(client=client, body=DeviceAuthRequestForm)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[] = device_auth_request.sync_detailed(client=client, body=DeviceAuthRequestForm)\n\n# OR run async\nfc: = await device_auth_request.asyncio(client=client, body=DeviceAuthRequestForm)\n\n# OR run async with more info\nresponse: Response[] = await device_auth_request.asyncio_detailed(client=client, body=DeviceAuthRequestForm)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.oauth2.device_auth_request.html" + } + } + }, + "/oauth2/device/confirm": { + "post": { + "tags": [ + "oauth2", + "hidden" + ], + "summary": "Confirm an OAuth 2.0 Device Authorization Grant.", + "description": "This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`.", + "operationId": "device_auth_confirm", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceAuthVerifyParams", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Null", + "type": "string", + "enum": [ + null + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-rust": { + "example": "/**\n* Confirm an OAuth 2.0 Device Authorization Grant.\n*\n* This function performs a `POST` to the `/oauth2/device/confirm` endpoint.\n*\n* This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`.\n*/\nlet string = client.oauth_2().device_auth_confirm(body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_confirm" + }, + "x-python": { + "example": "from kittycad.models import str\nfrom kittycad.api.oauth2 import device_auth_confirm\nfrom kittycad.types import Response\n\nfc: str = device_auth_confirm.sync(client=client, body=DeviceAuthVerifyParams)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[str] = device_auth_confirm.sync_detailed(client=client, body=DeviceAuthVerifyParams)\n\n# OR run async\nfc: str = await device_auth_confirm.asyncio(client=client, body=DeviceAuthVerifyParams)\n\n# OR run async with more info\nresponse: Response[str] = await device_auth_confirm.asyncio_detailed(client=client, body=DeviceAuthVerifyParams)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.oauth2.device_auth_confirm.html" + } + } + }, + "/oauth2/device/token": { + "post": { + "tags": [ + "oauth2", + "hidden" + ], + "summary": "Request a device access token.", + "description": "This endpoint should be polled by the client until the user code is verified and the grant is confirmed.", + "operationId": "device_access_token", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DeviceAccessTokenRequestForm", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + }, + "x-rust": { + "example": "/**\n* Request a device access token.\n*\n* This function performs a `POST` to the `/oauth2/device/token` endpoint.\n*\n* This endpoint should be polled by the client until the user code is verified and the grant is confirmed.\n*/\nclient.oauth_2().device_access_token().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_access_token" + }, + "x-python": { + "example": "from kittycad.models import \nfrom kittycad.api.oauth2 import device_access_token\nfrom kittycad.types import Response\n\nfc: = device_access_token.sync(client=client, body=DeviceAccessTokenRequestForm)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[] = device_access_token.sync_detailed(client=client, body=DeviceAccessTokenRequestForm)\n\n# OR run async\nfc: = await device_access_token.asyncio(client=client, body=DeviceAccessTokenRequestForm)\n\n# OR run async with more info\nresponse: Response[] = await device_access_token.asyncio_detailed(client=client, body=DeviceAccessTokenRequestForm)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.oauth2.device_access_token.html" + } + } + }, + "/oauth2/device/verify": { + "get": { + "tags": [ + "oauth2", + "hidden" + ], + "summary": "Verify an OAuth 2.0 Device Authorization Grant.", + "description": "This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `state` parameter to get them back here on completion. If they are logged in, serve up the console verification page so they can verify the user code.", + "operationId": "device_auth_verify", + "parameters": [ + { + "in": "query", + "name": "user_code", + "description": "The user code.", + "required": true, + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-rust": { + "example": "/**\n* Verify an OAuth 2.0 Device Authorization Grant.\n*\n* This function performs a `GET` to the `/oauth2/device/verify` endpoint.\n*\n* This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `state` parameter to get them back here on completion. If they are logged in, serve up the console verification page so they can verify the user code.\n*\n* **Parameters:**\n*\n* * `user_code: &str` -- The user code.\n*/\nlet string = client.oauth_2().device_auth_verify(user_code).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_verify" + }, + "x-python": { + "example": "from kittycad.models import Empty\nfrom kittycad.api.oauth2 import device_auth_verify\nfrom kittycad.types import Response\n\nfc: Empty = device_auth_verify.sync(client=client, user_code=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Empty] = device_auth_verify.sync_detailed(client=client, user_code=)\n\n# OR run async\nfc: Empty = await device_auth_verify.asyncio(client=client, user_code=)\n\n# OR run async with more info\nresponse: Response[Empty] = await device_auth_verify.asyncio_detailed(client=client, user_code=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.oauth2.device_auth_verify.html" + } + } + }, + "/oauth2/provider/{provider}/callback": { + "get": { + "tags": [ + "oauth2", + "hidden" + ], + "summary": "Listen for callbacks for the OAuth 2.0 provider.", + "operationId": "listen_oauth2_provider_callback", + "parameters": [ + { + "in": "path", + "name": "provider", + "description": "The provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/AccountProvider", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "code", + "description": "The authorization code.", + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "state", + "description": "The state that we had passed in through the user consent URL.", + "schema": { + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Empty", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-rust": { + "example": "/**\n* Listen for callbacks for the OAuth 2.0 provider.\n*\n* This function performs a `GET` to the `/oauth2/provider/{provider}/callback` endpoint.\n*\n* **Parameters:**\n*\n* * `provider: crate::types::AccountProvider` -- An account provider.\n* * `code: &str` -- The authorization code.\n* * `state: &str` -- The state that we had passed in through the user consent URL.\n*/\nlet string = client.oauth_2().listen_oauth2_provider_callback(code, provider, state).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.listen_oauth2_provider_callback" + }, + "x-python": { + "example": "from kittycad.models import Empty\nfrom kittycad.api.oauth2 import listen_oauth2_provider_callback\nfrom kittycad.types import Response\n\nfc: Empty = listen_oauth2_provider_callback.sync(client=client, provider=AccountProvider, code=, state=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Empty] = listen_oauth2_provider_callback.sync_detailed(client=client, provider=AccountProvider, code=, state=)\n\n# OR run async\nfc: Empty = await listen_oauth2_provider_callback.asyncio(client=client, provider=AccountProvider, code=, state=)\n\n# OR run async with more info\nresponse: Response[Empty] = await listen_oauth2_provider_callback.asyncio_detailed(client=client, provider=AccountProvider, code=, state=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.oauth2.listen_oauth2_provider_callback.html" + } + } + }, + "/oauth2/provider/{provider}/consent": { + "get": { + "tags": [ + "oauth2", + "hidden" + ], + "summary": "Get the consent URL and other information for the OAuth 2.0 provider.", + "operationId": "listen_oauth2_provider_consent", + "parameters": [ + { + "in": "path", + "name": "provider", + "description": "The provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/AccountProvider", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "callback_url", + "description": "The URL to redirect back to after we have authenticated.", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2ClientInfo", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-rust": { + "example": "/**\n* Get the consent URL and other information for the OAuth 2.0 provider.\n*\n* This function performs a `GET` to the `/oauth2/provider/{provider}/consent` endpoint.\n*\n* **Parameters:**\n*\n* * `provider: crate::types::AccountProvider` -- An account provider.\n* * `callback_url: &str` -- The URL to redirect back to after we have authenticated.\n*/\nlet o_auth_2_client_info = client.oauth_2().listen_oauth2_provider_consent(callback_url, provider).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.listen_oauth2_provider_consent" + }, + "x-python": { + "example": "from kittycad.models import OAuth2ClientInfo\nfrom kittycad.api.oauth2 import listen_oauth2_provider_consent\nfrom kittycad.types import Response\n\nfc: OAuth2ClientInfo = listen_oauth2_provider_consent.sync(client=client, provider=AccountProvider, callback_url=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[OAuth2ClientInfo] = listen_oauth2_provider_consent.sync_detailed(client=client, provider=AccountProvider, callback_url=)\n\n# OR run async\nfc: OAuth2ClientInfo = await listen_oauth2_provider_consent.asyncio(client=client, provider=AccountProvider, callback_url=)\n\n# OR run async with more info\nresponse: Response[OAuth2ClientInfo] = await listen_oauth2_provider_consent.asyncio_detailed(client=client, provider=AccountProvider, callback_url=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.oauth2.listen_oauth2_provider_consent.html" + } + } + }, + "/ping": { + "get": { + "tags": [ + "meta" + ], + "summary": "Return pong.", + "operationId": "ping", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pong", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" + }, + "x-rust": { + "example": "/**\n* Return pong.\n*\n* This function performs a `GET` to the `/ping` endpoint.\n*/\nlet pong = client.meta().ping().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.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" + } + } + }, + "/unit/conversion/{src_format}/{output_format}": { + "post": { + "tags": [ + "unit", + "beta" + ], + "summary": "Convert units.", + "description": "Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.", + "operationId": "create_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "output_format", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "in": "path", + "name": "src_format", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMetricFormat", + "x-scope": [ + "" + ] + }, + "style": "simple" + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "float" + }, + "style": "form" + } + ], + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitConversion", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateConversion: Convert units.\n//\n// Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n//\n// Parameters:\n//\t- `outputFormat`: The output format of the unit.\n//\t- `srcFormat`: The source format of the unit.\n//\t- `value`: The initial value.\nunitConversion, err := client.Unit.CreateConversion(outputFormat, srcFormat, value)\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.\nunitConversion, err := client.Unit.CreateConversionWithBase64Helper(outputFormat, srcFormat, value)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UnitService.CreateConversion" + }, + "x-rust": { + "example": "/**\n* Convert units.\n*\n* This function performs a `POST` to the `/unit/conversion/{src_format}/{output_format}` endpoint.\n*\n* Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions.\n*\n* **Parameters:**\n*\n* * `output_format: crate::types::UnitMetricFormat` -- The valid types of metric unit formats.\n* * `src_format: crate::types::UnitMetricFormat` -- The valid types of metric unit formats.\n* * `value: f64` -- The initial value.\n*/\nlet unit_conversion = client.unit().create_conversion(output_format, src_format, value).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/unit/struct.Unit.html#method.create_conversion" + }, + "x-python": { + "example": "from kittycad.models import UnitConversion\nfrom kittycad.api.unit import create_unit_conversion\nfrom kittycad.types import Response\n\nfc: UnitConversion = create_unit_conversion.sync(client=client, output_format=UnitMetricFormat, src_format=UnitMetricFormat, value=\"\")\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[UnitConversion] = create_unit_conversion.sync_detailed(client=client, output_format=UnitMetricFormat, src_format=UnitMetricFormat, value=\"\")\n\n# OR run async\nfc: UnitConversion = await create_unit_conversion.asyncio(client=client, output_format=UnitMetricFormat, src_format=UnitMetricFormat, value=\"\")\n\n# OR run async with more info\nresponse: Response[UnitConversion] = await create_unit_conversion.asyncio_detailed(client=client, output_format=UnitMetricFormat, src_format=UnitMetricFormat, value=\"\")", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.unit.create_unit_conversion.html" + } + } + }, + "/user": { + "get": { + "tags": [ + "users" + ], + "summary": "Get your user.", + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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" + }, + "x-rust": { + "example": "/**\n* Get your user.\n*\n* This function performs a `GET` to the `/user` endpoint.\n*\n* Get the user information for the authenticated user.\n* Alternatively, you can also use the `/users/me` endpoint.\n*/\nlet user = client.users().get_self().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_self" + }, + "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" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/LeafNode" - } - ] - }, - "leafnodes": { - "description": "The number of leaf nodes for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "max_connections": { - "description": "The max connections of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "max_control_line": { - "description": "The max control line of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "max_payload": { - "description": "The max payload of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "max_pending": { - "description": "The max pending of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "mem": { - "description": "The memory usage of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "now": { - "description": "The time now.", - "type": "string", - "format": "date-time" - }, - "out_bytes": { - "description": "The count of outbound bytes for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "out_msgs": { - "description": "The number of outbound messages for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "ping_interval": { - "description": "The ping interval of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "ping_max": { - "description": "The ping max of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "port": { - "description": "The port of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "proto": { - "description": "The protocol version.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "remotes": { - "description": "The number of remotes for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "routes": { - "description": "The number of routes for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "server_id": { - "description": "The server ID.", - "default": "", - "type": "string" - }, - "server_name": { - "description": "The server name.", - "default": "", - "type": "string" - }, - "slow_consumers": { - "description": "The number of slow consumers for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "start": { - "description": "When the server was started.", - "type": "string", - "format": "date-time" - }, - "subscriptions": { - "description": "The number of subscriptions for the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "system_account": { - "description": "The system account.", - "default": "", - "type": "string" - }, - "tls_timeout": { - "description": "The TLS timeout of the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "total_connections": { - "description": "The total number of connections to the server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "uptime": { - "description": "The uptime of the server.", - "default": "", - "type": "string" - }, - "version": { - "description": "The version of the service.", - "default": "", - "type": "string" - }, - "write_deadline": { - "description": "The write deadline of the server.", - "default": 0, - "type": "integer", - "format": "int64" - } - }, - "required": [ - "config_load_time", - "host", - "http_req_stats", - "now", - "start" - ] - }, - "CreatedAtSortMode": { - "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", - "type": "string", - "enum": [ - "created-at-ascending", - "created-at-descending" - ] - }, - "Currency": { - "description": "Currency is the list of supported currencies.\n\nFor more details see .", - "type": "string", - "enum": [ - "aed", - "afn", - "all", - "amd", - "ang", - "aoa", - "ars", - "aud", - "awg", - "azn", - "bam", - "bbd", - "bdt", - "bgn", - "bif", - "bmd", - "bnd", - "bob", - "brl", - "bsd", - "bwp", - "bzd", - "cad", - "cdf", - "chf", - "clp", - "cny", - "cop", - "crc", - "cve", - "czk", - "djf", - "dkk", - "dop", - "dzd", - "eek", - "egp", - "etb", - "eur", - "fjd", - "fkp", - "gbp", - "gel", - "gip", - "gmd", - "gnf", - "gtq", - "gyd", - "hkd", - "hnl", - "hrk", - "htg", - "huf", - "idr", - "ils", - "inr", - "isk", - "jmd", - "jpy", - "kes", - "kgs", - "khr", - "kmf", - "krw", - "kyd", - "kzt", - "lak", - "lbp", - "lkr", - "lrd", - "lsl", - "ltl", - "lvl", - "mad", - "mdl", - "mga", - "mkd", - "mnt", - "mop", - "mro", - "mur", - "mvr", - "mwk", - "mxn", - "myr", - "mzn", - "nad", - "ngn", - "nio", - "nok", - "npr", - "nzd", - "pab", - "pen", - "pgk", - "php", - "pkr", - "pln", - "pyg", - "qar", - "ron", - "rsd", - "rub", - "rwf", - "sar", - "sbd", - "scr", - "sek", - "sgd", - "shp", - "sll", - "sos", - "srd", - "std", - "svc", - "szl", - "thb", - "tjs", - "top", - "try", - "ttd", - "twd", - "tzs", - "uah", - "ugx", - "usd", - "uyu", - "uzs", - "vef", - "vnd", - "vuv", - "wst", - "xaf", - "xcd", - "xof", - "xpf", - "yer", - "zar", - "zmw" - ] - }, - "Customer": { - "description": "The resource representing a payment \"Customer\".", - "type": "object", - "properties": { - "address": { - "nullable": true, - "description": "The customer's address.", - "allOf": [ - { - "$ref": "#/components/schemas/Address" - } - ] - }, - "balance": { - "description": "Current balance, if any, being stored on the customer.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "created_at": { - "description": "Time at which the object was created.", - "type": "string", - "format": "date-time" - }, - "currency": { - "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.", - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ] - }, - "delinquent": { - "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.\n\nWhen the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.", - "default": false, - "type": "boolean" - }, - "email": { - "description": "The customer's email address.", - "type": "string", - "format": "email" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "description": "Set of key-value pairs.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "The customer's full name or business name.", - "type": "string" - }, - "phone": { - "description": "The customer's phone number.", - "default": "", - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ] - } - }, - "required": [ - "created_at", - "currency" - ] - }, - "DeviceAccessTokenRequestForm": { - "description": "The form for a device access token request.", - "type": "object", - "properties": { - "client_id": { - "description": "The client ID.", - "type": "string", - "format": "uuid" - }, - "device_code": { - "description": "The device code.", - "type": "string", - "format": "uuid" - }, - "grant_type": { - "description": "The grant type.", - "allOf": [ - { - "$ref": "#/components/schemas/OAuth2GrantType" - } - ] - } - }, - "required": [ - "client_id", - "device_code", - "grant_type" - ] - }, - "DeviceAuthRequestForm": { - "description": "The request parameters for the OAuth 2.0 Device Authorization Grant flow.", - "type": "object", - "properties": { - "client_id": { - "description": "The client ID.", - "type": "string", - "format": "uuid" - } - }, - "required": [ - "client_id" - ] - }, - "DeviceAuthVerifyParams": { - "description": "The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.", - "type": "object", - "properties": { - "user_code": { - "description": "The user code.", - "type": "string" - } - }, - "required": [ - "user_code" - ] - }, - "DockerSystemInfo": { - "description": "Docker system info.", - "type": "object", - "properties": { - "architecture": { - "nullable": true, - "description": "Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", - "type": "string" - }, - "bridge_nf_ip6tables": { - "nullable": true, - "description": "Indicates if `bridge-nf-call-ip6tables` is available on the host.", - "type": "boolean" - }, - "bridge_nf_iptables": { - "nullable": true, - "description": "Indicates if `bridge-nf-call-iptables` is available on the host.", - "type": "boolean" - }, - "cgroup_driver": { - "nullable": true, - "description": "The driver to use for managing cgroups.", - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoCgroupDriverEnum" - } - ] - }, - "cgroup_version": { - "nullable": true, - "description": "The version of the cgroup.", - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoCgroupVersionEnum" - } - ] - }, - "cluster_advertise": { - "nullable": true, - "description": "The network endpoint that the Engine advertises for the purpose of node discovery. ClusterAdvertise is a `host:port` combination on which the daemon is reachable by other hosts.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", - "type": "string" - }, - "cluster_store": { - "nullable": true, - "description": "URL of the distributed storage backend. The storage backend is used for multihost networking (to store network and endpoint information) and by the node discovery mechanism.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", - "type": "string" - }, - "containerd_commit": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ] - }, - "containers": { - "nullable": true, - "description": "Total number of containers on the host.", - "type": "integer", - "format": "int64" - }, - "containers_paused": { - "nullable": true, - "description": "Number of containers with status `\\\"paused\\\"`.", - "type": "integer", - "format": "int64" - }, - "containers_running": { - "nullable": true, - "description": "Number of containers with status `\\\"running\\\"`.", - "type": "integer", - "format": "int64" - }, - "containers_stopped": { - "nullable": true, - "description": "Number of containers with status `\\\"stopped\\\"`.", - "type": "integer", - "format": "int64" - }, - "cpu_cfs_period": { - "nullable": true, - "description": "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host.", - "type": "boolean" - }, - "cpu_cfs_quota": { - "nullable": true, - "description": "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host.", - "type": "boolean" - }, - "cpu_set": { - "nullable": true, - "description": "Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)", - "type": "boolean" - }, - "cpu_shares": { - "nullable": true, - "description": "Indicates if CPU Shares limiting is supported by the host.", - "type": "boolean" - }, - "debug": { - "nullable": true, - "description": "Indicates if the daemon is running in debug-mode / with debug-level logging enabled.", - "type": "boolean" - }, - "default_address_pools": { - "description": "List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \\\"10.10.0.0/16\\\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools.", - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemInfoDefaultAddressPools" - } - }, - "default_runtime": { - "nullable": true, - "description": "Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time.", - "type": "string" - }, - "docker_root_dir": { - "nullable": true, - "description": "Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\\\ProgramData\\\\docker` on Windows.", - "type": "string" - }, - "driver": { - "nullable": true, - "description": "Name of the storage driver in use.", - "type": "string" - }, - "driver_status": { - "description": "Information specific to the storage driver, provided as \\\"label\\\" / \\\"value\\\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line.\n\n**Note**: The information returned in this field, including the formatting of values and labels, should not be considered stable, and may change without notice.", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "experimental_build": { - "nullable": true, - "description": "Indicates if experimental features are enabled on the daemon.", - "type": "boolean" - }, - "http_proxy": { - "nullable": true, - "description": "HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", - "type": "string" - }, - "https_proxy": { - "nullable": true, - "description": "HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", - "type": "string" - }, - "id": { - "nullable": true, - "description": "Unique identifier of the daemon.\n\n**Note**: The format of the ID itself is not part of the API, and should not be considered stable.", - "type": "string" - }, - "images": { - "nullable": true, - "description": "Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted.", - "type": "integer", - "format": "int64" - }, - "index_server_address": { - "nullable": true, - "description": "Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud.", - "type": "string" - }, - "init_binary": { - "nullable": true, - "description": "Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "type": "string" - }, - "init_commit": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ] - }, - "ipv4_forwarding": { - "nullable": true, - "description": "Indicates IPv4 forwarding is enabled.", - "type": "boolean" - }, - "isolation": { - "nullable": true, - "description": "Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms.", - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoIsolationEnum" - } - ] - }, - "kernel_memory": { - "nullable": true, - "description": "Indicates if the host has kernel memory limit support enabled.\n\n**Deprecated**: This field is deprecated as the kernel 5.4 deprecated `kmem.limit_in_bytes`.", - "type": "boolean" - }, - "kernel_memory_tcp": { - "nullable": true, - "description": "Indicates if the host has kernel memory TCP limit support enabled. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.", - "type": "boolean" - }, - "kernel_version": { - "nullable": true, - "description": "Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the HKEY_LOCAL_MACHINE\\\\\\\\SOFTWARE\\\\\\\\Microsoft\\\\\\\\Windows NT\\\\\\\\CurrentVersion\\\\\\\\ registry value, for example _\\\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\\\"_.", - "type": "string" - }, - "labels": { - "description": "User-defined labels (key/value metadata) as set on the daemon.\n\n**Note**: When part of a Swarm, nodes can both have _daemon_ labels, set through the daemon configuration, and _node_ labels, set from a manager node in the Swarm. Node labels are not included in this field. Node labels can be retrieved using the `/nodes/(id)` endpoint on a manager node in the Swarm.", - "type": "array", - "items": { - "type": "string" - } - }, - "live_restore_enabled": { - "nullable": true, - "description": "Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected.", - "type": "boolean" - }, - "logging_driver": { - "nullable": true, - "description": "The logging driver to use as a default for new containers.", - "type": "string" - }, - "mem_total": { - "nullable": true, - "description": "Total amount of physical memory available on the host, in bytes.", - "type": "integer", - "format": "int64" - }, - "memory_limit": { - "nullable": true, - "description": "Indicates if the host has memory limit support enabled.", - "type": "boolean" - }, - "n_events_listener": { - "nullable": true, - "description": "Number of event listeners subscribed.", - "type": "integer", - "format": "int64" - }, - "n_fd": { - "nullable": true, - "description": "The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled.", - "type": "integer", - "format": "int64" - }, - "name": { - "nullable": true, - "description": "Hostname of the host.", - "type": "string" - }, - "ncpu": { - "nullable": true, - "description": "The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected.", - "type": "integer", - "format": "int64" - }, - "no_proxy": { - "nullable": true, - "description": "Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration.", - "type": "string" - }, - "oom_kill_disable": { - "nullable": true, - "description": "Indicates if OOM killer disable is supported on the host.", - "type": "boolean" - }, - "operating_system": { - "nullable": true, - "description": "Name of the host's operating system, for example: \\\"Ubuntu 16.04.2 LTS\\\" or \\\"Windows Server 2016 Datacenter\\\"", - "type": "string" - }, - "os_type": { - "nullable": true, - "description": "Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \\\"linux\\\" and \\\"windows\\\". A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", - "type": "string" - }, - "os_version": { - "nullable": true, - "description": "Version of the host's operating system\n\n**Note**: The information returned in this field, including its very existence, and the formatting of values, should not be considered stable, and may change without notice.", - "type": "string" - }, - "pids_limit": { - "nullable": true, - "description": "Indicates if the host kernel has PID limit support enabled.", - "type": "boolean" - }, - "plugins": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/PluginsInfo" - } - ] - }, - "product_license": { - "nullable": true, - "description": "Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included.", - "type": "string" - }, - "registry_config": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/RegistryServiceConfig" - } - ] - }, - "runc_commit": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ] - }, - "runtimes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Runtime" - } - }, - "security_options": { - "description": "List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs.", - "type": "array", - "items": { - "type": "string" - } - }, - "server_version": { - "nullable": true, - "description": "Version string of the daemon. **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) returns the Swarm version instead of the daemon version, for example `swarm/1.2.8`.", - "type": "string" - }, - "swap_limit": { - "nullable": true, - "description": "Indicates if the host has memory swap limit support enabled.", - "type": "boolean" - }, - "system_time": { - "nullable": true, - "description": "The number of goroutines that currently exist. This information is only returned if debug-mode is enabled.", - "type": "string" - }, - "warnings": { - "description": "List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Duration": { - "title": "int64", - "type": "integer", - "format": "duration" - }, - "EmailAuthenticationForm": { - "description": "The body of the form for email authentication.", - "type": "object", - "properties": { - "callback_url": { - "nullable": true, - "description": "The URL to redirect back to after we have authenticated.", - "type": "string", - "format": "uri" - }, - "email": { - "description": "The user's email.", - "type": "string", - "format": "email" - } - }, - "required": [ - "email" - ] - }, - "Empty": { - "description": "An \"empty\" type used to represent responses that have no associated data payload. This isn't intended for general use, but must be pub since it's used as the Body type for certain responses.", - "type": "string", - "enum": [ - null - ] - }, - "EngineMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "type": "object", - "properties": { - "async_jobs_running": { - "description": "If any async job is currently running.", - "type": "boolean" - }, - "cache": { - "description": "Metadata about our cache.", - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ] - }, - "environment": { - "description": "The environment we are running in.", - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ] - }, - "fs": { - "description": "Metadata about our file system.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ] - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "description": "Metadata about our pub-sub connection.", - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ] - } - }, - "required": [ - "async_jobs_running", - "cache", - "environment", - "fs", - "git_hash", - "pubsub" - ] - }, - "Environment": { - "description": "The environment the server is running in.", - "type": "string", - "enum": [ - "DEVELOPMENT", - "PREVIEW", - "PRODUCTION" - ] - }, - "Error": { - "description": "Error information from a response.", - "type": "object", - "properties": { - "error_code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "request_id": { - "type": "string" - } - }, - "required": [ - "message", - "request_id" - ] - }, - "ExecutorMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "type": "object", - "properties": { - "docker_info": { - "description": "Information about the docker daemon.", - "allOf": [ - { - "$ref": "#/components/schemas/DockerSystemInfo" - } - ] - }, - "environment": { - "description": "The environment we are running in.", - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ] - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - } - }, - "required": [ - "docker_info", - "environment", - "git_hash" - ] - }, - "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.", - "type": "object", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "type": "string", - "format": "partial-date-time" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "type": "string", - "format": "email" - }, - "email_verified": { - "nullable": true, - "description": "The date and time the email address was verified.", - "type": "string", - "format": "partial-date-time" - }, - "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": { - "nullable": true, - "description": "The user's MailChimp ID. This is mostly used for internal mapping.", - "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.", - "default": "", - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ] - }, - "stripe_id": { - "nullable": true, - "description": "The user's Stripe ID. This is mostly used for internal mapping.", - "type": "string" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "zendesk_id": { - "nullable": true, - "description": "The user's Zendesk ID. This is mostly used for internal mapping.", - "type": "string" - } - }, - "required": [ - "created_at", - "updated_at" - ] - }, - "ExtendedUserResultsPage": { - "description": "A single page of results", - "type": "object", - "properties": { - "items": { - "description": "list of items on this page of results", - "type": "array", - "items": { - "$ref": "#/components/schemas/ExtendedUser" - } - }, - "next_page": { - "nullable": true, - "description": "token used to fetch the next page of results (if any)", - "type": "string" - } - }, - "required": [ - "items" - ] - }, - "FileConversion": { - "description": "A file conversion.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the file conversion was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the file conversion was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "output": { - "nullable": true, - "description": "The converted file, if completed, base64 encoded.", - "allOf": [ - { - "$ref": "#/components/schemas/Base64Data" - } - ] - }, - "output_format": { - "description": "The output format of the file conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/FileOutputFormat" - } - ] - }, - "src_format": { - "description": "The source format of the file conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the file conversion was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the file conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "updated_at": { - "description": "The time and date the file conversion was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "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" - ] - }, - "FileDensity": { - "description": "A file density result.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the density was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the density was created.", - "type": "string", - "format": "partial-date-time" - }, - "density": { - "nullable": true, - "description": "The resulting density.", - "type": "number", - "format": "double" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "material_mass": { - "description": "The material mass as denoted by the user.", - "default": 0, - "type": "number", - "format": "float" - }, - "src_format": { - "description": "The source format of the file.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the density was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the density.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "updated_at": { - "description": "The time and date the density was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the density.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ] - }, - "FileMass": { - "description": "A file mass result.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the mass was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the mass was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "mass": { - "nullable": true, - "description": "The resulting mass.", - "type": "number", - "format": "double" - }, - "material_density": { - "description": "The material density as denoted by the user.", - "default": 0, - "type": "number", - "format": "float" - }, - "src_format": { - "description": "The source format of the file.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the mass was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the mass.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "updated_at": { - "description": "The time and date the mass was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the mass.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ] - }, - "FileOutputFormat": { - "description": "The valid types of output file formats.", - "type": "string", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx", - "fbxb" - ] - }, - "FileSourceFormat": { - "description": "The valid types of source file formats.", - "type": "string", - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx" - ] - }, - "FileSystemMetadata": { - "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", - "type": "object", - "properties": { - "ok": { - "description": "If the file system passed a sanity check.", - "type": "boolean" - } - }, - "required": [ - "ok" - ] - }, - "FileVolume": { - "description": "A file volume result.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the volume was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the volume was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "src_format": { - "description": "The source format of the file.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSourceFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the volume was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the volume.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "updated_at": { - "description": "The time and date the volume was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the volume.", - "type": "string" - }, - "volume": { - "nullable": true, - "description": "The resulting volume.", - "type": "number", - "format": "double" - } - }, - "required": [ - "created_at", - "id", - "src_format", - "status", - "updated_at" - ] - }, - "Gateway": { - "description": "Gateway information.", - "type": "object", - "properties": { - "auth_timeout": { - "description": "The auth timeout of the gateway.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "host": { - "description": "The host of the gateway.", - "default": "", - "type": "string" - }, - "name": { - "description": "The name of the gateway.", - "default": "", - "type": "string" - }, - "port": { - "description": "The port of the gateway.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "tls_timeout": { - "description": "The TLS timeout for the gateway.", - "default": 0, - "type": "integer", - "format": "int64" - } - } - }, - "IndexInfo": { - "description": "IndexInfo contains information about a registry.", - "type": "object", - "properties": { - "mirrors": { - "description": "List of mirrors, expressed as URIs.", - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "nullable": true, - "description": "Name of the registry, such as \\\"docker.io\\\".", - "type": "string" - }, - "official": { - "nullable": true, - "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", - "type": "boolean" - }, - "secure": { - "nullable": true, - "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "type": "boolean" - } - } - }, - "Invoice": { - "description": "An invoice.", - "type": "object", - "properties": { - "amount_due": { - "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "amount_paid": { - "description": "The amount, in %s, that was paid.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "amount_remaining": { - "description": "The amount remaining, in %s, that is due.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "attempt_count": { - "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", - "default": 0, - "type": "integer", - "format": "uint64", - "minimum": 0 - }, - "attempted": { - "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", - "default": false, - "type": "boolean" - }, - "created_at": { - "description": "Time at which the object was created.", - "type": "string", - "format": "date-time" - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ] - }, - "customer_email": { - "description": "The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.", - "type": "string", - "format": "email" - }, - "customer_id": { - "description": "Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.", - "type": "string" - }, - "default_payment_method": { - "description": "Default payment method.", - "type": "string" - }, - "description": { - "description": "Description of the invoice.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "lines": { - "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", - "type": "array", - "items": { - "$ref": "#/components/schemas/InvoiceLineItem" - } - }, - "metadata": { - "description": "Set of key-value pairs.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "number": { - "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", - "type": "string" - }, - "paid": { - "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", - "default": false, - "type": "boolean" - }, - "pdf": { - "nullable": true, - "description": "The link to download the PDF for the invoice.", - "type": "string", - "format": "uri" - }, - "receipt_number": { - "description": "This is the transaction number that appears on email receipts sent for this invoice.", - "type": "string" - }, - "statement_descriptor": { - "description": "Extra information about an invoice for the customer's credit card statement.", - "type": "string" - }, - "status": { - "nullable": true, - "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", - "allOf": [ - { - "$ref": "#/components/schemas/InvoiceStatus" - } - ] - }, - "subtotal": { - "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "tax": { - "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "total": { - "description": "Total after discounts and taxes.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "url": { - "nullable": true, - "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", - "type": "string", - "format": "uri" - } - }, - "required": [ - "created_at", - "currency" - ] - }, - "InvoiceLineItem": { - "description": "An invoice line item.", - "type": "object", - "properties": { - "amount": { - "description": "The amount, in %s.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "currency": { - "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", - "allOf": [ - { - "$ref": "#/components/schemas/Currency" - } - ] - }, - "description": { - "description": "The description.", - "type": "string" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "invoice_item": { - "description": "The ID of the invoice item associated with this line item if any.", - "type": "string" - }, - "metadata": { - "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": [ - "currency" - ] - }, - "InvoiceStatus": { - "description": "An enum representing the possible values of an `Invoice`'s `status` field.", - "type": "string", - "enum": [ - "deleted", - "draft", - "open", - "paid", - "uncollectible", - "void" - ] - }, - "IpAddr": { - "title": "String", - "type": "string", - "format": "ip" - }, - "Jetstream": { - "description": "Jetstream information.", - "type": "object", - "properties": { - "config": { - "description": "The Jetstream config.", - "default": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" + "put": { + "tags": [ + "users" + ], + "summary": "Update your user.", + "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", + "operationId": "update_user_self", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUser", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// UpdateSelf: Update your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\nuser, err := client.User.UpdateSelf(body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSelf" + }, + "x-rust": { + "example": "/**\n* Update your user.\n*\n* This function performs a `PUT` to the `/user` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\n*/\nlet user = client.users().update_self(body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.update_self" + }, + "x-python": { + "example": "from kittycad.models import User\nfrom kittycad.api.users import update_user_self\nfrom kittycad.types import Response\n\nfc: User = update_user_self.sync(client=client, body=UpdateUser)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[User] = update_user_self.sync_detailed(client=client, body=UpdateUser)\n\n# OR run async\nfc: User = await update_user_self.asyncio(client=client, body=UpdateUser)\n\n# OR run async with more info\nresponse: Response[User] = await update_user_self.asyncio_detailed(client=client, body=UpdateUser)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.update_user_self.html" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamConfig" - } - ] - }, - "meta": { - "description": "Meta information about the cluster.", - "default": { - "cluster_size": 0, - "leader": "", - "name": "" + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint for users.", + "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", + "operationId": "options_user_self", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Null", + "type": "string", + "enum": [ + null + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + } + } + }, + "/user/api-calls": { + "get": { + "tags": [ + "api-calls" + ], + "summary": "List API calls for your user.", + "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": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 retrieve 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-rust": { + "example": "/**\n* List API calls for your user.\n*\n* This function performs a `GET` to the `/user/api-calls` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_call_with_price = client.api_calls().user_list_calls(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API calls for your user.\n*\n* This function performs a `GET` to the `/user/api-calls` endpoint.\n*\n* As opposed to `user_list_calls`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_call_with_price = client.api_calls().user_list_all_calls(sort_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.user_list_calls" + }, + "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" + } + } + }, + "/user/api-calls/{id}": { + "get": { + "tags": [ + "api-calls" + ], + "summary": "Get an API call for a user.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The ID of the API call.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get an API call for a user.\n*\n* This function performs a `GET` to the `/user/api-calls/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the API call.\n*/\nlet api_call_with_price = client.api_calls().get_call_for_user(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_call_for_user" + }, + "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" + } + } + }, + "/user/api-tokens": { + "get": { + "tags": [ + "api-tokens" + ], + "summary": "List API tokens for your user.", + "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": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 retrieve 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-rust": { + "example": "/**\n* List API tokens for your user.\n*\n* This function performs a `GET` to the `/user/api-tokens` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_token = client.api_tokens().list_tokens_for_user(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API tokens for your user.\n*\n* This function performs a `GET` to the `/user/api-tokens` endpoint.\n*\n* As opposed to `list_tokens_for_user`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_token = client.api_tokens().list_all_tokens_for_user(sort_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.list_tokens_for_user" + }, + "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" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/MetaClusterInfo" - } - ] - }, - "stats": { - "description": "Jetstream statistics.", - "default": { - "accounts": 0, - "api": { - "errors": 0, - "inflight": 0, - "total": 0 - }, - "ha_assets": 0, - "memory": 0, - "reserved_memory": 0, - "reserved_store": 0, - "store": 0 + "post": { + "tags": [ + "api-tokens" + ], + "summary": "Create a new API token for your user.", + "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": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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" + }, + "x-rust": { + "example": "/**\n* Create a new API token for your user.\n*\n* This function performs a `POST` to the `/user/api-tokens` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\n*/\nlet api_token = client.api_tokens().create_token_for_user().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.create_token_for_user" + }, + "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" + } + } + }, + "/user/api-tokens/{token}": { + "get": { + "tags": [ + "api-tokens" + ], + "summary": "Get an API token for your user.", + "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": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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" + }, + "x-rust": { + "example": "/**\n* Get an API token for your user.\n*\n* This function performs a `GET` to the `/user/api-tokens/{token}` endpoint.\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*\n* * `token: &str` -- The API token.\n*/\nlet api_token = client.api_tokens().get_token_for_user(token).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.get_token_for_user" + }, + "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" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamStats" - } - ] - } - } - }, - "JetstreamApiStats": { - "description": "Jetstream API statistics.", - "type": "object", - "properties": { - "errors": { - "description": "The number of errors.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "inflight": { - "description": "The number of inflight requests.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "total": { - "description": "The number of requests.", - "default": 0, - "type": "integer", - "format": "int64" - } - } - }, - "JetstreamConfig": { - "description": "Jetstream configuration.", - "type": "object", - "properties": { - "domain": { - "description": "The domain.", - "default": "", - "type": "string" - }, - "max_memory": { - "description": "The max memory.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "max_storage": { - "description": "The max storage.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "store_dir": { - "description": "The store directory.", - "default": "", - "type": "string" - } - } - }, - "JetstreamStats": { - "description": "Jetstream statistics.", - "type": "object", - "properties": { - "accounts": { - "description": "The number of accounts.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "api": { - "description": "API stats.", - "default": { - "errors": 0, - "inflight": 0, - "total": 0 + "delete": { + "tags": [ + "api-tokens" + ], + "summary": "Delete an API token for your user.", + "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": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Delete an API token for your user.\n*\n* This function performs a `DELETE` to the `/user/api-tokens/{token}` endpoint.\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*\n* * `token: &str` -- The API token.\n*/\nclient.api_tokens().delete_token_for_user(token).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.delete_token_for_user" + }, + "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" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/JetstreamApiStats" - } - ] - }, - "ha_assets": { - "description": "The number of HA assets.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "memory": { - "description": "The memory used by the Jetstream server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "reserved_memory": { - "description": "The reserved memory for the Jetstream server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "reserved_store": { - "description": "The reserved storage for the Jetstream server.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "store": { - "description": "The storage used by the Jetstream server.", - "default": 0, - "type": "integer", - "format": "int64" - } - } - }, - "LeafNode": { - "description": "Leaf node information.", - "type": "object", - "properties": { - "auth_timeout": { - "description": "The auth timeout of the leaf node.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "host": { - "description": "The host of the leaf node.", - "default": "", - "type": "string" - }, - "port": { - "description": "The port of the leaf node.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "tls_timeout": { - "description": "The TLS timeout for the leaf node.", - "default": 0, - "type": "integer", - "format": "int64" - } - } - }, - "MetaClusterInfo": { - "description": "Jetstream statistics.", - "type": "object", - "properties": { - "cluster_size": { - "description": "The size of the cluster.", - "default": 0, - "type": "integer", - "format": "int64" - }, - "leader": { - "description": "The leader of the cluster.", - "default": "", - "type": "string" - }, - "name": { - "description": "The name of the cluster.", - "default": "", - "type": "string" - } - } - }, - "Metadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "type": "object", - "properties": { - "cache": { - "description": "Metadata about our cache.", - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ] - }, - "engine": { - "description": "Metadata about our engine API connection.", - "allOf": [ - { - "$ref": "#/components/schemas/EngineMetadata" - } - ] - }, - "environment": { - "description": "The environment we are running in.", - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ] - }, - "executor": { - "description": "Metadata about our executor API connection.", - "allOf": [ - { - "$ref": "#/components/schemas/ExecutorMetadata" - } - ] - }, - "fs": { - "description": "Metadata about our file system.", - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ] - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "description": "Metadata about our pub-sub connection.", - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ] - } + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint for API tokens.", + "description": "This is necessary for some preflight requests, specifically DELETE.", + "operationId": "options_api_token_for_user", + "parameters": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Null", + "type": "string", + "enum": [ + null + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + } + } }, - "required": [ - "cache", - "engine", - "environment", - "executor", - "fs", - "git_hash", - "pubsub" - ] - }, - "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.", - "type": "string", - "enum": [ - "OPTIONS", - "GET", - "POST", - "PUT", - "DELETE", - "HEAD", - "TRACE", - "CONNECT", - "PATCH", - "EXTENSION" - ] - }, - "OAuth2ClientInfo": { - "description": "Information about an OAuth 2.0 client.", - "type": "object", - "properties": { - "csrf_token": { - "description": "Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.", - "type": "string" - }, - "pkce_code_verifier": { - "nullable": true, - "description": "Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters. Each character must be ASCII alphanumeric or one of the characters \"-\" / \".\" / \"_\" / \"~\".", - "type": "string" - }, - "url": { - "description": "The URL for consent.", - "type": "string" - } - } - }, - "OAuth2GrantType": { - "description": "An OAuth 2.0 Grant Type. These are documented here: .", - "type": "string", - "enum": [ - "urn:ietf:params:oauth:grant-type:device_code" - ] - }, - "OutputFile": { - "description": "Output file contents.", - "type": "object", - "properties": { - "contents": { - "nullable": true, - "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", - "type": "string" - }, - "name": { - "description": "The name of the file.", - "default": "", - "type": "string" - } - } - }, - "PaymentIntent": { - "description": "A payment intent response.", - "type": "object", - "properties": { - "client_secret": { - "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", - "type": "string" - } + "/user/extended": { + "get": { + "tags": [ + "users" + ], + "summary": "Get extended information about your user.", + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users-extended/me` endpoint.", + "operationId": "get_user_self_extended", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-extended/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" + }, + "x-rust": { + "example": "/**\n* Get extended information about your user.\n*\n* This function performs a `GET` to the `/user/extended` endpoint.\n*\n* Get the user information for the authenticated user.\n* Alternatively, you can also use the `/users-extended/me` endpoint.\n*/\nlet extended_user = client.users().get_self_extended().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_self_extended" + }, + "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" + } + } }, - "required": [ - "client_secret" - ] - }, - "PaymentMethod": { - "description": "A payment method.", - "type": "object", - "properties": { - "billing_info": { - "description": "The billing info for the payment method.", - "allOf": [ - { - "$ref": "#/components/schemas/BillingInfo" - } - ] - }, - "card": { - "nullable": true, - "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", - "allOf": [ - { - "$ref": "#/components/schemas/CardDetails" - } - ] - }, - "created_at": { - "description": "Time at which the object was created.", - "type": "string", - "format": "date-time" - }, - "id": { - "description": "Unique identifier for the object.", - "type": "string" - }, - "metadata": { - "description": "Set of key-value pairs.", - "default": {}, - "type": "object", - "additionalProperties": { - "type": "string" + "/user/file/conversions/{id}": { + "get": { + "tags": [ + "file" + ], + "summary": "Get a file conversion for your user.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The ID of the async operation.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncApiCallOutput", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 async operation.\nasyncAPICallOutput, err := client.File.GetConversionForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" + }, + "x-rust": { + "example": "/**\n* Get a file conversion for your user.\n*\n* This function performs a `GET` to the `/user/file/conversions/{id}` endpoint.\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*\n* * `id: &str` -- The ID of the async operation.\n*/\nlet async_api_call_output = client.file().get_conversion_for_user(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/file/struct.File.html#method.get_conversion_for_user" + }, + "x-python": { + "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import get_file_conversion_for_user\nfrom kittycad.types import Response\n\nfc: FileConversion = get_file_conversion_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = get_file_conversion_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await get_file_conversion_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = 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" + } } - }, - "type": { - "description": "The type of payment method.", - "allOf": [ - { - "$ref": "#/components/schemas/PaymentMethodType" - } - ] - } }, - "required": [ - "billing_info", - "created_at", - "type" - ] - }, - "PaymentMethodCardChecks": { - "description": "Card checks.", - "type": "object", - "properties": { - "address_line1_check": { - "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - }, - "address_postal_code_check": { - "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - }, - "cvc_check": { - "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", - "type": "string" - } - } - }, - "PaymentMethodType": { - "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", - "type": "string", - "enum": [ - "card" - ] - }, - "PhoneNumber": { - "title": "String", - "type": "string", - "format": "phone" - }, - "PluginsInfo": { - "description": "Available plugins per type.\n\n**Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \\\"lazily\\\" loaded, and are not returned in this list if there is no resource using the plugin.", - "type": "object", - "properties": { - "authorization": { - "description": "Names of available authorization plugins.", - "type": "array", - "items": { - "type": "string" + "/user/payment": { + "get": { + "tags": [ + "payments" + ], + "summary": "Get payment info about your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.", + "operationId": "get_payment_information_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// GetInformationForUser: Get payment info about your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\ncustomer, err := client.Payment.GetInformationForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.GetInformationForUser" + }, + "x-rust": { + "example": "/**\n* Get payment info about your user.\n*\n* This function performs a `GET` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\n*/\nlet customer = client.payments().get_information_for_user().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.get_information_for_user" + }, + "x-python": { + "example": "from kittycad.models import Customer\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Customer = get_payment_information_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Customer] = get_payment_information_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: Customer = await get_payment_information_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Customer] = await get_payment_information_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.get_payment_information_for_user.html" + } + }, + "put": { + "tags": [ + "payments" + ], + "summary": "Update payment info for your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.", + "operationId": "update_payment_information_for_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// UpdateInformationForUser: Update payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\ncustomer, err := client.Payment.UpdateInformationForUser(body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateInformationForUser" + }, + "x-rust": { + "example": "/**\n* Update payment info for your user.\n*\n* This function performs a `PUT` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\n*/\nlet customer = client.payments().update_information_for_user(body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.update_information_for_user" + }, + "x-python": { + "example": "from kittycad.models import Customer\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Customer = update_payment_information_for_user.sync(client=client, body=BillingInfo)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Customer] = update_payment_information_for_user.sync_detailed(client=client, body=BillingInfo)\n\n# OR run async\nfc: Customer = await update_payment_information_for_user.asyncio(client=client, body=BillingInfo)\n\n# OR run async with more info\nresponse: Response[Customer] = await update_payment_information_for_user.asyncio_detailed(client=client, body=BillingInfo)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.update_payment_information_for_user.html" + } + }, + "post": { + "tags": [ + "payments" + ], + "summary": "Create payment info for your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.", + "operationId": "create_payment_information_for_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo", + "x-scope": [ + "" + ] + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateInformationForUser: Create payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\ncustomer, err := client.Payment.CreateInformationForUser(body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateInformationForUser" + }, + "x-rust": { + "example": "/**\n* Create payment info for your user.\n*\n* This function performs a `POST` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\n*/\nlet customer = client.payments().create_information_for_user(body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.create_information_for_user" + }, + "x-python": { + "example": "from kittycad.models import Customer\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Customer = create_payment_information_for_user.sync(client=client, body=BillingInfo)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Customer] = create_payment_information_for_user.sync_detailed(client=client, body=BillingInfo)\n\n# OR run async\nfc: Customer = await create_payment_information_for_user.asyncio(client=client, body=BillingInfo)\n\n# OR run async with more info\nresponse: Response[Customer] = await create_payment_information_for_user.asyncio_detailed(client=client, body=BillingInfo)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.create_payment_information_for_user.html" + } + }, + "delete": { + "tags": [ + "payments" + ], + "summary": "Delete payment info for your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.", + "operationId": "delete_payment_information_for_user", + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// DeleteInformationForUser: Delete payment info for your user.\n//\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\nif err := client.Payment.DeleteInformationForUser(); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteInformationForUser" + }, + "x-rust": { + "example": "/**\n* Delete payment info for your user.\n*\n* This function performs a `DELETE` to the `/user/payment` endpoint.\n*\n* This includes billing address, phone, and name.\n* This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\n*/\nclient.payments().delete_information_for_user().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.delete_information_for_user" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.types import Response\n\nfc: Error = delete_payment_information_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_payment_information_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: Error = await delete_payment_information_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Error] = await delete_payment_information_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.delete_payment_information_for_user.html" + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint for user payment information.", + "description": "This is necessary for some preflight requests, specifically DELETE and PUT.", + "operationId": "options_payment_information_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Null", + "type": "string", + "enum": [ + null + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + } } - }, - "log": { - "description": "Names of available logging-drivers, and logging-driver plugins.", - "type": "array", - "items": { - "type": "string" - } - }, - "network": { - "description": "Names of available network-drivers, and network-driver plugins.", - "type": "array", - "items": { - "type": "string" - } - }, - "volume": { - "description": "Names of available volume-drivers, and network-driver plugins.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Pong": { - "description": "The response from the `/ping` endpoint.", - "type": "object", - "properties": { - "message": { - "description": "The pong response.", - "type": "string" - } }, - "required": [ - "message" - ] - }, - "RegistryServiceConfig": { - "description": "RegistryServiceConfig stores daemon registry services configuration.", - "type": "object", - "properties": { - "allow_nondistributable_artifacts_cid_rs": { - "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "type": "array", - "items": { - "type": "string" + "/user/payment/intent": { + "post": { + "tags": [ + "payments", + "hidden" + ], + "summary": "Create a payment intent for your user.", + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.", + "operationId": "create_payment_intent_for_user", + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentIntent", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// CreateIntentForUser: Create a payment intent for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\npaymentIntent, err := client.Payment.CreateIntentForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateIntentForUser" + }, + "x-rust": { + "example": "/**\n* Create a payment intent for your user.\n*\n* This function performs a `POST` to the `/user/payment/intent` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\n*/\nlet payment_intent = client.payments().create_intent_for_user().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.create_intent_for_user" + }, + "x-python": { + "example": "from kittycad.models import PaymentIntent\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.types import Response\n\nfc: PaymentIntent = create_payment_intent_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[PaymentIntent] = create_payment_intent_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: PaymentIntent = await create_payment_intent_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[PaymentIntent] = await create_payment_intent_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.create_payment_intent_for_user.html" + } } - }, - "allow_nondistributable_artifacts_hostnames": { - "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "type": "array", - "items": { - "type": "string" - } - }, - "index_configs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IndexInfo" - } - }, - "insecure_registry_cid_rs": { - "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "type": "array", - "items": { - "type": "string" - } - }, - "mirrors": { - "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Runtime": { - "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", - "type": "object", - "properties": { - "path": { - "nullable": true, - "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "type": "string" - }, - "runtime_args": { - "description": "List of command-line arguments to pass to the runtime when invoked.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Session": { - "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", - "type": "object", - "properties": { - "created_at": { - "description": "The date and time the session was created.", - "type": "string", - "format": "partial-date-time" - }, - "expires": { - "description": "The date and time the session expires.", - "type": "string", - "format": "partial-date-time" - }, - "id": { - "description": "The unique identifier for the session.", - "type": "string" - }, - "session_token": { - "description": "The session token.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "updated_at": { - "description": "The date and time the session was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user that the session belongs to.", - "type": "string" - } }, - "required": [ - "created_at", - "expires", - "session_token", - "updated_at" - ] - }, - "StatusCode": { - "title": "int32", - "type": "integer", - "format": "int32" - }, - "SystemInfoCgroupDriverEnum": { - "type": "string", - "enum": [ - "", - "cgroupfs", - "systemd", - "none" - ] - }, - "SystemInfoCgroupVersionEnum": { - "type": "string", - "enum": [ - "", - "1", - "2" - ] - }, - "SystemInfoDefaultAddressPools": { - "type": "object", - "properties": { - "base": { - "nullable": true, - "description": "The network address in CIDR format", - "type": "string" - }, - "size": { - "nullable": true, - "description": "The network pool size", - "type": "integer", - "format": "int64" - } - } - }, - "SystemInfoIsolationEnum": { - "type": "string", - "enum": [ - "", - "default", - "hyperv", - "process" - ] - }, - "UnitConversion": { - "description": "A unit conversion.", - "type": "object", - "properties": { - "completed_at": { - "nullable": true, - "description": "The time and date the unit conversion was completed.", - "type": "string", - "format": "partial-date-time" - }, - "created_at": { - "description": "The time and date the unit conversion was created.", - "type": "string", - "format": "partial-date-time" - }, - "error": { - "nullable": true, - "description": "The error the function returned, if any.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "input": { - "description": "The input value.", - "default": 0, - "type": "number", - "format": "float" - }, - "output": { - "nullable": true, - "description": "The resulting value.", - "type": "number", - "format": "double" - }, - "output_format": { - "description": "The output format of the unit conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricFormat" - } - ] - }, - "src_format": { - "description": "The source format of the unit conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/UnitMetricFormat" - } - ] - }, - "started_at": { - "nullable": true, - "description": "The time and date the unit conversion was started.", - "type": "string", - "format": "partial-date-time" - }, - "status": { - "description": "The status of the unit conversion.", - "allOf": [ - { - "$ref": "#/components/schemas/ApiCallStatus" - } - ] - }, - "updated_at": { - "description": "The time and date the unit conversion was last updated.", - "type": "string", - "format": "partial-date-time" - }, - "user_id": { - "description": "The user ID of the user who created the unit conversion.", - "type": "string" - } - }, - "required": [ - "created_at", - "id", - "output_format", - "src_format", - "status", - "updated_at" - ] - }, - "UnitMetricFormat": { - "description": "The valid types of metric unit formats.", - "type": "string", - "enum": [ - "atto", - "femto", - "pico", - "nano", - "micro", - "milli", - "centi", - "deci", - "metric_unit", - "deca", - "hecto", - "kilo", - "mega", - "giga", - "tera", - "peta", - "exa" - ] - }, - "UpdateUser": { - "description": "The user-modifiable parts of a User.", - "type": "object", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "first_name": { - "description": "The user's first name.", - "type": "string" - }, - "github": { - "description": "The user's GitHub handle.", - "type": "string" - }, - "last_name": { - "description": "The user's last name.", - "type": "string" - }, - "phone": { - "description": "The user's phone number.", - "default": "", - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ] - } - } - }, - "User": { - "description": "A user.", - "type": "object", - "properties": { - "company": { - "description": "The user's company.", - "type": "string" - }, - "created_at": { - "description": "The date and time the user was created.", - "type": "string", - "format": "partial-date-time" - }, - "discord": { - "description": "The user's Discord handle.", - "type": "string" - }, - "email": { - "description": "The email address of the user.", - "type": "string", - "format": "email" - }, - "email_verified": { - "nullable": true, - "description": "The date and time the email address was verified.", - "type": "string", - "format": "partial-date-time" - }, - "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.", - "default": "", - "allOf": [ - { - "$ref": "#/components/schemas/PhoneNumber" - } - ] - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "type": "string", - "format": "partial-date-time" - } - }, - "required": [ - "created_at", - "updated_at" - ] - }, - "UserResultsPage": { - "description": "A single page of results", - "type": "object", - "properties": { - "items": { - "description": "list of items on this page of results", - "type": "array", - "items": { - "$ref": "#/components/schemas/User" + "/user/payment/invoices": { + "get": { + "tags": [ + "payments" + ], + "summary": "List invoices for your user.", + "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", + "operationId": "list_invoices_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_Invoice", + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice", + "x-scope": [ + "" + ] + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// ListInvoicesForUser: List invoices for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\nInvoice, err := client.Payment.ListInvoicesForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListInvoicesForUser" + }, + "x-rust": { + "example": "/**\n* List invoices for your user.\n*\n* This function performs a `GET` to the `/user/payment/invoices` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\n*/\nlet vec_crate_types_invoice = client.payments().list_invoices_for_user().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.list_invoices_for_user" + }, + "x-python": { + "example": "from kittycad.models import [Invoice]\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.types import Response\n\nfc: [Invoice] = list_invoices_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[Invoice]] = list_invoices_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: [Invoice] = await list_invoices_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[[Invoice]] = await list_invoices_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.list_invoices_for_user.html" + } } - }, - "next_page": { - "nullable": true, - "description": "token used to fetch the next page of results (if any)", - "type": "string" - } }, - "required": [ - "items" - ] - }, - "Uuid": { - "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", - "type": "string", - "format": "uuid" - } - } - }, - "tags": [ - { - "name": "api-calls", - "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" - } + "/user/payment/methods": { + "get": { + "tags": [ + "payments" + ], + "summary": "List payment methods for your user.", + "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.", + "operationId": "list_payment_methods_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_PaymentMethod", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod", + "x-scope": [ + "" + ] + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// ListMethodsForUser: List payment methods for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\nPaymentMethod, err := client.Payment.ListMethodsForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListMethodsForUser" + }, + "x-rust": { + "example": "/**\n* List payment methods for your user.\n*\n* This function performs a `GET` to the `/user/payment/methods` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\n*/\nlet vec_crate_types_payment_method = client.payments().list_methods_for_user().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.list_methods_for_user" + }, + "x-python": { + "example": "from kittycad.models import [PaymentMethod]\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.types import Response\n\nfc: [PaymentMethod] = list_payment_methods_for_user.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[PaymentMethod]] = list_payment_methods_for_user.sync_detailed(client=client)\n\n# OR run async\nfc: [PaymentMethod] = await list_payment_methods_for_user.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[[PaymentMethod]] = await list_payment_methods_for_user.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.list_payment_methods_for_user.html" + } + } + }, + "/user/payment/methods/{id}": { + "delete": { + "tags": [ + "payments", + "hidden" + ], + "summary": "Delete a payment method for your user.", + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.", + "operationId": "delete_payment_method_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "x-go": { + "example": "// DeleteMethodForUser: Delete a payment method for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n//\n// Parameters:\n//\t- `id`: The ID of the payment method.\nif err := client.Payment.DeleteMethodForUser(id); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteMethodForUser" + }, + "x-rust": { + "example": "/**\n* Delete a payment method for your user.\n*\n* This function performs a `DELETE` to the `/user/payment/methods/{id}` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n*\n* **Parameters:**\n*\n* * `id: &str` -- The ID of the payment method.\n*/\nclient.payments().delete_method_for_user(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.delete_method_for_user" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.types import Response\n\nfc: Error = delete_payment_method_for_user.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_payment_method_for_user.sync_detailed(client=client, id=)\n\n# OR run async\nfc: Error = await delete_payment_method_for_user.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[Error] = await delete_payment_method_for_user.asyncio_detailed(client=client, id=)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.payments.delete_payment_method_for_user.html" + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint for user payment methods.", + "description": "This is necessary for some preflight requests, specifically DELETE.", + "operationId": "options_payment_methods_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Null", + "type": "string", + "enum": [ + null + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + } + } + }, + "/user/session/{token}": { + "get": { + "tags": [ + "sessions" + ], + "summary": "Get a session for your user.", + "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": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get a session for your user.\n*\n* This function performs a `GET` to the `/user/session/{token}` endpoint.\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*\n* * `token: &str` -- The API token.\n*/\nlet session = client.sessions().get_for_user(token).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/sessions/struct.Sessions.html#method.get_for_user" + }, + "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": { + "tags": [ + "users", + "hidden" + ], + "summary": "List users.", + "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": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 retrieve 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-rust": { + "example": "/**\n* List users.\n*\n* This function performs a `GET` to the `/users` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_user = client.users().list(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List users.\n*\n* This function performs a `GET` to the `/users` endpoint.\n*\n* As opposed to `list`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_user = client.users().list_all(sort_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.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": { + "tags": [ + "users", + "hidden" + ], + "summary": "List users with extended information.", + "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": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUserResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 retrieve 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-rust": { + "example": "/**\n* List users with extended information.\n*\n* This function performs a `GET` to the `/users-extended` endpoint.\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* **Parameters:**\n*\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_extended_user = client.users().list_extended(limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List users with extended information.\n*\n* This function performs a `GET` to the `/users-extended` endpoint.\n*\n* As opposed to `list_extended`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_extended_user = client.users().list_all_extended(sort_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.list_extended" + }, + "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": { + "tags": [ + "users", + "hidden" + ], + "summary": "Get extended information about a user.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The user ID.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get extended information about a user.\n*\n* This function performs a `GET` to the `/users-extended/{id}` endpoint.\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*\n* * `id: &str` -- The user ID.\n*/\nlet extended_user = client.users().get_extended(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_extended" + }, + "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": { + "tags": [ + "users", + "hidden" + ], + "summary": "Get a user.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The user ID.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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-rust": { + "example": "/**\n* Get a user.\n*\n* This function performs a `GET` to the `/users/{id}` endpoint.\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*\n* * `id: &str` -- The user ID.\n*/\nlet user = client.users().get(id).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.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": { + "tags": [ + "api-calls", + "hidden" + ], + "summary": "List API calls for a user.", + "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": [ + { + "in": "path", + "name": "id", + "description": "The user ID.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + }, + "style": "form" + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode", + "x-scope": [ + "" + ] + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage", + "x-scope": [ + "" + ] + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + }, + "5XX": { + "$ref": "#/components/responses/Error", + "x-scope": [ + "" + ] + } + }, + "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 retrieve 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-rust": { + "example": "/**\n* List API calls for a user.\n*\n* This function performs a `GET` to the `/users/{id}/api-calls` endpoint.\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* **Parameters:**\n*\n* * `id: &str` -- The user ID.\n* * `limit: u32` -- Maximum number of items returned by a single call.\n* * `page_token: &str` -- Token returned by previous call to retrieve the subsequent page.\n* * `sort_by: crate::types::CreatedAtSortMode` -- Supported set of sort modes for scanning by created_at only.\n* \n* Currently, we only support scanning in ascending order.\n*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_calls_for_user(id, limit, page_token, sort_by).await?;\n\n// - OR -\n\n/**\n* List API calls for a user.\n*\n* This function performs a `GET` to the `/users/{id}/api-calls` endpoint.\n*\n* As opposed to `list_calls_for_user`, this function returns all the pages of the request at once.\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*/\nlet vec_crate_types_api_call_with_price = client.api_calls().list_all_calls_for_user(id, sort_by).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_calls_for_user" + }, + "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" + } + } + } }, - { - "name": "api-tokens", - "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" - } + "components": { + "responses": { + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error", + "x-scope": [ + "", + "#/components/responses/Error" + ] + } + } + } + } + }, + "schemas": { + "AccountProvider": { + "description": "An account provider.", + "type": "string", + "enum": [ + "google", + "github" + ] + }, + "Address": { + "description": "An address.", + "type": "object", + "properties": { + "city": { + "description": "The city component.", + "type": "string" + }, + "country": { + "description": "The country component.", + "type": "string" + }, + "created_at": { + "description": "The time and date the address was created.", + "type": "string", + "format": "partial-date-time" + }, + "id": { + "description": "The unique identifier of the address.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/Customer", + "#/components/schemas/Address" + ] + } + ] + }, + "state": { + "description": "The state component.", + "type": "string" + }, + "street1": { + "description": "The first street component.", + "type": "string" + }, + "street2": { + "description": "The second street component.", + "type": "string" + }, + "updated_at": { + "description": "The time and date the address was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID that this address belongs to.", + "type": "string" + }, + "zip": { + "description": "The zip component.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "updated_at" + ] + }, + "ApiCallQueryGroup": { + "description": "A response for a query on the API call table that is grouped by something.", + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64" + }, + "query": { + "type": "string" + } + }, + "required": [ + "count", + "query" + ] + }, + "ApiCallQueryGroupBy": { + "description": "The field of an API call to group by.", + "type": "string", + "enum": [ + "email", + "method", + "endpoint", + "user_id", + "origin", + "ip_address" + ] + }, + "ApiCallStatus": { + "description": "The status of an async API call.", + "type": "string", + "enum": [ + "Queued", + "Uploaded", + "In Progress", + "Completed", + "Failed" + ] + }, + "ApiCallWithPrice": { + "description": "An API call with the price.\n\nThis is a join of the `ApiCall` and `ApiCallPrice` tables.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The date and time the API call completed billing.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The date and time the API call was created.", + "type": "string", + "format": "partial-date-time" + }, + "duration": { + "nullable": true, + "description": "The duration of the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/Duration", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "email": { + "description": "The user's email address.", + "type": "string", + "format": "email" + }, + "endpoint": { + "description": "The endpoint requested by the API call.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "ip_address": { + "description": "The ip address of the origin.", + "default": "", + "allOf": [ + { + "$ref": "#/components/schemas/IpAddr", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "method": { + "description": "The HTTP method requsted by the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/Method", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "minutes": { + "nullable": true, + "description": "The number of minutes the API call was billed for.", + "type": "integer", + "format": "int32" + }, + "origin": { + "description": "The origin of the API call.", + "type": "string" + }, + "price": { + "nullable": true, + "description": "The price of the API call.", + "type": "number" + }, + "request_body": { + "nullable": true, + "description": "The request body sent by the API call.", + "type": "string" + }, + "request_query_params": { + "description": "The request query params sent by the API call.", + "type": "string" + }, + "response_body": { + "nullable": true, + "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", + "type": "string" + }, + "started_at": { + "nullable": true, + "description": "The date and time the API call started billing.", + "type": "string", + "format": "partial-date-time" + }, + "status_code": { + "nullable": true, + "description": "The status code returned by the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/StatusCode", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "stripe_invoice_item_id": { + "description": "The Stripe invoice item ID of the API call if it is billable.", + "type": "string" + }, + "token": { + "description": "The API token that made the API call.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "updated_at": { + "description": "The date and time the API call was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "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" + ] + }, + "ApiCallWithPriceResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage" + ] + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, + "ApiToken": { + "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", + "type": "object", + "properties": { + "created_at": { + "description": "The date and time the API token was created.", + "type": "string", + "format": "partial-date-time" + }, + "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": { + "description": "The API token itself.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/ApiTokenResultsPage", + "#/components/schemas/ApiToken" + ] + } + ] + }, + "updated_at": { + "description": "The date and time the API token was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The ID of the user that owns the API token.", + "type": "string" + } + }, + "required": [ + "created_at", + "is_valid", + "token", + "updated_at" + ] + }, + "ApiTokenResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiToken", + "x-scope": [ + "", + "#/components/schemas/ApiTokenResultsPage" + ] + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, + "AsyncApiCall": { + "description": "An async API call.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the async API call was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the async API call was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the async API call.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage", + "#/components/schemas/AsyncApiCall" + ] + } + ] + }, + "input": { + "description": "The JSON input for the API call. These are determined by the endpoint that is run." + }, + "output": { + "nullable": true, + "description": "The JSON output for the API call. These are determined by the endpoint that is run." + }, + "started_at": { + "nullable": true, + "description": "The time and date the async API call was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the async API call.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage", + "#/components/schemas/AsyncApiCall" + ] + } + ] + }, + "type": { + "description": "The type of async API call.", + "allOf": [ + { + "$ref": "#/components/schemas/AsyncApiCallType", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage", + "#/components/schemas/AsyncApiCall" + ] + } + ] + }, + "updated_at": { + "description": "The time and date the async API call was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the async API call.", + "type": "string" + }, + "worker": { + "description": "The worker node that is performing or performed the async API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "status", + "type", + "updated_at" + ] + }, + "AsyncApiCallOutput": { + "description": "The output from the async API call.", + "oneOf": [ + { + "description": "A file conversion.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the file conversion was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "output": { + "nullable": true, + "description": "The converted file, if completed, base64 encoded.", + "allOf": [ + { + "$ref": "#/components/schemas/Base64Data", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "output_format": { + "description": "The output format of the file conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/FileOutputFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "src_format": { + "description": "The source format of the file conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the file conversion was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the file conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "type": { + "type": "string", + "enum": [ + "FileConversion" + ] + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "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", + "type", + "updated_at" + ] + }, + { + "description": "A file mass.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the mass was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the mass was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "mass": { + "nullable": true, + "description": "The resulting mass.", + "type": "number", + "format": "double" + }, + "material_density": { + "description": "The material density as denoted by the user.", + "default": 0, + "type": "number", + "format": "float" + }, + "src_format": { + "description": "The source format of the file.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the mass was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the mass.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "type": { + "type": "string", + "enum": [ + "FileMass" + ] + }, + "updated_at": { + "description": "The time and date the mass was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the mass.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ] + }, + { + "description": "A file volume.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the volume was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the volume was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "src_format": { + "description": "The source format of the file.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the volume was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the volume.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "type": { + "type": "string", + "enum": [ + "FileVolume" + ] + }, + "updated_at": { + "description": "The time and date the volume was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the volume.", + "type": "string" + }, + "volume": { + "nullable": true, + "description": "The resulting volume.", + "type": "number", + "format": "double" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ] + }, + { + "description": "A file density.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the density was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the density was created.", + "type": "string", + "format": "partial-date-time" + }, + "density": { + "nullable": true, + "description": "The resulting density.", + "type": "number", + "format": "double" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "material_mass": { + "description": "The material mass as denoted by the user.", + "default": 0, + "type": "number", + "format": "float" + }, + "src_format": { + "description": "The source format of the file.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the density was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the density.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallOutput" + ] + } + ] + }, + "type": { + "type": "string", + "enum": [ + "FileDensity" + ] + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "type", + "updated_at" + ] + } + ] + }, + "AsyncApiCallResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/AsyncApiCall", + "x-scope": [ + "", + "#/components/schemas/AsyncApiCallResultsPage" + ] + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, + "AsyncApiCallType": { + "description": "The type of async API call.", + "type": "string", + "enum": [ + "FileConversion", + "FileVolume", + "FileMass", + "FileDensity" + ] + }, + "Base64Data": { + "title": "String", + "type": "string", + "format": "byte" + }, + "BillingInfo": { + "description": "The billing information for payments.", + "type": "object", + "properties": { + "address": { + "nullable": true, + "description": "The address of the customer.", + "allOf": [ + { + "$ref": "#/components/schemas/Address", + "x-scope": [ + "", + "#/components/schemas/BillingInfo" + ] + } + ] + }, + "name": { + "description": "The name of the customer.", + "type": "string" + }, + "phone": { + "description": "The phone for the customer.", + "default": "", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/BillingInfo" + ] + } + ] + } + } + }, + "CacheMetadata": { + "description": "Metadata about our cache.\n\nThis is mostly used for internal purposes and debugging.", + "type": "object", + "properties": { + "ok": { + "description": "If the cache returned an ok response from ping.", + "type": "boolean" + } + }, + "required": [ + "ok" + ] + }, + "CardDetails": { + "description": "The card details of a payment method.", + "type": "object", + "properties": { + "brand": { + "description": "Card brand.\n\nCan be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.", + "type": "string" + }, + "checks": { + "description": "Checks on Card address and CVC if provided.", + "default": {}, + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethodCardChecks", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod", + "#/components/schemas/CardDetails" + ] + } + ] + }, + "country": { + "description": "Two-letter ISO code representing the country of the card.", + "type": "string" + }, + "exp_month": { + "description": "Two-digit number representing the card's expiration month.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "exp_year": { + "description": "Four-digit number representing the card's expiration year.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "fingerprint": { + "description": "Uniquely identifies this particular card number.", + "type": "string" + }, + "funding": { + "description": "Card funding type.\n\nCan be `credit`, `debit`, `prepaid`, or `unknown`.", + "type": "string" + }, + "last4": { + "description": "The last four digits of the card.", + "type": "string" + } + } + }, + "Cluster": { + "description": "Cluster information.", + "type": "object", + "properties": { + "addr": { + "nullable": true, + "description": "The IP address of the cluster.", + "type": "string" + }, + "auth_timeout": { + "description": "The auth timeout of the cluster.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "cluster_port": { + "description": "The port of the cluster.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "name": { + "description": "The name of the cluster.", + "default": "", + "type": "string" + }, + "tls_timeout": { + "description": "The TLS timeout for the cluster.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "urls": { + "description": "The urls of the cluster.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "CodeLanguage": { + "description": "The language code is written in.", + "type": "string", + "enum": [ + "go", + "python", + "node" + ] + }, + "CodeOutput": { + "description": "Output of the code being executed.", + "type": "object", + "properties": { + "output_files": { + "description": "The contents of the files requested if they were passed.", + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputFile", + "x-scope": [ + "", + "#/components/schemas/CodeOutput" + ] + } + }, + "stderr": { + "description": "The stderr of the code.", + "default": "", + "type": "string" + }, + "stdout": { + "description": "The stdout of the code.", + "default": "", + "type": "string" + } + } + }, + "Commit": { + "description": "Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.", + "type": "object", + "properties": { + "expected": { + "nullable": true, + "description": "Commit ID of external tool expected by dockerd as set at build time.", + "type": "string" + }, + "id": { + "nullable": true, + "description": "Actual commit ID of external tool.", + "type": "string" + } + } + }, + "Connection": { + "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", + "type": "object", + "properties": { + "auth_timeout": { + "description": "The auth timeout of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "cluster": { + "description": "Information about the cluster.", + "default": { + "auth_timeout": 0, + "cluster_port": 0, + "name": "", + "tls_timeout": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/Cluster", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection" + ] + } + ] + }, + "config_load_time": { + "description": "The time the configuration was loaded.", + "type": "string", + "format": "date-time" + }, + "connections": { + "description": "The number of connections to the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "cores": { + "description": "The CPU core usage of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "cpu": { + "nullable": true, + "type": "number", + "format": "double" + }, + "gateway": { + "description": "Information about the gateway.", + "default": { + "auth_timeout": 0, + "host": "", + "name": "", + "port": 0, + "tls_timeout": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/Gateway", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection" + ] + } + ] + }, + "git_commit": { + "description": "The git commit.", + "default": "", + "type": "string" + }, + "go": { + "description": "The go version.", + "default": "", + "type": "string" + }, + "gomaxprocs": { + "description": "`GOMAXPROCS` of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "host": { + "description": "The host of the server.", + "type": "string" + }, + "http_base_path": { + "description": "The http base path of the server.", + "default": "", + "type": "string" + }, + "http_host": { + "description": "The http host of the server.", + "default": "", + "type": "string" + }, + "http_port": { + "description": "The http port of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "http_req_stats": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "https_port": { + "description": "The https port of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "in_bytes": { + "description": "The count of inbound bytes for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "in_msgs": { + "description": "The number of inbound messages for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "jetstream": { + "description": "Jetstream information.", + "default": { + "config": { + "domain": "", + "max_memory": 0, + "max_storage": 0, + "store_dir": "" + }, + "meta": { + "cluster_size": 0, + "leader": "", + "name": "" + }, + "stats": { + "accounts": 0, + "api": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "ha_assets": 0, + "memory": 0, + "reserved_memory": 0, + "reserved_store": 0, + "store": 0 + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Jetstream", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection" + ] + } + ] + }, + "leaf": { + "description": "Information about leaf nodes.", + "default": { + "auth_timeout": 0, + "host": "", + "port": 0, + "tls_timeout": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/LeafNode", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection" + ] + } + ] + }, + "leafnodes": { + "description": "The number of leaf nodes for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "max_connections": { + "description": "The max connections of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "max_control_line": { + "description": "The max control line of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "max_payload": { + "description": "The max payload of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "max_pending": { + "description": "The max pending of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "mem": { + "description": "The memory usage of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "now": { + "description": "The time now.", + "type": "string", + "format": "date-time" + }, + "out_bytes": { + "description": "The count of outbound bytes for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "out_msgs": { + "description": "The number of outbound messages for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "ping_interval": { + "description": "The ping interval of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "ping_max": { + "description": "The ping max of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "port": { + "description": "The port of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "proto": { + "description": "The protocol version.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "remotes": { + "description": "The number of remotes for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "routes": { + "description": "The number of routes for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "server_id": { + "description": "The server ID.", + "default": "", + "type": "string" + }, + "server_name": { + "description": "The server name.", + "default": "", + "type": "string" + }, + "slow_consumers": { + "description": "The number of slow consumers for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "start": { + "description": "When the server was started.", + "type": "string", + "format": "date-time" + }, + "subscriptions": { + "description": "The number of subscriptions for the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "system_account": { + "description": "The system account.", + "default": "", + "type": "string" + }, + "tls_timeout": { + "description": "The TLS timeout of the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "total_connections": { + "description": "The total number of connections to the server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "uptime": { + "description": "The uptime of the server.", + "default": "", + "type": "string" + }, + "version": { + "description": "The version of the service.", + "default": "", + "type": "string" + }, + "write_deadline": { + "description": "The write deadline of the server.", + "default": 0, + "type": "integer", + "format": "int64" + } + }, + "required": [ + "config_load_time", + "host", + "http_req_stats", + "now", + "start" + ] + }, + "CreatedAtSortMode": { + "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", + "type": "string", + "enum": [ + "created-at-ascending", + "created-at-descending" + ] + }, + "Currency": { + "description": "Currency is the list of supported currencies.\n\nFor more details see .", + "type": "string", + "enum": [ + "aed", + "afn", + "all", + "amd", + "ang", + "aoa", + "ars", + "aud", + "awg", + "azn", + "bam", + "bbd", + "bdt", + "bgn", + "bif", + "bmd", + "bnd", + "bob", + "brl", + "bsd", + "bwp", + "bzd", + "cad", + "cdf", + "chf", + "clp", + "cny", + "cop", + "crc", + "cve", + "czk", + "djf", + "dkk", + "dop", + "dzd", + "eek", + "egp", + "etb", + "eur", + "fjd", + "fkp", + "gbp", + "gel", + "gip", + "gmd", + "gnf", + "gtq", + "gyd", + "hkd", + "hnl", + "hrk", + "htg", + "huf", + "idr", + "ils", + "inr", + "isk", + "jmd", + "jpy", + "kes", + "kgs", + "khr", + "kmf", + "krw", + "kyd", + "kzt", + "lak", + "lbp", + "lkr", + "lrd", + "lsl", + "ltl", + "lvl", + "mad", + "mdl", + "mga", + "mkd", + "mnt", + "mop", + "mro", + "mur", + "mvr", + "mwk", + "mxn", + "myr", + "mzn", + "nad", + "ngn", + "nio", + "nok", + "npr", + "nzd", + "pab", + "pen", + "pgk", + "php", + "pkr", + "pln", + "pyg", + "qar", + "ron", + "rsd", + "rub", + "rwf", + "sar", + "sbd", + "scr", + "sek", + "sgd", + "shp", + "sll", + "sos", + "srd", + "std", + "svc", + "szl", + "thb", + "tjs", + "top", + "try", + "ttd", + "twd", + "tzs", + "uah", + "ugx", + "usd", + "uyu", + "uzs", + "vef", + "vnd", + "vuv", + "wst", + "xaf", + "xcd", + "xof", + "xpf", + "yer", + "zar", + "zmw" + ] + }, + "Customer": { + "description": "The resource representing a payment \"Customer\".", + "type": "object", + "properties": { + "address": { + "nullable": true, + "description": "The customer's address.", + "allOf": [ + { + "$ref": "#/components/schemas/Address", + "x-scope": [ + "", + "#/components/schemas/Customer" + ] + } + ] + }, + "balance": { + "description": "Current balance, if any, being stored on the customer.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "created_at": { + "description": "Time at which the object was created.", + "type": "string", + "format": "date-time" + }, + "currency": { + "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency", + "x-scope": [ + "", + "#/components/schemas/Customer" + ] + } + ] + }, + "delinquent": { + "description": "When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.\n\nWhen the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.", + "default": false, + "type": "boolean" + }, + "email": { + "description": "The customer's email address.", + "type": "string", + "format": "email" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "description": "Set of key-value pairs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "The customer's full name or business name.", + "type": "string" + }, + "phone": { + "description": "The customer's phone number.", + "default": "", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/Customer" + ] + } + ] + } + }, + "required": [ + "created_at", + "currency" + ] + }, + "DeviceAccessTokenRequestForm": { + "description": "The form for a device access token request.", + "type": "object", + "properties": { + "client_id": { + "description": "The client ID.", + "type": "string", + "format": "uuid" + }, + "device_code": { + "description": "The device code.", + "type": "string", + "format": "uuid" + }, + "grant_type": { + "description": "The grant type.", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2GrantType", + "x-scope": [ + "", + "#/components/schemas/DeviceAccessTokenRequestForm" + ] + } + ] + } + }, + "required": [ + "client_id", + "device_code", + "grant_type" + ] + }, + "DeviceAuthRequestForm": { + "description": "The request parameters for the OAuth 2.0 Device Authorization Grant flow.", + "type": "object", + "properties": { + "client_id": { + "description": "The client ID.", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "client_id" + ] + }, + "DeviceAuthVerifyParams": { + "description": "The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.", + "type": "object", + "properties": { + "user_code": { + "description": "The user code.", + "type": "string" + } + }, + "required": [ + "user_code" + ] + }, + "DockerSystemInfo": { + "description": "Docker system info.", + "type": "object", + "properties": { + "architecture": { + "nullable": true, + "description": "Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", + "type": "string" + }, + "bridge_nf_ip6tables": { + "nullable": true, + "description": "Indicates if `bridge-nf-call-ip6tables` is available on the host.", + "type": "boolean" + }, + "bridge_nf_iptables": { + "nullable": true, + "description": "Indicates if `bridge-nf-call-iptables` is available on the host.", + "type": "boolean" + }, + "cgroup_driver": { + "nullable": true, + "description": "The driver to use for managing cgroups.", + "allOf": [ + { + "$ref": "#/components/schemas/SystemInfoCgroupDriverEnum", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "cgroup_version": { + "nullable": true, + "description": "The version of the cgroup.", + "allOf": [ + { + "$ref": "#/components/schemas/SystemInfoCgroupVersionEnum", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "cluster_advertise": { + "nullable": true, + "description": "The network endpoint that the Engine advertises for the purpose of node discovery. ClusterAdvertise is a `host:port` combination on which the daemon is reachable by other hosts.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", + "type": "string" + }, + "cluster_store": { + "nullable": true, + "description": "URL of the distributed storage backend. The storage backend is used for multihost networking (to store network and endpoint information) and by the node discovery mechanism.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", + "type": "string" + }, + "containerd_commit": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Commit", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "containers": { + "nullable": true, + "description": "Total number of containers on the host.", + "type": "integer", + "format": "int64" + }, + "containers_paused": { + "nullable": true, + "description": "Number of containers with status `\\\"paused\\\"`.", + "type": "integer", + "format": "int64" + }, + "containers_running": { + "nullable": true, + "description": "Number of containers with status `\\\"running\\\"`.", + "type": "integer", + "format": "int64" + }, + "containers_stopped": { + "nullable": true, + "description": "Number of containers with status `\\\"stopped\\\"`.", + "type": "integer", + "format": "int64" + }, + "cpu_cfs_period": { + "nullable": true, + "description": "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host.", + "type": "boolean" + }, + "cpu_cfs_quota": { + "nullable": true, + "description": "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host.", + "type": "boolean" + }, + "cpu_set": { + "nullable": true, + "description": "Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)", + "type": "boolean" + }, + "cpu_shares": { + "nullable": true, + "description": "Indicates if CPU Shares limiting is supported by the host.", + "type": "boolean" + }, + "debug": { + "nullable": true, + "description": "Indicates if the daemon is running in debug-mode / with debug-level logging enabled.", + "type": "boolean" + }, + "default_address_pools": { + "description": "List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \\\"10.10.0.0/16\\\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemInfoDefaultAddressPools", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + }, + "default_runtime": { + "nullable": true, + "description": "Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time.", + "type": "string" + }, + "docker_root_dir": { + "nullable": true, + "description": "Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\\\ProgramData\\\\docker` on Windows.", + "type": "string" + }, + "driver": { + "nullable": true, + "description": "Name of the storage driver in use.", + "type": "string" + }, + "driver_status": { + "description": "Information specific to the storage driver, provided as \\\"label\\\" / \\\"value\\\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line.\n\n**Note**: The information returned in this field, including the formatting of values and labels, should not be considered stable, and may change without notice.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "experimental_build": { + "nullable": true, + "description": "Indicates if experimental features are enabled on the daemon.", + "type": "boolean" + }, + "http_proxy": { + "nullable": true, + "description": "HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", + "type": "string" + }, + "https_proxy": { + "nullable": true, + "description": "HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", + "type": "string" + }, + "id": { + "nullable": true, + "description": "Unique identifier of the daemon.\n\n**Note**: The format of the ID itself is not part of the API, and should not be considered stable.", + "type": "string" + }, + "images": { + "nullable": true, + "description": "Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted.", + "type": "integer", + "format": "int64" + }, + "index_server_address": { + "nullable": true, + "description": "Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud.", + "type": "string" + }, + "init_binary": { + "nullable": true, + "description": "Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", + "type": "string" + }, + "init_commit": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Commit", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "ipv4_forwarding": { + "nullable": true, + "description": "Indicates IPv4 forwarding is enabled.", + "type": "boolean" + }, + "isolation": { + "nullable": true, + "description": "Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms.", + "allOf": [ + { + "$ref": "#/components/schemas/SystemInfoIsolationEnum", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "kernel_memory": { + "nullable": true, + "description": "Indicates if the host has kernel memory limit support enabled.\n\n**Deprecated**: This field is deprecated as the kernel 5.4 deprecated `kmem.limit_in_bytes`.", + "type": "boolean" + }, + "kernel_memory_tcp": { + "nullable": true, + "description": "Indicates if the host has kernel memory TCP limit support enabled. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.", + "type": "boolean" + }, + "kernel_version": { + "nullable": true, + "description": "Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the HKEY_LOCAL_MACHINE\\\\\\\\SOFTWARE\\\\\\\\Microsoft\\\\\\\\Windows NT\\\\\\\\CurrentVersion\\\\\\\\ registry value, for example _\\\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\\\"_.", + "type": "string" + }, + "labels": { + "description": "User-defined labels (key/value metadata) as set on the daemon.\n\n**Note**: When part of a Swarm, nodes can both have _daemon_ labels, set through the daemon configuration, and _node_ labels, set from a manager node in the Swarm. Node labels are not included in this field. Node labels can be retrieved using the `/nodes/(id)` endpoint on a manager node in the Swarm.", + "type": "array", + "items": { + "type": "string" + } + }, + "live_restore_enabled": { + "nullable": true, + "description": "Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected.", + "type": "boolean" + }, + "logging_driver": { + "nullable": true, + "description": "The logging driver to use as a default for new containers.", + "type": "string" + }, + "mem_total": { + "nullable": true, + "description": "Total amount of physical memory available on the host, in bytes.", + "type": "integer", + "format": "int64" + }, + "memory_limit": { + "nullable": true, + "description": "Indicates if the host has memory limit support enabled.", + "type": "boolean" + }, + "n_events_listener": { + "nullable": true, + "description": "Number of event listeners subscribed.", + "type": "integer", + "format": "int64" + }, + "n_fd": { + "nullable": true, + "description": "The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled.", + "type": "integer", + "format": "int64" + }, + "name": { + "nullable": true, + "description": "Hostname of the host.", + "type": "string" + }, + "ncpu": { + "nullable": true, + "description": "The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected.", + "type": "integer", + "format": "int64" + }, + "no_proxy": { + "nullable": true, + "description": "Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration.", + "type": "string" + }, + "oom_kill_disable": { + "nullable": true, + "description": "Indicates if OOM killer disable is supported on the host.", + "type": "boolean" + }, + "operating_system": { + "nullable": true, + "description": "Name of the host's operating system, for example: \\\"Ubuntu 16.04.2 LTS\\\" or \\\"Windows Server 2016 Datacenter\\\"", + "type": "string" + }, + "os_type": { + "nullable": true, + "description": "Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \\\"linux\\\" and \\\"windows\\\". A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", + "type": "string" + }, + "os_version": { + "nullable": true, + "description": "Version of the host's operating system\n\n**Note**: The information returned in this field, including its very existence, and the formatting of values, should not be considered stable, and may change without notice.", + "type": "string" + }, + "pids_limit": { + "nullable": true, + "description": "Indicates if the host kernel has PID limit support enabled.", + "type": "boolean" + }, + "plugins": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/PluginsInfo", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "product_license": { + "nullable": true, + "description": "Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included.", + "type": "string" + }, + "registry_config": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/RegistryServiceConfig", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "runc_commit": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Commit", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + ] + }, + "runtimes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Runtime", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo" + ] + } + }, + "security_options": { + "description": "List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs.", + "type": "array", + "items": { + "type": "string" + } + }, + "server_version": { + "nullable": true, + "description": "Version string of the daemon. **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) returns the Swarm version instead of the daemon version, for example `swarm/1.2.8`.", + "type": "string" + }, + "swap_limit": { + "nullable": true, + "description": "Indicates if the host has memory swap limit support enabled.", + "type": "boolean" + }, + "system_time": { + "nullable": true, + "description": "The number of goroutines that currently exist. This information is only returned if debug-mode is enabled.", + "type": "string" + }, + "warnings": { + "description": "List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Duration": { + "title": "int64", + "type": "integer", + "format": "duration" + }, + "EmailAuthenticationForm": { + "description": "The body of the form for email authentication.", + "type": "object", + "properties": { + "callback_url": { + "nullable": true, + "description": "The URL to redirect back to after we have authenticated.", + "type": "string", + "format": "uri" + }, + "email": { + "description": "The user's email.", + "type": "string", + "format": "email" + } + }, + "required": [ + "email" + ] + }, + "Empty": { + "description": "An \"empty\" type used to represent responses that have no associated data payload. This isn't intended for general use, but must be pub since it's used as the Body type for certain responses.", + "type": "string", + "enum": [ + null + ] + }, + "EngineMetadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "type": "object", + "properties": { + "async_jobs_running": { + "description": "If any async job is currently running.", + "type": "boolean" + }, + "cache": { + "description": "Metadata about our cache.", + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ] + }, + "environment": { + "description": "The environment we are running in.", + "allOf": [ + { + "$ref": "#/components/schemas/Environment", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ] + }, + "fs": { + "description": "Metadata about our file system.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ] + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "description": "Metadata about our pub-sub connection.", + "allOf": [ + { + "$ref": "#/components/schemas/Connection", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/EngineMetadata" + ] + } + ] + } + }, + "required": [ + "async_jobs_running", + "cache", + "environment", + "fs", + "git_hash", + "pubsub" + ] + }, + "Environment": { + "description": "The environment the server is running in.", + "type": "string", + "enum": [ + "DEVELOPMENT", + "PREVIEW", + "PRODUCTION" + ] + }, + "Error": { + "description": "Error information from a response.", + "type": "object", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ] + }, + "ExecutorMetadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "type": "object", + "properties": { + "docker_info": { + "description": "Information about the docker daemon.", + "allOf": [ + { + "$ref": "#/components/schemas/DockerSystemInfo", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata" + ] + } + ] + }, + "environment": { + "description": "The environment we are running in.", + "allOf": [ + { + "$ref": "#/components/schemas/Environment", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata" + ] + } + ] + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + } + }, + "required": [ + "docker_info", + "environment", + "git_hash" + ] + }, + "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.", + "type": "object", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "type": "string", + "format": "partial-date-time" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string", + "format": "email" + }, + "email_verified": { + "nullable": true, + "description": "The date and time the email address was verified.", + "type": "string", + "format": "partial-date-time" + }, + "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": { + "nullable": true, + "description": "The user's MailChimp ID. This is mostly used for internal mapping.", + "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.", + "default": "", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/ExtendedUser" + ] + } + ] + }, + "stripe_id": { + "nullable": true, + "description": "The user's Stripe ID. This is mostly used for internal mapping.", + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "zendesk_id": { + "nullable": true, + "description": "The user's Zendesk ID. This is mostly used for internal mapping.", + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ] + }, + "ExtendedUserResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedUser", + "x-scope": [ + "", + "#/components/schemas/ExtendedUserResultsPage" + ] + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, + "FileConversion": { + "description": "A file conversion.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the file conversion was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/FileConversion" + ] + } + ] + }, + "output": { + "nullable": true, + "description": "The converted file, if completed, base64 encoded.", + "allOf": [ + { + "$ref": "#/components/schemas/Base64Data", + "x-scope": [ + "", + "#/components/schemas/FileConversion" + ] + } + ] + }, + "output_format": { + "description": "The output format of the file conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/FileOutputFormat", + "x-scope": [ + "", + "#/components/schemas/FileConversion" + ] + } + ] + }, + "src_format": { + "description": "The source format of the file conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/FileConversion" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the file conversion was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the file conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/FileConversion" + ] + } + ] + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "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" + ] + }, + "FileDensity": { + "description": "A file density result.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the density was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the density was created.", + "type": "string", + "format": "partial-date-time" + }, + "density": { + "nullable": true, + "description": "The resulting density.", + "type": "number", + "format": "double" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the density request.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/FileDensity" + ] + } + ] + }, + "material_mass": { + "description": "The material mass as denoted by the user.", + "default": 0, + "type": "number", + "format": "float" + }, + "src_format": { + "description": "The source format of the file.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/FileDensity" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the density was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the density.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/FileDensity" + ] + } + ] + }, + "updated_at": { + "description": "The time and date the density was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the density.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ] + }, + "FileMass": { + "description": "A file mass result.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the mass was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the mass was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the mass request.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/FileMass" + ] + } + ] + }, + "mass": { + "nullable": true, + "description": "The resulting mass.", + "type": "number", + "format": "double" + }, + "material_density": { + "description": "The material density as denoted by the user.", + "default": 0, + "type": "number", + "format": "float" + }, + "src_format": { + "description": "The source format of the file.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/FileMass" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the mass was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the mass.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/FileMass" + ] + } + ] + }, + "updated_at": { + "description": "The time and date the mass was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the mass.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ] + }, + "FileOutputFormat": { + "description": "The valid types of output file formats.", + "type": "string", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx", + "fbxb" + ] + }, + "FileSourceFormat": { + "description": "The valid types of source file formats.", + "type": "string", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx" + ] + }, + "FileSystemMetadata": { + "description": "Metadata about our file system.\n\nThis is mostly used for internal purposes and debugging.", + "type": "object", + "properties": { + "ok": { + "description": "If the file system passed a sanity check.", + "type": "boolean" + } + }, + "required": [ + "ok" + ] + }, + "FileVolume": { + "description": "A file volume result.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the volume was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the volume was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the volume request.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/FileVolume" + ] + } + ] + }, + "src_format": { + "description": "The source format of the file.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSourceFormat", + "x-scope": [ + "", + "#/components/schemas/FileVolume" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the volume was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the volume.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/FileVolume" + ] + } + ] + }, + "updated_at": { + "description": "The time and date the volume was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the volume.", + "type": "string" + }, + "volume": { + "nullable": true, + "description": "The resulting volume.", + "type": "number", + "format": "double" + } + }, + "required": [ + "created_at", + "id", + "src_format", + "status", + "updated_at" + ] + }, + "Gateway": { + "description": "Gateway information.", + "type": "object", + "properties": { + "auth_timeout": { + "description": "The auth timeout of the gateway.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "host": { + "description": "The host of the gateway.", + "default": "", + "type": "string" + }, + "name": { + "description": "The name of the gateway.", + "default": "", + "type": "string" + }, + "port": { + "description": "The port of the gateway.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "tls_timeout": { + "description": "The TLS timeout for the gateway.", + "default": 0, + "type": "integer", + "format": "int64" + } + } + }, + "IndexInfo": { + "description": "IndexInfo contains information about a registry.", + "type": "object", + "properties": { + "mirrors": { + "description": "List of mirrors, expressed as URIs.", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "nullable": true, + "description": "Name of the registry, such as \\\"docker.io\\\".", + "type": "string" + }, + "official": { + "nullable": true, + "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", + "type": "boolean" + }, + "secure": { + "nullable": true, + "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "type": "boolean" + } + } + }, + "Invoice": { + "description": "An invoice.", + "type": "object", + "properties": { + "amount_due": { + "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "amount_paid": { + "description": "The amount, in %s, that was paid.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "amount_remaining": { + "description": "The amount remaining, in %s, that is due.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "attempt_count": { + "description": "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.", + "default": 0, + "type": "integer", + "format": "uint64", + "minimum": 0 + }, + "attempted": { + "description": "Whether an attempt has been made to pay the invoice.\n\nAn invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.", + "default": false, + "type": "boolean" + }, + "created_at": { + "description": "Time at which the object was created.", + "type": "string", + "format": "date-time" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency", + "x-scope": [ + "", + "#/components/schemas/Invoice" + ] + } + ] + }, + "customer_email": { + "description": "The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.", + "type": "string", + "format": "email" + }, + "customer_id": { + "description": "Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.", + "type": "string" + }, + "default_payment_method": { + "description": "Default payment method.", + "type": "string" + }, + "description": { + "description": "Description of the invoice.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "lines": { + "description": "The individual line items that make up the invoice.\n\n`lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InvoiceLineItem", + "x-scope": [ + "", + "#/components/schemas/Invoice" + ] + } + }, + "metadata": { + "description": "Set of key-value pairs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "number": { + "description": "A unique, identifying string that appears on emails sent to the customer for this invoice.", + "type": "string" + }, + "paid": { + "description": "Whether payment was successfully collected for this invoice.\n\nAn invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.", + "default": false, + "type": "boolean" + }, + "pdf": { + "nullable": true, + "description": "The link to download the PDF for the invoice.", + "type": "string", + "format": "uri" + }, + "receipt_number": { + "description": "This is the transaction number that appears on email receipts sent for this invoice.", + "type": "string" + }, + "statement_descriptor": { + "description": "Extra information about an invoice for the customer's credit card statement.", + "type": "string" + }, + "status": { + "nullable": true, + "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.\n\n[Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview).", + "allOf": [ + { + "$ref": "#/components/schemas/InvoiceStatus", + "x-scope": [ + "", + "#/components/schemas/Invoice" + ] + } + ] + }, + "subtotal": { + "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "tax": { + "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "total": { + "description": "Total after discounts and taxes.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "url": { + "nullable": true, + "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "created_at", + "currency" + ] + }, + "InvoiceLineItem": { + "description": "An invoice line item.", + "type": "object", + "properties": { + "amount": { + "description": "The amount, in %s.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.", + "allOf": [ + { + "$ref": "#/components/schemas/Currency", + "x-scope": [ + "", + "#/components/schemas/Invoice", + "#/components/schemas/InvoiceLineItem" + ] + } + ] + }, + "description": { + "description": "The description.", + "type": "string" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "invoice_item": { + "description": "The ID of the invoice item associated with this line item if any.", + "type": "string" + }, + "metadata": { + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.\n\nSet of key-value pairs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "currency" + ] + }, + "InvoiceStatus": { + "description": "An enum representing the possible values of an `Invoice`'s `status` field.", + "type": "string", + "enum": [ + "deleted", + "draft", + "open", + "paid", + "uncollectible", + "void" + ] + }, + "IpAddr": { + "title": "String", + "type": "string", + "format": "ip" + }, + "Jetstream": { + "description": "Jetstream information.", + "type": "object", + "properties": { + "config": { + "description": "The Jetstream config.", + "default": { + "domain": "", + "max_memory": 0, + "max_storage": 0, + "store_dir": "" + }, + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamConfig", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream" + ] + } + ] + }, + "meta": { + "description": "Meta information about the cluster.", + "default": { + "cluster_size": 0, + "leader": "", + "name": "" + }, + "allOf": [ + { + "$ref": "#/components/schemas/MetaClusterInfo", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream" + ] + } + ] + }, + "stats": { + "description": "Jetstream statistics.", + "default": { + "accounts": 0, + "api": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "ha_assets": 0, + "memory": 0, + "reserved_memory": 0, + "reserved_store": 0, + "store": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamStats", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream" + ] + } + ] + } + } + }, + "JetstreamApiStats": { + "description": "Jetstream API statistics.", + "type": "object", + "properties": { + "errors": { + "description": "The number of errors.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "inflight": { + "description": "The number of inflight requests.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "total": { + "description": "The number of requests.", + "default": 0, + "type": "integer", + "format": "int64" + } + } + }, + "JetstreamConfig": { + "description": "Jetstream configuration.", + "type": "object", + "properties": { + "domain": { + "description": "The domain.", + "default": "", + "type": "string" + }, + "max_memory": { + "description": "The max memory.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "max_storage": { + "description": "The max storage.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "store_dir": { + "description": "The store directory.", + "default": "", + "type": "string" + } + } + }, + "JetstreamStats": { + "description": "Jetstream statistics.", + "type": "object", + "properties": { + "accounts": { + "description": "The number of accounts.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "api": { + "description": "API stats.", + "default": { + "errors": 0, + "inflight": 0, + "total": 0 + }, + "allOf": [ + { + "$ref": "#/components/schemas/JetstreamApiStats", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/Connection", + "#/components/schemas/Jetstream", + "#/components/schemas/JetstreamStats" + ] + } + ] + }, + "ha_assets": { + "description": "The number of HA assets.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "memory": { + "description": "The memory used by the Jetstream server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "reserved_memory": { + "description": "The reserved memory for the Jetstream server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "reserved_store": { + "description": "The reserved storage for the Jetstream server.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "store": { + "description": "The storage used by the Jetstream server.", + "default": 0, + "type": "integer", + "format": "int64" + } + } + }, + "LeafNode": { + "description": "Leaf node information.", + "type": "object", + "properties": { + "auth_timeout": { + "description": "The auth timeout of the leaf node.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "host": { + "description": "The host of the leaf node.", + "default": "", + "type": "string" + }, + "port": { + "description": "The port of the leaf node.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "tls_timeout": { + "description": "The TLS timeout for the leaf node.", + "default": 0, + "type": "integer", + "format": "int64" + } + } + }, + "MetaClusterInfo": { + "description": "Jetstream statistics.", + "type": "object", + "properties": { + "cluster_size": { + "description": "The size of the cluster.", + "default": 0, + "type": "integer", + "format": "int64" + }, + "leader": { + "description": "The leader of the cluster.", + "default": "", + "type": "string" + }, + "name": { + "description": "The name of the cluster.", + "default": "", + "type": "string" + } + } + }, + "Metadata": { + "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", + "type": "object", + "properties": { + "cache": { + "description": "Metadata about our cache.", + "allOf": [ + { + "$ref": "#/components/schemas/CacheMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ] + }, + "engine": { + "description": "Metadata about our engine API connection.", + "allOf": [ + { + "$ref": "#/components/schemas/EngineMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ] + }, + "environment": { + "description": "The environment we are running in.", + "allOf": [ + { + "$ref": "#/components/schemas/Environment", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ] + }, + "executor": { + "description": "Metadata about our executor API connection.", + "allOf": [ + { + "$ref": "#/components/schemas/ExecutorMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ] + }, + "fs": { + "description": "Metadata about our file system.", + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemMetadata", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ] + }, + "git_hash": { + "description": "The git hash of the server.", + "type": "string" + }, + "pubsub": { + "description": "Metadata about our pub-sub connection.", + "allOf": [ + { + "$ref": "#/components/schemas/Connection", + "x-scope": [ + "", + "#/components/schemas/Metadata" + ] + } + ] + } + }, + "required": [ + "cache", + "engine", + "environment", + "executor", + "fs", + "git_hash", + "pubsub" + ] + }, + "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.", + "type": "string", + "enum": [ + "OPTIONS", + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "TRACE", + "CONNECT", + "PATCH", + "EXTENSION" + ] + }, + "OAuth2ClientInfo": { + "description": "Information about an OAuth 2.0 client.", + "type": "object", + "properties": { + "csrf_token": { + "description": "Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.", + "type": "string" + }, + "pkce_code_verifier": { + "nullable": true, + "description": "Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters. Each character must be ASCII alphanumeric or one of the characters \"-\" / \".\" / \"_\" / \"~\".", + "type": "string" + }, + "url": { + "description": "The URL for consent.", + "type": "string" + } + } + }, + "OAuth2GrantType": { + "description": "An OAuth 2.0 Grant Type. These are documented here: .", + "type": "string", + "enum": [ + "urn:ietf:params:oauth:grant-type:device_code" + ] + }, + "OutputFile": { + "description": "Output file contents.", + "type": "object", + "properties": { + "contents": { + "nullable": true, + "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", + "type": "string" + }, + "name": { + "description": "The name of the file.", + "default": "", + "type": "string" + } + } + }, + "PaymentIntent": { + "description": "A payment intent response.", + "type": "object", + "properties": { + "client_secret": { + "description": "The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.", + "type": "string" + } + }, + "required": [ + "client_secret" + ] + }, + "PaymentMethod": { + "description": "A payment method.", + "type": "object", + "properties": { + "billing_info": { + "description": "The billing info for the payment method.", + "allOf": [ + { + "$ref": "#/components/schemas/BillingInfo", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod" + ] + } + ] + }, + "card": { + "nullable": true, + "description": "The card, if it is one. For our purposes, this is the only type of payment method that we support.", + "allOf": [ + { + "$ref": "#/components/schemas/CardDetails", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod" + ] + } + ] + }, + "created_at": { + "description": "Time at which the object was created.", + "type": "string", + "format": "date-time" + }, + "id": { + "description": "Unique identifier for the object.", + "type": "string" + }, + "metadata": { + "description": "Set of key-value pairs.", + "default": {}, + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "The type of payment method.", + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethodType", + "x-scope": [ + "", + "#/components/schemas/PaymentMethod" + ] + } + ] + } + }, + "required": [ + "billing_info", + "created_at", + "type" + ] + }, + "PaymentMethodCardChecks": { + "description": "Card checks.", + "type": "object", + "properties": { + "address_line1_check": { + "description": "If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + }, + "address_postal_code_check": { + "description": "If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + }, + "cvc_check": { + "description": "If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.", + "type": "string" + } + } + }, + "PaymentMethodType": { + "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", + "type": "string", + "enum": [ + "card" + ] + }, + "PhoneNumber": { + "title": "String", + "type": "string", + "format": "phone" + }, + "PluginsInfo": { + "description": "Available plugins per type.\n\n**Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \\\"lazily\\\" loaded, and are not returned in this list if there is no resource using the plugin.", + "type": "object", + "properties": { + "authorization": { + "description": "Names of available authorization plugins.", + "type": "array", + "items": { + "type": "string" + } + }, + "log": { + "description": "Names of available logging-drivers, and logging-driver plugins.", + "type": "array", + "items": { + "type": "string" + } + }, + "network": { + "description": "Names of available network-drivers, and network-driver plugins.", + "type": "array", + "items": { + "type": "string" + } + }, + "volume": { + "description": "Names of available volume-drivers, and network-driver plugins.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Pong": { + "description": "The response from the `/ping` endpoint.", + "type": "object", + "properties": { + "message": { + "description": "The pong response.", + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "RegistryServiceConfig": { + "description": "RegistryServiceConfig stores daemon registry services configuration.", + "type": "object", + "properties": { + "allow_nondistributable_artifacts_cid_rs": { + "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", + "type": "array", + "items": { + "type": "string" + } + }, + "allow_nondistributable_artifacts_hostnames": { + "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", + "type": "array", + "items": { + "type": "string" + } + }, + "index_configs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IndexInfo", + "x-scope": [ + "", + "#/components/schemas/Metadata", + "#/components/schemas/ExecutorMetadata", + "#/components/schemas/DockerSystemInfo", + "#/components/schemas/RegistryServiceConfig" + ] + } + }, + "insecure_registry_cid_rs": { + "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", + "type": "array", + "items": { + "type": "string" + } + }, + "mirrors": { + "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Runtime": { + "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", + "type": "object", + "properties": { + "path": { + "nullable": true, + "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", + "type": "string" + }, + "runtime_args": { + "description": "List of command-line arguments to pass to the runtime when invoked.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Session": { + "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "type": "object", + "properties": { + "created_at": { + "description": "The date and time the session was created.", + "type": "string", + "format": "partial-date-time" + }, + "expires": { + "description": "The date and time the session expires.", + "type": "string", + "format": "partial-date-time" + }, + "id": { + "description": "The unique identifier for the session.", + "type": "string" + }, + "session_token": { + "description": "The session token.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/Session" + ] + } + ] + }, + "updated_at": { + "description": "The date and time the session was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user that the session belongs to.", + "type": "string" + } + }, + "required": [ + "created_at", + "expires", + "session_token", + "updated_at" + ] + }, + "StatusCode": { + "title": "int32", + "type": "integer", + "format": "int32" + }, + "SystemInfoCgroupDriverEnum": { + "type": "string", + "enum": [ + "", + "cgroupfs", + "systemd", + "none" + ] + }, + "SystemInfoCgroupVersionEnum": { + "type": "string", + "enum": [ + "", + "1", + "2" + ] + }, + "SystemInfoDefaultAddressPools": { + "type": "object", + "properties": { + "base": { + "nullable": true, + "description": "The network address in CIDR format", + "type": "string" + }, + "size": { + "nullable": true, + "description": "The network pool size", + "type": "integer", + "format": "int64" + } + } + }, + "SystemInfoIsolationEnum": { + "type": "string", + "enum": [ + "", + "default", + "hyperv", + "process" + ] + }, + "UnitConversion": { + "description": "A unit conversion.", + "type": "object", + "properties": { + "completed_at": { + "nullable": true, + "description": "The time and date the unit conversion was completed.", + "type": "string", + "format": "partial-date-time" + }, + "created_at": { + "description": "The time and date the unit conversion was created.", + "type": "string", + "format": "partial-date-time" + }, + "error": { + "nullable": true, + "description": "The error the function returned, if any.", + "type": "string" + }, + "id": { + "description": "The unique identifier of the unit conversion.\n\nThis is the same as the API call ID.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid", + "x-scope": [ + "", + "#/components/schemas/UnitConversion" + ] + } + ] + }, + "input": { + "description": "The input value.", + "default": 0, + "type": "number", + "format": "float" + }, + "output": { + "nullable": true, + "description": "The resulting value.", + "type": "number", + "format": "double" + }, + "output_format": { + "description": "The output format of the unit conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricFormat", + "x-scope": [ + "", + "#/components/schemas/UnitConversion" + ] + } + ] + }, + "src_format": { + "description": "The source format of the unit conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/UnitMetricFormat", + "x-scope": [ + "", + "#/components/schemas/UnitConversion" + ] + } + ] + }, + "started_at": { + "nullable": true, + "description": "The time and date the unit conversion was started.", + "type": "string", + "format": "partial-date-time" + }, + "status": { + "description": "The status of the unit conversion.", + "allOf": [ + { + "$ref": "#/components/schemas/ApiCallStatus", + "x-scope": [ + "", + "#/components/schemas/UnitConversion" + ] + } + ] + }, + "updated_at": { + "description": "The time and date the unit conversion was last updated.", + "type": "string", + "format": "partial-date-time" + }, + "user_id": { + "description": "The user ID of the user who created the unit conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ] + }, + "UnitMetricFormat": { + "description": "The valid types of metric unit formats.", + "type": "string", + "enum": [ + "atto", + "femto", + "pico", + "nano", + "micro", + "milli", + "centi", + "deci", + "metric_unit", + "deca", + "hecto", + "kilo", + "mega", + "giga", + "tera", + "peta", + "exa" + ] + }, + "UpdateUser": { + "description": "The user-modifiable parts of a User.", + "type": "object", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "phone": { + "description": "The user's phone number.", + "default": "", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/UpdateUser" + ] + } + ] + } + } + }, + "User": { + "description": "A user.", + "type": "object", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "type": "string", + "format": "partial-date-time" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string", + "format": "email" + }, + "email_verified": { + "nullable": true, + "description": "The date and time the email address was verified.", + "type": "string", + "format": "partial-date-time" + }, + "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.", + "default": "", + "allOf": [ + { + "$ref": "#/components/schemas/PhoneNumber", + "x-scope": [ + "", + "#/components/schemas/User" + ] + } + ] + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "type": "string", + "format": "partial-date-time" + } + }, + "required": [ + "created_at", + "updated_at" + ] + }, + "UserResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/User", + "x-scope": [ + "", + "#/components/schemas/UserResultsPage" + ] + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, + "Uuid": { + "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", + "type": "string", + "format": "uuid" + } + } }, - { - "name": "beta", - "description": "Beta API endpoints. We will not charge for these endpoints while they are in beta.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/beta" - } - }, - { - "name": "file", - "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": "hidden", - "description": "Hidden API endpoints that should not show up in the docs.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/hidden" - } - }, - { - "name": "meta", - "description": "Meta information about the API.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/meta" - } - }, - { - "name": "oauth2", - "description": "Endpoints that implement OAuth 2.0 grant flows.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/oauth2" - } - }, - { - "name": "payments", - "description": "Operations around payments and billing.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/payments" - } - }, - { - "name": "sessions", - "description": "Sessions allow users to call the API from their session cookie in the browser.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/sessions" - } - }, - { - "name": "unit", - "description": "Unit conversion operations.", - "externalDocs": { - "url": "https://docs.kittycad.io/api/file" - } - }, - { - "name": "users", - "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" - } - } - ] + "tags": [ + { + "name": "api-calls", + "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-tokens", + "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": "beta", + "description": "Beta API endpoints. We will not charge for these endpoints while they are in beta.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/beta" + } + }, + { + "name": "file", + "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": "hidden", + "description": "Hidden API endpoints that should not show up in the docs.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/hidden" + } + }, + { + "name": "meta", + "description": "Meta information about the API.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/meta" + } + }, + { + "name": "oauth2", + "description": "Endpoints that implement OAuth 2.0 grant flows.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/oauth2" + } + }, + { + "name": "payments", + "description": "Operations around payments and billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/payments" + } + }, + { + "name": "sessions", + "description": "Sessions allow users to call the API from their session cookie in the browser.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/sessions" + } + }, + { + "name": "unit", + "description": "Unit conversion operations.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/file" + } + }, + { + "name": "users", + "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" + } + } + ] } \ No newline at end of file