Update api spec (#70)

* YOYO NEW API SPEC!

* generate

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-04-06 15:34:57 -07:00
committed by GitHub
parent 374a57746e
commit 6ef6e60467
13 changed files with 1312 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,98 @@
from typing import Any, Dict, Optional, Union, cast
import httpx
from ...client import Client
from ...models.ai_plugin_manifest import AiPluginManifest
from ...models.error import Error
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/.well-known/ai-plugin.json".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, AiPluginManifest, Error]]:
if response.status_code == 200:
response_200 = AiPluginManifest.from_dict(response.json())
return response_200
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error.from_dict(response.json())
return response_5XX
return None
def _build_response(*, response: httpx.Response) -> Response[Union[Any, AiPluginManifest, 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, AiPluginManifest, Error]]:
kwargs = _get_kwargs(
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
*,
client: Client,
) -> Optional[Union[Any, AiPluginManifest, Error]]:
return sync_detailed(
client=client,
).parsed
async def asyncio_detailed(
*,
client: Client,
) -> Response[Union[Any, AiPluginManifest, Error]]:
kwargs = _get_kwargs(
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[Any, AiPluginManifest, Error]]:
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -0,0 +1,99 @@
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/payment/tax".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.get(
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 will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response. """
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.get(**kwargs)
return _build_response(response=response)
async def asyncio(
*,
client: Client,
) -> Optional[Union[Any, Error]]:
""" This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response. """
return (
await asyncio_detailed(
client=client,
)
).parsed

View File

@ -1,6 +1,12 @@
""" Contains all the data models used in inputs/outputs """ """ Contains all the data models used in inputs/outputs """
from .account_provider import AccountProvider from .account_provider import AccountProvider
from .ai_plugin_api import AiPluginApi
from .ai_plugin_api_type import AiPluginApiType
from .ai_plugin_auth import AiPluginAuth
from .ai_plugin_auth_type import AiPluginAuthType
from .ai_plugin_http_auth_type import AiPluginHttpAuthType
from .ai_plugin_manifest import AiPluginManifest
from .api_call_query_group import ApiCallQueryGroup from .api_call_query_group import ApiCallQueryGroup
from .api_call_query_group_by import ApiCallQueryGroupBy from .api_call_query_group_by import ApiCallQueryGroupBy
from .api_call_status import ApiCallStatus from .api_call_status import ApiCallStatus
@ -20,6 +26,7 @@ from .code_language import CodeLanguage
from .code_output import CodeOutput from .code_output import CodeOutput
from .commit import Commit from .commit import Commit
from .connection import Connection from .connection import Connection
from .country_code import CountryCode
from .created_at_sort_mode import CreatedAtSortMode from .created_at_sort_mode import CreatedAtSortMode
from .currency import Currency from .currency import Currency
from .customer import Customer from .customer import Customer

View File

@ -0,0 +1,76 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.ai_plugin_api_type import AiPluginApiType
from ..types import UNSET, Unset
T = TypeVar("T", bound="AiPluginApi")
@attr.s(auto_attribs=True)
class AiPluginApi:
""" """
is_user_authenticated: Union[Unset, bool] = False
type: Union[Unset, AiPluginApiType] = UNSET
url: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
is_user_authenticated = self.is_user_authenticated
type: Union[Unset, str] = UNSET
if not isinstance(self.type, Unset):
type = self.type.value
url = self.url
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if is_user_authenticated is not UNSET:
field_dict['is_user_authenticated'] = is_user_authenticated
if type is not UNSET:
field_dict['type'] = type
if url is not UNSET:
field_dict['url'] = url
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
is_user_authenticated = d.pop("is_user_authenticated", UNSET)
_type = d.pop("type", UNSET)
type: Union[Unset, AiPluginApiType]
if isinstance(_type, Unset):
type = UNSET
else:
type = AiPluginApiType(_type)
url = d.pop("url", UNSET)
ai_plugin_api = cls(
is_user_authenticated=is_user_authenticated,
type=type,
url=url,
)
ai_plugin_api.additional_properties = d
return ai_plugin_api
@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

View File

@ -0,0 +1,8 @@
from enum import Enum
class AiPluginApiType(str, Enum):
OPENAPI = 'openapi'
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,77 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.ai_plugin_http_auth_type import AiPluginHttpAuthType
from ..models.ai_plugin_auth_type import AiPluginAuthType
from ..types import UNSET, Unset
T = TypeVar("T", bound="AiPluginAuth")
@attr.s(auto_attribs=True)
class AiPluginAuth:
""" """
authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET
type: Union[Unset, AiPluginAuthType] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
authorization_type: Union[Unset, str] = UNSET
if not isinstance(self.authorization_type, Unset):
authorization_type = self.authorization_type.value
type: Union[Unset, str] = UNSET
if not isinstance(self.type, Unset):
type = self.type.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if authorization_type is not UNSET:
field_dict['authorization_type'] = authorization_type
if type is not UNSET:
field_dict['type'] = type
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
_authorization_type = d.pop("authorization_type", UNSET)
authorization_type: Union[Unset, AiPluginHttpAuthType]
if isinstance(_authorization_type, Unset):
authorization_type = UNSET
else:
authorization_type = AiPluginHttpAuthType(_authorization_type)
_type = d.pop("type", UNSET)
type: Union[Unset, AiPluginAuthType]
if isinstance(_type, Unset):
type = UNSET
else:
type = AiPluginAuthType(_type)
ai_plugin_auth = cls(
authorization_type=authorization_type,
type=type,
)
ai_plugin_auth.additional_properties = d
return ai_plugin_auth
@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

View File

@ -0,0 +1,11 @@
from enum import Enum
class AiPluginAuthType(str, Enum):
NONE = 'none'
USER_HTTP = 'user_http'
SERVICE_HTTP = 'service_http'
OAUTH = 'oauth'
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,9 @@
from enum import Enum
class AiPluginHttpAuthType(str, Enum):
BASIC = 'basic'
BEARER = 'bearer'
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,133 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.ai_plugin_api import AiPluginApi
from ..models.ai_plugin_auth import AiPluginAuth
from ..types import UNSET, Unset
T = TypeVar("T", bound="AiPluginManifest")
@attr.s(auto_attribs=True)
class AiPluginManifest:
""" """
api: Union[Unset, AiPluginApi] = UNSET
auth: Union[Unset, AiPluginAuth] = UNSET
contact_email: Union[Unset, str] = UNSET
description_for_human: Union[Unset, str] = UNSET
description_for_model: Union[Unset, str] = UNSET
legal_info_url: Union[Unset, str] = UNSET
logo_url: Union[Unset, str] = UNSET
name_for_human: Union[Unset, str] = UNSET
name_for_model: Union[Unset, str] = UNSET
schema_version: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
api: Union[Unset, str] = UNSET
if not isinstance(self.api, Unset):
api = self.api.value
auth: Union[Unset, str] = UNSET
if not isinstance(self.auth, Unset):
auth = self.auth.value
contact_email = self.contact_email
description_for_human = self.description_for_human
description_for_model = self.description_for_model
legal_info_url = self.legal_info_url
logo_url = self.logo_url
name_for_human = self.name_for_human
name_for_model = self.name_for_model
schema_version = self.schema_version
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if api is not UNSET:
field_dict['api'] = api
if auth is not UNSET:
field_dict['auth'] = auth
if contact_email is not UNSET:
field_dict['contact_email'] = contact_email
if description_for_human is not UNSET:
field_dict['description_for_human'] = description_for_human
if description_for_model is not UNSET:
field_dict['description_for_model'] = description_for_model
if legal_info_url is not UNSET:
field_dict['legal_info_url'] = legal_info_url
if logo_url is not UNSET:
field_dict['logo_url'] = logo_url
if name_for_human is not UNSET:
field_dict['name_for_human'] = name_for_human
if name_for_model is not UNSET:
field_dict['name_for_model'] = name_for_model
if schema_version is not UNSET:
field_dict['schema_version'] = schema_version
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
_api = d.pop("api", UNSET)
api: Union[Unset, AiPluginApi]
if isinstance(_api, Unset):
api = UNSET
else:
api = AiPluginApi(_api)
_auth = d.pop("auth", UNSET)
auth: Union[Unset, AiPluginAuth]
if isinstance(_auth, Unset):
auth = UNSET
else:
auth = AiPluginAuth(_auth)
contact_email = d.pop("contact_email", UNSET)
description_for_human = d.pop("description_for_human", UNSET)
description_for_model = d.pop("description_for_model", UNSET)
legal_info_url = d.pop("legal_info_url", UNSET)
logo_url = d.pop("logo_url", UNSET)
name_for_human = d.pop("name_for_human", UNSET)
name_for_model = d.pop("name_for_model", UNSET)
schema_version = d.pop("schema_version", UNSET)
ai_plugin_manifest = cls(
api=api,
auth=auth,
contact_email=contact_email,
description_for_human=description_for_human,
description_for_model=description_for_model,
legal_info_url=legal_info_url,
logo_url=logo_url,
name_for_human=name_for_human,
name_for_model=name_for_model,
schema_version=schema_version,
)
ai_plugin_manifest.additional_properties = d
return ai_plugin_manifest
@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

View File

@ -0,0 +1,256 @@
from enum import Enum
class CountryCode(str, Enum):
AF = 'AF'
AX = 'AX'
AL = 'AL'
DZ = 'DZ'
AS = 'AS'
AD = 'AD'
AO = 'AO'
AI = 'AI'
AQ = 'AQ'
AG = 'AG'
AR = 'AR'
AM = 'AM'
AW = 'AW'
AU = 'AU'
AT = 'AT'
AZ = 'AZ'
BS = 'BS'
BH = 'BH'
BD = 'BD'
BB = 'BB'
BY = 'BY'
BE = 'BE'
BZ = 'BZ'
BJ = 'BJ'
BM = 'BM'
BT = 'BT'
BO = 'BO'
BQ = 'BQ'
BA = 'BA'
BW = 'BW'
BV = 'BV'
BR = 'BR'
IO = 'IO'
BN = 'BN'
BG = 'BG'
BF = 'BF'
BI = 'BI'
CV = 'CV'
KH = 'KH'
CM = 'CM'
CA = 'CA'
KY = 'KY'
CF = 'CF'
TD = 'TD'
CL = 'CL'
CN = 'CN'
CX = 'CX'
CC = 'CC'
CO = 'CO'
KM = 'KM'
CG = 'CG'
CD = 'CD'
CK = 'CK'
CR = 'CR'
CI = 'CI'
HR = 'HR'
CU = 'CU'
CW = 'CW'
CY = 'CY'
CZ = 'CZ'
DK = 'DK'
DJ = 'DJ'
DM = 'DM'
DO = 'DO'
EC = 'EC'
EG = 'EG'
SV = 'SV'
GQ = 'GQ'
ER = 'ER'
EE = 'EE'
ET = 'ET'
FK = 'FK'
FO = 'FO'
FJ = 'FJ'
FI = 'FI'
FR = 'FR'
GF = 'GF'
PF = 'PF'
TF = 'TF'
GA = 'GA'
GM = 'GM'
GE = 'GE'
DE = 'DE'
GH = 'GH'
GI = 'GI'
GR = 'GR'
GL = 'GL'
GD = 'GD'
GP = 'GP'
GU = 'GU'
GT = 'GT'
GG = 'GG'
GN = 'GN'
GW = 'GW'
GY = 'GY'
HT = 'HT'
HM = 'HM'
VA = 'VA'
HN = 'HN'
HK = 'HK'
HU = 'HU'
IS = 'IS'
IN = 'IN'
ID = 'ID'
IR = 'IR'
IQ = 'IQ'
IE = 'IE'
IM = 'IM'
IL = 'IL'
IT = 'IT'
JM = 'JM'
JP = 'JP'
JE = 'JE'
JO = 'JO'
KZ = 'KZ'
KE = 'KE'
KI = 'KI'
KP = 'KP'
KR = 'KR'
KW = 'KW'
KG = 'KG'
LA = 'LA'
LV = 'LV'
LB = 'LB'
LS = 'LS'
LR = 'LR'
LY = 'LY'
LI = 'LI'
LT = 'LT'
LU = 'LU'
MO = 'MO'
MK = 'MK'
MG = 'MG'
MW = 'MW'
MY = 'MY'
MV = 'MV'
ML = 'ML'
MT = 'MT'
MH = 'MH'
MQ = 'MQ'
MR = 'MR'
MU = 'MU'
YT = 'YT'
MX = 'MX'
FM = 'FM'
MD = 'MD'
MC = 'MC'
MN = 'MN'
ME = 'ME'
MS = 'MS'
MA = 'MA'
MZ = 'MZ'
MM = 'MM'
NA = 'NA'
NR = 'NR'
NP = 'NP'
NL = 'NL'
NC = 'NC'
NZ = 'NZ'
NI = 'NI'
NE = 'NE'
NG = 'NG'
NU = 'NU'
NF = 'NF'
MP = 'MP'
NO = 'NO'
OM = 'OM'
PK = 'PK'
PW = 'PW'
PS = 'PS'
PA = 'PA'
PG = 'PG'
PY = 'PY'
PE = 'PE'
PH = 'PH'
PN = 'PN'
PL = 'PL'
PT = 'PT'
PR = 'PR'
QA = 'QA'
RE = 'RE'
RO = 'RO'
RU = 'RU'
RW = 'RW'
BL = 'BL'
SH = 'SH'
KN = 'KN'
LC = 'LC'
MF = 'MF'
PM = 'PM'
VC = 'VC'
WS = 'WS'
SM = 'SM'
ST = 'ST'
SA = 'SA'
SN = 'SN'
RS = 'RS'
SC = 'SC'
SL = 'SL'
SG = 'SG'
SX = 'SX'
SK = 'SK'
SI = 'SI'
SB = 'SB'
SO = 'SO'
ZA = 'ZA'
GS = 'GS'
SS = 'SS'
ES = 'ES'
LK = 'LK'
SD = 'SD'
SR = 'SR'
SJ = 'SJ'
SZ = 'SZ'
SE = 'SE'
CH = 'CH'
SY = 'SY'
TW = 'TW'
TJ = 'TJ'
TZ = 'TZ'
TH = 'TH'
TL = 'TL'
TG = 'TG'
TK = 'TK'
TO = 'TO'
TT = 'TT'
TN = 'TN'
TR = 'TR'
TM = 'TM'
TC = 'TC'
TV = 'TV'
UG = 'UG'
UA = 'UA'
AE = 'AE'
GB = 'GB'
US = 'US'
UM = 'UM'
UY = 'UY'
UZ = 'UZ'
VU = 'VU'
VE = 'VE'
VN = 'VN'
VG = 'VG'
VI = 'VI'
WF = 'WF'
EH = 'EH'
YE = 'YE'
ZM = 'ZM'
ZW = 'ZW'
def __str__(self) -> str:
return str(self.value)

View File

@ -2,6 +2,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr import attr
from ..models.country_code import CountryCode
from ..types import UNSET, Unset from ..types import UNSET, Unset
T = TypeVar("T", bound="NewAddress") T = TypeVar("T", bound="NewAddress")
@ -11,7 +12,7 @@ T = TypeVar("T", bound="NewAddress")
class NewAddress: class NewAddress:
""" """ """ """
city: Union[Unset, str] = UNSET city: Union[Unset, str] = UNSET
country: Union[Unset, str] = UNSET country: Union[Unset, CountryCode] = UNSET
state: Union[Unset, str] = UNSET state: Union[Unset, str] = UNSET
street1: Union[Unset, str] = UNSET street1: Union[Unset, str] = UNSET
street2: Union[Unset, str] = UNSET street2: Union[Unset, str] = UNSET
@ -22,7 +23,9 @@ class NewAddress:
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
city = self.city city = self.city
country = self.country country: Union[Unset, str] = UNSET
if not isinstance(self.country, Unset):
country = self.country.value
state = self.state state = self.state
street1 = self.street1 street1 = self.street1
street2 = self.street2 street2 = self.street2
@ -54,7 +57,12 @@ class NewAddress:
d = src_dict.copy() d = src_dict.copy()
city = d.pop("city", UNSET) city = d.pop("city", UNSET)
country = d.pop("country", UNSET) _country = d.pop("country", UNSET)
country: Union[Unset, CountryCode]
if isinstance(_country, Unset):
country = UNSET
else:
country = CountryCode(_country)
state = d.pop("state", UNSET) state = d.pop("state", UNSET)

536
spec.json
View File

@ -21,6 +21,146 @@
], ],
"type": "string" "type": "string"
}, },
"AiPluginApi": {
"description": "AI plugin api information.",
"properties": {
"is_user_authenticated": {
"default": false,
"description": "If the API is authenticated.",
"type": "boolean"
},
"type": {
"allOf": [
{
"$ref": "#/components/schemas/AiPluginApiType"
}
],
"default": "openapi",
"description": "The type of API."
},
"url": {
"description": "The url to the API's schema.",
"format": "uri",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
},
"AiPluginApiType": {
"description": "AI plugin api type.",
"enum": [
"openapi"
],
"type": "string"
},
"AiPluginAuth": {
"description": "AI plugin auth information.",
"properties": {
"authorization_type": {
"allOf": [
{
"$ref": "#/components/schemas/AiPluginHttpAuthType"
}
],
"description": "The type of http authorization.",
"nullable": true
},
"type": {
"allOf": [
{
"$ref": "#/components/schemas/AiPluginAuthType"
}
],
"default": "none",
"description": "The type of authentication."
}
},
"type": "object"
},
"AiPluginAuthType": {
"description": "AI plugin auth type.",
"enum": [
"none",
"user_http",
"service_http",
"oauth"
],
"type": "string"
},
"AiPluginHttpAuthType": {
"description": "AI plugin http auth type.",
"enum": [
"basic",
"bearer"
],
"type": "string"
},
"AiPluginManifest": {
"description": "AI plugin manifest.\n\nThis is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).",
"properties": {
"api": {
"allOf": [
{
"$ref": "#/components/schemas/AiPluginApi"
}
],
"description": "API specification."
},
"auth": {
"allOf": [
{
"$ref": "#/components/schemas/AiPluginAuth"
}
],
"description": "Authentication schema."
},
"contact_email": {
"description": "Email contact for safety/moderation reachout, support, and deactivation.",
"format": "email",
"type": "string"
},
"description_for_human": {
"description": "Human-readable description of the plugin.",
"type": "string"
},
"description_for_model": {
"description": "Description better tailored to the model, such as token context length considerations or keyword usage for improved plugin prompting.",
"type": "string"
},
"legal_info_url": {
"description": "Redirect URL for users to view plugin information.",
"format": "uri",
"type": "string"
},
"logo_url": {
"description": "URL used to fetch the plugin's logo.",
"format": "uri",
"type": "string"
},
"name_for_human": {
"description": "Human-readable name, such as the full company name.",
"type": "string"
},
"name_for_model": {
"description": "Name the model will used to target the plugin.",
"type": "string"
},
"schema_version": {
"description": "Manifest schema version.",
"type": "string"
}
},
"required": [
"api",
"auth",
"legal_info_url",
"logo_url"
],
"type": "object"
},
"ApiCallQueryGroup": { "ApiCallQueryGroup": {
"description": "A response for a query on the API call table that is grouped by something.", "description": "A response for a query on the API call table that is grouped by something.",
"properties": { "properties": {
@ -1652,6 +1792,261 @@
], ],
"type": "object" "type": "object"
}, },
"CountryCode": {
"description": "An enumeration of all ISO-3166 alpha-2 country codes.",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KP",
"KR",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MK",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SZ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"US",
"UM",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
],
"type": "string"
},
"CreatedAtSortMode": { "CreatedAtSortMode": {
"description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.",
"enum": [ "enum": [
@ -1661,7 +2056,7 @@
"type": "string" "type": "string"
}, },
"Currency": { "Currency": {
"description": "Currency is the list of supported currencies.\n\nFor more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>.", "description": "Currency is the list of supported currencies.\n\nThis comes from the Stripe API docs: For more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>.",
"enum": [ "enum": [
"aed", "aed",
"afn", "afn",
@ -1835,6 +2230,7 @@
"$ref": "#/components/schemas/Currency" "$ref": "#/components/schemas/Currency"
} }
], ],
"default": "usd",
"description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes." "description": "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes."
}, },
"delinquent": { "delinquent": {
@ -1872,8 +2268,7 @@
} }
}, },
"required": [ "required": [
"created_at", "created_at"
"currency"
], ],
"type": "object" "type": "object"
}, },
@ -3477,6 +3872,7 @@
"$ref": "#/components/schemas/Currency" "$ref": "#/components/schemas/Currency"
} }
], ],
"default": "usd",
"description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase."
}, },
"customer_email": { "customer_email": {
@ -3576,8 +3972,7 @@
} }
}, },
"required": [ "required": [
"created_at", "created_at"
"currency"
], ],
"type": "object" "type": "object"
}, },
@ -3597,6 +3992,7 @@
"$ref": "#/components/schemas/Currency" "$ref": "#/components/schemas/Currency"
} }
], ],
"default": "usd",
"description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase." "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase."
}, },
"description": { "description": {
@ -3620,9 +4016,6 @@
"type": "object" "type": "object"
} }
}, },
"required": [
"currency"
],
"type": "object" "type": "object"
}, },
"InvoiceStatus": { "InvoiceStatus": {
@ -3960,8 +4353,12 @@
"type": "string" "type": "string"
}, },
"country": { "country": {
"description": "The country component.", "allOf": [
"type": "string" {
"$ref": "#/components/schemas/CountryCode"
}
],
"description": "The country component. This is a two-letter ISO country code."
}, },
"state": { "state": {
"description": "The state component.", "description": "The state component.",
@ -3984,6 +4381,9 @@
"type": "string" "type": "string"
} }
}, },
"required": [
"country"
],
"type": "object" "type": "object"
}, },
"OAuth2ClientInfo": { "OAuth2ClientInfo": {
@ -7746,6 +8146,67 @@
] ]
} }
}, },
"/.well-known/ai-plugin.json": {
"get": {
"operationId": "get_ai_plugin_manifest",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AiPluginManifest"
}
}
},
"description": "successful operation",
"headers": {
"Access-Control-Allow-Credentials": {
"description": "Access-Control-Allow-Credentials header.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
},
"Access-Control-Allow-Headers": {
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
},
"Access-Control-Allow-Methods": {
"description": "Access-Control-Allow-Methods header.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
},
"Access-Control-Allow-Origin": {
"description": "Access-Control-Allow-Origin header.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"summary": "Get AI plugin manifest.",
"tags": [
"meta"
]
}
},
"/_meta/info": { "/_meta/info": {
"get": { "get": {
"description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", "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.",
@ -14876,6 +15337,61 @@
] ]
} }
}, },
"/user/payment/tax": {
"get": {
"description": "This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.",
"operationId": "validate_customer_tax_information_for_user",
"responses": {
"204": {
"description": "successful operation, no content",
"headers": {
"Access-Control-Allow-Credentials": {
"description": "Access-Control-Allow-Credentials header.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
},
"Access-Control-Allow-Headers": {
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
},
"Access-Control-Allow-Methods": {
"description": "Access-Control-Allow-Methods header.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
},
"Access-Control-Allow-Origin": {
"description": "Access-Control-Allow-Origin header.",
"required": true,
"schema": {
"type": "string"
},
"style": "simple"
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
},
"summary": "Validate a customer's information is correct and valid for automatic tax.",
"tags": [
"payments"
]
}
},
"/user/session/{token}": { "/user/session/{token}": {
"get": { "get": {
"description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.",