diff --git a/kittycad/api/hidden/listen_auth_email.py b/kittycad/api/hidden/listen_auth_email.py index 17844c6fe..e0d56d667 100644 --- a/kittycad/api/hidden/listen_auth_email.py +++ b/kittycad/api/hidden/listen_auth_email.py @@ -3,6 +3,7 @@ from typing import Any, Dict, Optional, Union, cast import httpx from ...client import Client +from ...models.verification_token import VerificationToken from ...models.error import Error from ...models.email_authentication_form import EmailAuthenticationForm from ...types import Response @@ -26,10 +27,10 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]: - if response.status_code == 204: - response_204 = None - return response_204 +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, VerificationToken, Error]]: + if response.status_code == 201: + response_201 = VerificationToken.from_dict(response.json()) + return response_201 if response.status_code == 400: response_4XX = Error.from_dict(response.json()) return response_4XX @@ -39,7 +40,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]: return None -def _build_response(*, response: httpx.Response) -> Response[Union[Any, Error]]: +def _build_response(*, response: httpx.Response) -> Response[Union[Any, VerificationToken, Error]]: return Response( status_code=response.status_code, content=response.content, @@ -52,7 +53,7 @@ def sync_detailed( body: EmailAuthenticationForm, *, client: Client, -) -> Response[Union[Any, Error]]: +) -> Response[Union[Any, VerificationToken, Error]]: kwargs = _get_kwargs( body=body, client=client, @@ -70,7 +71,7 @@ def sync( body: EmailAuthenticationForm, *, client: Client, -) -> Optional[Union[Any, Error]]: +) -> Optional[Union[Any, VerificationToken, Error]]: return sync_detailed( body=body, @@ -82,7 +83,7 @@ async def asyncio_detailed( body: EmailAuthenticationForm, *, client: Client, -) -> Response[Union[Any, Error]]: +) -> Response[Union[Any, VerificationToken, Error]]: kwargs = _get_kwargs( body=body, client=client, @@ -98,7 +99,7 @@ async def asyncio( body: EmailAuthenticationForm, *, client: Client, -) -> Optional[Union[Any, Error]]: +) -> Optional[Union[Any, VerificationToken, Error]]: return ( await asyncio_detailed( diff --git a/kittycad/api/users/delete_user_self.py b/kittycad/api/users/delete_user_self.py new file mode 100644 index 000000000..be55f544f --- /dev/null +++ b/kittycad/api/users/delete_user_self.py @@ -0,0 +1,101 @@ +from typing import Any, Dict, Optional, Union, cast + +import httpx + +from ...client import Client +from ...models.error import Error +from ...types import Response + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/user".format(client.base_url) + + headers: Dict[str, Any] = client.get_headers() + cookies: Dict[str, Any] = client.get_cookies() + + return { + "url": url, + "headers": headers, + "cookies": cookies, + "timeout": client.get_timeout(), + } + + +def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, 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( + *, + client: Client, +) -> Response[Union[Any, Error]]: + kwargs = _get_kwargs( + client=client, + ) + + response = httpx.delete( + verify=client.verify_ssl, + **kwargs, + ) + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[Union[Any, Error]]: + """ This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. +This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: Client, +) -> Response[Union[Any, Error]]: + kwargs = _get_kwargs( + client=client, + ) + + async with httpx.AsyncClient(verify=client.verify_ssl) as _client: + response = await _client.delete(**kwargs) + + return _build_response(response=response) + + +async def asyncio( + *, + client: Client, +) -> Optional[Union[Any, Error]]: + """ This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. +This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 90ac2cf9f..94536fb15 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -12,7 +12,6 @@ from .api_token_results_page import ApiTokenResultsPage 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 @@ -28,7 +27,6 @@ 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 .engine_metadata import EngineMetadata from .environment import Environment @@ -48,7 +46,6 @@ 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 @@ -64,13 +61,11 @@ 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 @@ -81,3 +76,4 @@ from .update_user import UpdateUser from .user import User from .user_results_page import UserResultsPage from .uuid import Uuid +from .verification_token import VerificationToken diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index f5a040bbc..bad7c2e9e 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -4,11 +4,8 @@ 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 T = TypeVar("T", bound="ApiCallWithPrice") @@ -19,11 +16,11 @@ class ApiCallWithPrice: """ """ completed_at: Union[Unset, datetime.datetime] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET - duration: Union[Unset, Duration] = UNSET + duration: Union[Unset, int] = UNSET email: Union[Unset, str] = UNSET endpoint: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET - ip_address: Union[Unset, IpAddr] = UNSET + ip_address: Union[Unset, str] = UNSET method: Union[Unset, Method] = UNSET minutes: Union[Unset, int] = UNSET origin: Union[Unset, str] = UNSET @@ -32,7 +29,7 @@ class ApiCallWithPrice: request_query_params: Union[Unset, str] = UNSET response_body: Union[Unset, str] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET - status_code: Union[Unset, StatusCode] = UNSET + status_code: Union[Unset, int] = UNSET stripe_invoice_item_id: Union[Unset, str] = UNSET token: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET @@ -48,15 +45,11 @@ class ApiCallWithPrice: created_at: Union[Unset, str] = UNSET if not isinstance(self.created_at, Unset): created_at = self.created_at.isoformat() - duration: Union[Unset, str] = UNSET - if not isinstance(self.duration, Unset): - duration = self.duration.value + duration = self.duration email = self.email endpoint = self.endpoint id = self.id - ip_address: Union[Unset, str] = UNSET - if not isinstance(self.ip_address, Unset): - ip_address = self.ip_address.value + ip_address = self.ip_address method: Union[Unset, str] = UNSET if not isinstance(self.method, Unset): method = self.method.value @@ -69,9 +62,7 @@ class ApiCallWithPrice: started_at: Union[Unset, str] = UNSET if not isinstance(self.started_at, Unset): started_at = self.started_at.isoformat() - status_code: Union[Unset, str] = UNSET - if not isinstance(self.status_code, Unset): - status_code = self.status_code.value + status_code = self.status_code stripe_invoice_item_id = self.stripe_invoice_item_id token = self.token updated_at: Union[Unset, str] = UNSET @@ -145,12 +136,7 @@ class ApiCallWithPrice: else: created_at = isoparse(_created_at) - _duration = d.pop("duration", UNSET) - duration: Union[Unset, Duration] - if isinstance(_duration, Unset): - duration = UNSET - else: - duration = Duration(_duration) + duration = d.pop("duration", UNSET) email = d.pop("email", UNSET) @@ -158,12 +144,7 @@ class ApiCallWithPrice: id = d.pop("id", 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) + ip_address = d.pop("ip_address", UNSET) _method = d.pop("method", UNSET) method: Union[Unset, Method] @@ -191,12 +172,7 @@ class ApiCallWithPrice: else: started_at = isoparse(_started_at) - _status_code = d.pop("status_code", UNSET) - status_code: Union[Unset, StatusCode] - if isinstance(_status_code, Unset): - status_code = UNSET - else: - status_code = StatusCode(_status_code) + status_code = d.pop("status_code", UNSET) stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) diff --git a/kittycad/models/base64_data.py b/kittycad/models/base64_data.py deleted file mode 100644 index 4b90230a8..000000000 --- a/kittycad/models/base64_data.py +++ /dev/null @@ -1,4 +0,0 @@ -class Base64Data(str): - - def __str__(self) -> str: - return self diff --git a/kittycad/models/billing_info.py b/kittycad/models/billing_info.py index 6513c2cb7..e11b75768 100644 --- a/kittycad/models/billing_info.py +++ b/kittycad/models/billing_info.py @@ -3,7 +3,6 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr from ..models.address import Address -from ..models.phone_number import PhoneNumber from ..types import UNSET, Unset T = TypeVar("T", bound="BillingInfo") @@ -14,7 +13,7 @@ class BillingInfo: """ """ address: Union[Unset, Address] = UNSET name: Union[Unset, str] = UNSET - phone: Union[Unset, PhoneNumber] = UNSET + phone: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -23,9 +22,7 @@ class BillingInfo: if not isinstance(self.address, Unset): address = self.address.value name = self.name - phone: Union[Unset, str] = UNSET - if not isinstance(self.phone, Unset): - phone = self.phone.value + phone = self.phone field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -51,12 +48,7 @@ class BillingInfo: name = d.pop("name", UNSET) - _phone = d.pop("phone", UNSET) - phone: Union[Unset, PhoneNumber] - if isinstance(_phone, Unset): - phone = UNSET - else: - phone = PhoneNumber(_phone) + phone = d.pop("phone", UNSET) billing_info = cls( address=address, diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index cbfef0099..57f9ad20d 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -6,7 +6,6 @@ from dateutil.parser import isoparse from ..models.address import Address from ..models.currency import Currency -from ..models.phone_number import PhoneNumber from ..types import UNSET, Unset T = TypeVar("T", bound="Customer") @@ -16,7 +15,7 @@ T = TypeVar("T", bound="Customer") class Customer: """ """ address: Union[Unset, Address] = UNSET - balance: Union[Unset, int] = UNSET + balance: Union[Unset, float] = UNSET created_at: Union[Unset, datetime.datetime] = UNSET currency: Union[Unset, Currency] = UNSET delinquent: Union[Unset, bool] = False @@ -24,7 +23,7 @@ class Customer: id: Union[Unset, str] = UNSET metadata: Union[Unset, Any] = UNSET name: Union[Unset, str] = UNSET - phone: Union[Unset, PhoneNumber] = UNSET + phone: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -44,9 +43,7 @@ class Customer: id = self.id metadata = self.metadata name = self.name - phone: Union[Unset, str] = UNSET - if not isinstance(self.phone, Unset): - phone = self.phone.value + phone = self.phone field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -109,12 +106,7 @@ class Customer: metadata = d.pop("metadata", UNSET) name = d.pop("name", UNSET) - _phone = d.pop("phone", UNSET) - phone: Union[Unset, PhoneNumber] - if isinstance(_phone, Unset): - phone = UNSET - else: - phone = PhoneNumber(_phone) + phone = d.pop("phone", UNSET) customer = cls( address=address, diff --git a/kittycad/models/duration.py b/kittycad/models/duration.py deleted file mode 100644 index 6dbf872ac..000000000 --- a/kittycad/models/duration.py +++ /dev/null @@ -1,4 +0,0 @@ -class Duration(int): - - def __int__(self) -> int: - return self diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index 045bd2ab0..100ffd01b 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -4,7 +4,6 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr from dateutil.parser import isoparse -from ..models.phone_number import PhoneNumber from ..types import UNSET, Unset T = TypeVar("T", bound="ExtendedUser") @@ -25,7 +24,7 @@ class ExtendedUser: last_name: Union[Unset, str] = UNSET mailchimp_id: Union[Unset, str] = UNSET name: Union[Unset, str] = UNSET - phone: Union[Unset, PhoneNumber] = UNSET + phone: Union[Unset, str] = UNSET stripe_id: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET zendesk_id: Union[Unset, str] = UNSET @@ -49,9 +48,7 @@ class ExtendedUser: last_name = self.last_name mailchimp_id = self.mailchimp_id name = self.name - phone: Union[Unset, str] = UNSET - if not isinstance(self.phone, Unset): - phone = self.phone.value + phone = self.phone stripe_id = self.stripe_id updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): @@ -133,12 +130,7 @@ class ExtendedUser: name = d.pop("name", UNSET) - _phone = d.pop("phone", UNSET) - phone: Union[Unset, PhoneNumber] - if isinstance(_phone, Unset): - phone = UNSET - else: - phone = PhoneNumber(_phone) + phone = d.pop("phone", UNSET) stripe_id = d.pop("stripe_id", UNSET) diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index f13733eb8..516ac01c9 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -5,7 +5,6 @@ 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 @@ -21,7 +20,7 @@ class FileConversion: created_at: Union[Unset, datetime.datetime] = UNSET error: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET - output: Union[Unset, Base64Data] = UNSET + output: Union[Unset, str] = UNSET output_format: Union[Unset, FileOutputFormat] = UNSET src_format: Union[Unset, FileSourceFormat] = UNSET started_at: Union[Unset, datetime.datetime] = UNSET @@ -40,9 +39,7 @@ class FileConversion: created_at = self.created_at.isoformat() error = self.error id = self.id - output: Union[Unset, str] = UNSET - if not isinstance(self.output, Unset): - output = self.output.value + output = self.output output_format: Union[Unset, str] = UNSET if not isinstance(self.output_format, Unset): output_format = self.output_format.value @@ -109,12 +106,7 @@ class FileConversion: id = d.pop("id", UNSET) - _output = d.pop("output", UNSET) - output: Union[Unset, Base64Data] - if isinstance(_output, Unset): - output = UNSET - else: - output = Base64Data(_output) + output = d.pop("output", UNSET) _output_format = d.pop("output_format", UNSET) output_format: Union[Unset, FileOutputFormat] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index 5634ca9d5..4fa544917 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -14,9 +14,9 @@ T = TypeVar("T", bound="Invoice") @attr.s(auto_attribs=True) class Invoice: """ """ - amount_due: Union[Unset, int] = UNSET - amount_paid: Union[Unset, int] = UNSET - amount_remaining: Union[Unset, int] = UNSET + amount_due: Union[Unset, float] = UNSET + amount_paid: Union[Unset, float] = UNSET + amount_remaining: Union[Unset, float] = UNSET attempt_count: Union[Unset, int] = UNSET attempted: Union[Unset, bool] = False created_at: Union[Unset, datetime.datetime] = UNSET @@ -35,9 +35,9 @@ class Invoice: 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 + subtotal: Union[Unset, float] = UNSET + tax: Union[Unset, float] = UNSET + total: Union[Unset, float] = UNSET url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index 8347d58ad..5db720eb1 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -11,7 +11,7 @@ T = TypeVar("T", bound="InvoiceLineItem") @attr.s(auto_attribs=True) class InvoiceLineItem: """ """ - amount: Union[Unset, int] = UNSET + amount: Union[Unset, float] = UNSET currency: Union[Unset, Currency] = UNSET description: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET diff --git a/kittycad/models/ip_addr.py b/kittycad/models/ip_addr.py deleted file mode 100644 index 21161a859..000000000 --- a/kittycad/models/ip_addr.py +++ /dev/null @@ -1,4 +0,0 @@ -class IpAddr(str): - - def __str__(self) -> str: - return self diff --git a/kittycad/models/phone_number.py b/kittycad/models/phone_number.py deleted file mode 100644 index 4b4e8fd5a..000000000 --- a/kittycad/models/phone_number.py +++ /dev/null @@ -1,4 +0,0 @@ -class PhoneNumber(str): - - def __str__(self) -> str: - return self diff --git a/kittycad/models/status_code.py b/kittycad/models/status_code.py deleted file mode 100644 index e442fce76..000000000 --- a/kittycad/models/status_code.py +++ /dev/null @@ -1,4 +0,0 @@ -class StatusCode(int): - - def __int__(self) -> int: - return self diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index 83dedac85..9d0d95b93 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -2,7 +2,6 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr -from ..models.phone_number import PhoneNumber from ..types import UNSET, Unset T = TypeVar("T", bound="UpdateUser") @@ -16,7 +15,7 @@ class UpdateUser: first_name: Union[Unset, str] = UNSET github: Union[Unset, str] = UNSET last_name: Union[Unset, str] = UNSET - phone: Union[Unset, PhoneNumber] = UNSET + phone: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -26,9 +25,7 @@ class UpdateUser: first_name = self.first_name github = self.github last_name = self.last_name - phone: Union[Unset, str] = UNSET - if not isinstance(self.phone, Unset): - phone = self.phone.value + phone = self.phone field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -61,12 +58,7 @@ class UpdateUser: last_name = d.pop("last_name", UNSET) - _phone = d.pop("phone", UNSET) - phone: Union[Unset, PhoneNumber] - if isinstance(_phone, Unset): - phone = UNSET - else: - phone = PhoneNumber(_phone) + phone = d.pop("phone", UNSET) update_user = cls( company=company, diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 9d217baca..e44363c61 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -4,7 +4,6 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr from dateutil.parser import isoparse -from ..models.phone_number import PhoneNumber from ..types import UNSET, Unset T = TypeVar("T", bound="User") @@ -24,7 +23,7 @@ class User: image: Union[Unset, str] = UNSET last_name: Union[Unset, str] = UNSET name: Union[Unset, str] = UNSET - phone: Union[Unset, PhoneNumber] = UNSET + phone: Union[Unset, str] = UNSET updated_at: Union[Unset, datetime.datetime] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -45,9 +44,7 @@ class User: image = self.image last_name = self.last_name name = self.name - phone: Union[Unset, str] = UNSET - if not isinstance(self.phone, Unset): - phone = self.phone.value + phone = self.phone updated_at: Union[Unset, str] = UNSET if not isinstance(self.updated_at, Unset): updated_at = self.updated_at.isoformat() @@ -119,12 +116,7 @@ class User: name = d.pop("name", UNSET) - _phone = d.pop("phone", UNSET) - phone: Union[Unset, PhoneNumber] - if isinstance(_phone, Unset): - phone = UNSET - else: - phone = PhoneNumber(_phone) + phone = d.pop("phone", UNSET) _updated_at = d.pop("updated_at", UNSET) updated_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py new file mode 100644 index 000000000..4cd850780 --- /dev/null +++ b/kittycad/models/verification_token.py @@ -0,0 +1,105 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union, cast + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="VerificationToken") + + +@attr.s(auto_attribs=True) +class VerificationToken: + """ """ + created_at: Union[Unset, datetime.datetime] = UNSET + expires: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + identifier: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + expires: Union[Unset, str] = UNSET + if not isinstance(self.expires, Unset): + expires = self.expires.isoformat() + id = self.id + identifier = self.identifier + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict['created_at'] = created_at + if expires is not UNSET: + field_dict['expires'] = expires + if id is not UNSET: + field_dict['id'] = id + if identifier is not UNSET: + field_dict['identifier'] = identifier + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) + + _expires = d.pop("expires", UNSET) + expires: Union[Unset, datetime.datetime] + if isinstance(_expires, Unset): + expires = UNSET + else: + expires = isoparse(_expires) + + id = d.pop("id", UNSET) + + identifier = d.pop("identifier", UNSET) + + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) + + verification_token = cls( + created_at=created_at, + expires=expires, + id=id, + identifier=identifier, + updated_at=updated_at, + ) + + verification_token.additional_properties = d + return verification_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/spec.json b/spec.json index 22f316e38..cc8ae4d6c 100644 --- a/spec.json +++ b/spec.json @@ -1,8262 +1,9361 @@ { - "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.5\"" - } - }, - "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.5\"" + }, + "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": { - "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/VerificationToken" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "x-go": { - "example": "// ListenAuthEmail: Create an email verification request for a user.\nverificationToken, err := client.Hidden.ListenAuthEmail(body)", - "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*/\nlet verification_token = client.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" - } - } - } - }, - "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*/\nclient.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": { - "204": { - "description": "successful operation, no content", - "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-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*/\nclient.oauth_2().device_auth_confirm(body).await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_confirm" - } - }, - "options": { - "tags": [ - "hidden" - ], - "summary": "OPTIONS endpoint `/oauth2/device/confirm`.", - "description": "This is necessary for some preflight requests, specifically DELETE, PUT, and POST since it has a request body.", - "operationId": "options_device_auth_confirm", - "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" - } - } - } - }, - "/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 `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.", - "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" - } - } - } - }, - "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 `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.\n*\n* **Parameters:**\n*\n* * `user_code: &str` -- The user code.\n*/\nclient.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" - } - } - } - }, - "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*/\nclient.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" - } - }, - "delete": { - "tags": [ - "users" - ], - "summary": "Delete your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\nThis call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.", - "operationId": "delete_user_self", - "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": "// DeleteSelf: Delete your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\n// This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.\nif err := client.User.DeleteSelf(); err != nil {\n\tpanic(err)\n}", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.DeleteSelf" - }, - "x-rust": { - "example": "/**\n* Delete your user.\n*\n* This function performs a `DELETE` to the `/user` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\n* This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.\n*/\nclient.users().delete_self().await?;", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.delete_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, - "title": "int64", - "description": "The duration of the API call.", - "type": "integer", - "format": "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": { - "title": "String", - "description": "The ip address of the origin.", - "default": "", - "type": "string", - "format": "ip" - }, - "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, - "title": "Number", - "description": "The price of the API call.", - "type": "number", - "format": "money-usd" - }, - "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, - "title": "int32", - "description": "The status code returned by the API call.", - "type": "integer", - "format": "int32" - }, - "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, - "title": "String", - "description": "The converted file, if completed, base64 encoded.", - "type": "string", - "format": "byte" - }, - "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" - ] - }, - "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": { - "title": "String", - "description": "The phone for the customer.", - "default": "", - "type": "string", - "format": "phone" - } - } - }, - "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", - "format": "ip" - }, - "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", - "format": "ip" - }, - "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": { + "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/VerificationToken", + "x-scope": [ + "" + ] + } + } + } + }, + "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.\nverificationToken, err := client.Hidden.ListenAuthEmail(body)", + "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*/\nlet verification_token = client.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 VerificationToken\nfrom kittycad.api.hidden import listen_auth_email\nfrom kittycad.types import Response\n\nfc: VerificationToken = listen_auth_email.sync(client=client, body=EmailAuthenticationForm)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[VerificationToken] = listen_auth_email.sync_detailed(client=client, body=EmailAuthenticationForm)\n\n# OR run async\nfc: VerificationToken = await listen_auth_email.asyncio(client=client, body=EmailAuthenticationForm)\n\n# OR run async with more info\nresponse: Response[VerificationToken] = 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" + } + } + } + }, + "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*/\nclient.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 Error\nfrom kittycad.api.hidden import listen_auth_email_callback\nfrom kittycad.types import Response\n\nfc: Error = 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[Error] = listen_auth_email_callback.sync_detailed(client=client, callback_url=\"\", email=\"\", token=)\n\n# OR run async\nfc: Error = await listen_auth_email_callback.asyncio(client=client, callback_url=\"\", email=\"\", token=)\n\n# OR run async with more info\nresponse: Response[Error] = 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" + } + } + }, + "/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": { + "204": { + "description": "successful operation, no content", + "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-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*/\nclient.oauth_2().device_auth_confirm(body).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_confirm" + } }, - "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": { - "title": "Number", - "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": "number", - "format": "money-usd" - }, - "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" + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint `/oauth2/device/confirm`.", + "description": "This is necessary for some preflight requests, specifically DELETE, PUT, and POST since it has a request body.", + "operationId": "options_device_auth_confirm", + "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": [ + "" + ] + } + } } - }, - "name": { - "description": "The customer's full name or business name.", - "type": "string" - }, - "phone": { - "title": "String", - "description": "The customer's phone number.", - "default": "", - "type": "string", - "format": "phone" - } }, - "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" + "/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" + } } - }, - "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" - } + }, + "/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 `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.", + "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" + } + } + } + }, + "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 `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.\n*\n* **Parameters:**\n*\n* * `user_code: &str` -- The user code.\n*/\nclient.oauth_2().device_auth_verify(user_code).await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/oauth_2/struct.Oauth2.html#method.device_auth_verify" + } } - }, - "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" + }, + "/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" + } + } + } + }, + "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*/\nclient.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" + } } - }, - "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" + }, + "/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" + } } - }, - "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" + }, + "/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" + } } - }, - "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" + }, + "/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" + } } - } - } - }, - "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" - ] - }, - "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": { - "title": "String", - "description": "The image avatar for the user. This is a URL.", - "type": "string", - "format": "uri" - }, - "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": { - "title": "String", - "description": "The user's phone number.", - "default": "", - "type": "string", - "format": "phone" - }, - "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", - "image", - "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, - "title": "String", - "description": "The converted file, if completed, base64 encoded.", - "type": "string", - "format": "byte" - }, - "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": { - "title": "Number", - "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": "number", - "format": "money-usd" - }, - "amount_paid": { - "title": "Number", - "description": "The amount, in USD, that was paid.", - "default": "0", - "type": "number", - "format": "money-usd" - }, - "amount_remaining": { - "title": "Number", - "description": "The amount remaining, in USD, that is due.", - "default": "0", - "type": "number", - "format": "money-usd" - }, - "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": { - "title": "Number", - "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": "number", - "format": "money-usd" - }, - "tax": { - "title": "Number", - "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", - "default": "0", - "type": "number", - "format": "money-usd" - }, - "total": { - "title": "Number", - "description": "Total after discounts and taxes.", - "default": "0", - "type": "number", - "format": "money-usd" - }, - "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": { - "title": "Number", - "description": "The amount, in USD.", - "default": "0", - "type": "number", - "format": "money-usd" - }, - "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" - ] - }, - "Jetstream": { - "description": "Jetstream information.", - "type": "object", - "properties": { - "config": { - "description": "The Jetstream config.", - "default": { - "domain": "", - "max_memory": 0, - "max_storage": 0, - "store_dir": "" + "/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/JetstreamConfig" - } - ] - }, - "meta": { - "description": "Meta information about the cluster.", - "default": { - "cluster_size": 0, - "leader": "", - "name": "" + "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/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 + "delete": { + "tags": [ + "users" + ], + "summary": "Delete your user.", + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\nThis call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.", + "operationId": "delete_user_self", + "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": "// DeleteSelf: Delete your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\n// This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.\nif err := client.User.DeleteSelf(); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.DeleteSelf" + }, + "x-rust": { + "example": "/**\n* Delete your user.\n*\n* This function performs a `DELETE` to the `/user` endpoint.\n*\n* This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\n* This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.\n*/\nclient.users().delete_self().await?;", + "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.delete_self" + }, + "x-python": { + "example": "from kittycad.models import Error\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.types import Response\n\nfc: Error = delete_user_self.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Error] = delete_user_self.sync_detailed(client=client)\n\n# OR run async\nfc: Error = await delete_user_self.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Error] = await delete_user_self.asyncio_detailed(client=client)", + "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.users.delete_user_self.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 + "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/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" - } - ] - } + "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" + } + } }, - "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/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" + } + }, + "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" + } + }, + "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": [ - "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/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" + } } - }, - "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" - } + "/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" + } + } + }, + "/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": [ + "" + ] + } + } + } + }, + "/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" + } + } + }, + "/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" + } + } + }, + "/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" + } + } } - }, - "PaymentMethodType": { - "description": "An enum representing the possible values of an `PaymentMethod`'s `type` field.", - "type": "string", - "enum": [ - "card" - ] - }, - "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" + }, + "components": { + "responses": { + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error", + "x-scope": [ + "", + "#/components/responses/Error" + ] + } + } + } } - }, - "log": { - "description": "Names of available logging-drivers, and logging-driver plugins.", - "type": "array", - "items": { - "type": "string" + }, + "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, + "title": "int64", + "description": "The duration of the API call.", + "type": "integer", + "format": "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", + "x-scope": [ + "", + "#/components/schemas/ApiCallWithPriceResultsPage", + "#/components/schemas/ApiCallWithPrice" + ] + } + ] + }, + "ip_address": { + "title": "String", + "description": "The ip address of the origin.", + "default": "", + "type": "string", + "format": "ip" + }, + "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, + "title": "Number", + "description": "The price of the API call.", + "type": "number", + "format": "money-usd" + }, + "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, + "title": "int32", + "description": "The status code returned by the API call.", + "type": "integer", + "format": "int32" + }, + "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, + "title": "String", + "description": "The converted file, if completed, base64 encoded.", + "type": "string", + "format": "byte" + }, + "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" + ] + }, + "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": { + "title": "String", + "description": "The phone for the customer.", + "default": "", + "type": "string", + "format": "phone" + } + } + }, + "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", + "format": "ip" + }, + "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/EngineMetadata", + "#/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/EngineMetadata", + "#/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", + "format": "ip" + }, + "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/EngineMetadata", + "#/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/EngineMetadata", + "#/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": { + "title": "Number", + "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": "number", + "format": "money-usd" + }, + "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": { + "title": "String", + "description": "The customer's phone number.", + "default": "", + "type": "string", + "format": "phone" + } + }, + "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" + } + } + } + }, + "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" + ] + }, + "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": { + "title": "String", + "description": "The image avatar for the user. This is a URL.", + "type": "string", + "format": "uri" + }, + "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": { + "title": "String", + "description": "The user's phone number.", + "default": "", + "type": "string", + "format": "phone" + }, + "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", + "image", + "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, + "title": "String", + "description": "The converted file, if completed, base64 encoded.", + "type": "string", + "format": "byte" + }, + "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": { + "title": "Number", + "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": "number", + "format": "money-usd" + }, + "amount_paid": { + "title": "Number", + "description": "The amount, in USD, that was paid.", + "default": "0", + "type": "number", + "format": "money-usd" + }, + "amount_remaining": { + "title": "Number", + "description": "The amount remaining, in USD, that is due.", + "default": "0", + "type": "number", + "format": "money-usd" + }, + "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": { + "title": "Number", + "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": "number", + "format": "money-usd" + }, + "tax": { + "title": "Number", + "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", + "default": "0", + "type": "number", + "format": "money-usd" + }, + "total": { + "title": "Number", + "description": "Total after discounts and taxes.", + "default": "0", + "type": "number", + "format": "money-usd" + }, + "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": { + "title": "Number", + "description": "The amount, in USD.", + "default": "0", + "type": "number", + "format": "money-usd" + }, + "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" + ] + }, + "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/EngineMetadata", + "#/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/EngineMetadata", + "#/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/EngineMetadata", + "#/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/EngineMetadata", + "#/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" + ] + }, + "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" + ] + }, + "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": { + "title": "String", + "description": "The user's phone number.", + "default": "", + "type": "string", + "format": "phone" + } + } + }, + "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": { + "title": "String", + "description": "The image avatar for the user. This is a URL.", + "type": "string", + "format": "uri" + }, + "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": { + "title": "String", + "description": "The user's phone number.", + "default": "", + "type": "string", + "format": "phone" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "type": "string", + "format": "partial-date-time" + } + }, + "required": [ + "created_at", + "image", + "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" + }, + "VerificationToken": { + "description": "A verification token for a user.\n\nThis is typically used to verify a user's email address.", + "type": "object", + "properties": { + "created_at": { + "description": "The date and time the verification token was created.", + "type": "string", + "format": "partial-date-time" + }, + "expires": { + "description": "The date and time the verification token expires.", + "type": "string", + "format": "partial-date-time" + }, + "id": { + "description": "The token used for verification. This is used as the id for the table since it is unique per record.", + "type": "string" + }, + "identifier": { + "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", + "type": "string" + }, + "updated_at": { + "description": "The date and time the verification token was last updated.", + "type": "string", + "format": "partial-date-time" + } + }, + "required": [ + "created_at", + "expires", + "updated_at" + ] } - }, - "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" - } + }, + "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" + } }, - "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" + { + "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" } - }, - "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" + }, + { + "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" } - }, - "index_configs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IndexInfo" + }, + { + "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" } - }, - "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" + }, + { + "name": "hidden", + "description": "Hidden API endpoints that should not show up in the docs.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/hidden" } - }, - "mirrors": { - "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", - "type": "array", - "items": { - "type": "string" + }, + { + "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" } - } } - }, - "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" - ] - }, - "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": { - "title": "String", - "description": "The user's phone number.", - "default": "", - "type": "string", - "format": "phone" - } - } - }, - "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": { - "title": "String", - "description": "The image avatar for the user. This is a URL.", - "type": "string", - "format": "uri" - }, - "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": { - "title": "String", - "description": "The user's phone number.", - "default": "", - "type": "string", - "format": "phone" - }, - "updated_at": { - "description": "The date and time the user was last updated.", - "type": "string", - "format": "partial-date-time" - } - }, - "required": [ - "created_at", - "image", - "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" - } - }, - "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" - }, - "VerificationToken": { - "description": "A verification token for a user.\n\nThis is typically used to verify a user's email address.", - "type": "object", - "properties": { - "created_at": { - "description": "The date and time the verification token was created.", - "type": "string", - "format": "partial-date-time" - }, - "expires": { - "description": "The date and time the verification token expires.", - "type": "string", - "format": "partial-date-time" - }, - "id": { - "description": "The token used for verification. This is used as the id for the table since it is unique per record.", - "type": "string" - }, - "identifier": { - "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", - "type": "string" - }, - "updated_at": { - "description": "The date and time the verification token was last updated.", - "type": "string", - "format": "partial-date-time" - } - }, - "required": [ - "created_at", - "expires", - "updated_at" - ] - } - } - }, - "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