Update api spec (#432)

* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
zoo-github-actions-auth[bot]
2025-05-07 15:39:47 -07:00
committed by GitHub
parent 04efe52feb
commit 2fd4d315db
10 changed files with 988 additions and 825 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ from ...types import Response
def _get_kwargs(
include_total_due: bool,
id: Uuid,
*,
client: Client,
@ -19,6 +20,12 @@ def _get_kwargs(
id=id,
) # noqa: E501
if include_total_due is not None:
if "?" in url:
url = url + "&include_total_due=" + str(include_total_due).lower()
else:
url = url + "?include_total_due=" + str(include_total_due).lower()
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -57,11 +64,13 @@ def _build_response(
def sync_detailed(
include_total_due: bool,
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
include_total_due=include_total_due,
id=id,
client=client,
)
@ -75,6 +84,7 @@ def sync_detailed(
def sync(
include_total_due: bool,
id: Uuid,
*,
client: Client,
@ -82,17 +92,20 @@ def sync(
"""This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.""" # noqa: E501
return sync_detailed(
include_total_due=include_total_due,
id=id,
client=client,
).parsed
async def asyncio_detailed(
include_total_due: bool,
id: Uuid,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
include_total_due=include_total_due,
id=id,
client=client,
)
@ -104,6 +117,7 @@ async def asyncio_detailed(
async def asyncio(
include_total_due: bool,
id: Uuid,
*,
client: Client,
@ -112,6 +126,7 @@ async def asyncio(
return (
await asyncio_detailed(
include_total_due=include_total_due,
id=id,
client=client,
)

View File

@ -11,6 +11,7 @@ from ...types import Response
def _get_kwargs(
id: UserIdentifier,
include_total_due: bool,
*,
client: Client,
) -> Dict[str, Any]:
@ -19,6 +20,12 @@ def _get_kwargs(
id=id,
) # noqa: E501
if include_total_due is not None:
if "?" in url:
url = url + "&include_total_due=" + str(include_total_due).lower()
else:
url = url + "?include_total_due=" + str(include_total_due).lower()
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -58,11 +65,13 @@ def _build_response(
def sync_detailed(
id: UserIdentifier,
include_total_due: bool,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
include_total_due=include_total_due,
client=client,
)
@ -76,6 +85,7 @@ def sync_detailed(
def sync(
id: UserIdentifier,
include_total_due: bool,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
@ -83,17 +93,20 @@ def sync(
return sync_detailed(
id=id,
include_total_due=include_total_due,
client=client,
).parsed
async def asyncio_detailed(
id: UserIdentifier,
include_total_due: bool,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
include_total_due=include_total_due,
client=client,
)
@ -105,6 +118,7 @@ async def asyncio_detailed(
async def asyncio(
id: UserIdentifier,
include_total_due: bool,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
@ -113,6 +127,7 @@ async def asyncio(
return (
await asyncio_detailed(
id=id,
include_total_due=include_total_due,
client=client,
)
).parsed

View File

@ -9,6 +9,7 @@ from ...types import Response
def _get_kwargs(
include_total_due: bool,
*,
client: Client,
) -> Dict[str, Any]:
@ -16,6 +17,12 @@ def _get_kwargs(
client.base_url,
) # noqa: E501
if include_total_due is not None:
if "?" in url:
url = url + "&include_total_due=" + str(include_total_due).lower()
else:
url = url + "?include_total_due=" + str(include_total_due).lower()
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -54,10 +61,12 @@ def _build_response(
def sync_detailed(
include_total_due: bool,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
include_total_due=include_total_due,
client=client,
)
@ -70,21 +79,25 @@ def sync_detailed(
def sync(
include_total_due: bool,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.""" # noqa: E501
return sync_detailed(
include_total_due=include_total_due,
client=client,
).parsed
async def asyncio_detailed(
include_total_due: bool,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
include_total_due=include_total_due,
client=client,
)
@ -95,6 +108,7 @@ async def asyncio_detailed(
async def asyncio(
include_total_due: bool,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
@ -102,6 +116,7 @@ async def asyncio(
return (
await asyncio_detailed(
include_total_due=include_total_due,
client=client,
)
).parsed

View File

@ -9,6 +9,7 @@ from ...types import Response
def _get_kwargs(
include_total_due: bool,
*,
client: Client,
) -> Dict[str, Any]:
@ -16,6 +17,12 @@ def _get_kwargs(
client.base_url,
) # noqa: E501
if include_total_due is not None:
if "?" in url:
url = url + "&include_total_due=" + str(include_total_due).lower()
else:
url = url + "?include_total_due=" + str(include_total_due).lower()
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -54,10 +61,12 @@ def _build_response(
def sync_detailed(
include_total_due: bool,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
include_total_due=include_total_due,
client=client,
)
@ -70,21 +79,25 @@ def sync_detailed(
def sync(
include_total_due: bool,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
"""This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.""" # noqa: E501
return sync_detailed(
include_total_due=include_total_due,
client=client,
).parsed
async def asyncio_detailed(
include_total_due: bool,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
include_total_due=include_total_due,
client=client,
)
@ -95,6 +108,7 @@ async def asyncio_detailed(
async def asyncio(
include_total_due: bool,
*,
client: Client,
) -> Optional[Union[CustomerBalance, Error]]:
@ -102,6 +116,7 @@ async def asyncio(
return (
await asyncio_detailed(
include_total_due=include_total_due,
client=client,
)
).parsed

View File

@ -12,6 +12,7 @@ from ...types import Response
def _get_kwargs(
id: Uuid,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
@ -21,6 +22,12 @@ def _get_kwargs(
id=id,
) # noqa: E501
if include_total_due is not None:
if "?" in url:
url = url + "&include_total_due=" + str(include_total_due).lower()
else:
url = url + "?include_total_due=" + str(include_total_due).lower()
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -61,12 +68,14 @@ def _build_response(
def sync_detailed(
id: Uuid,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
)
@ -81,6 +90,7 @@ def sync_detailed(
def sync(
id: Uuid,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
@ -89,6 +99,7 @@ def sync(
return sync_detailed(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
).parsed
@ -96,12 +107,14 @@ def sync(
async def asyncio_detailed(
id: Uuid,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
)
@ -114,6 +127,7 @@ async def asyncio_detailed(
async def asyncio(
id: Uuid,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
@ -123,6 +137,7 @@ async def asyncio(
return (
await asyncio_detailed(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
)

View File

@ -12,6 +12,7 @@ from ...types import Response
def _get_kwargs(
id: UserIdentifier,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
@ -21,6 +22,12 @@ def _get_kwargs(
id=id,
) # noqa: E501
if include_total_due is not None:
if "?" in url:
url = url + "&include_total_due=" + str(include_total_due).lower()
else:
url = url + "?include_total_due=" + str(include_total_due).lower()
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -61,12 +68,14 @@ def _build_response(
def sync_detailed(
id: UserIdentifier,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
)
@ -81,6 +90,7 @@ def sync_detailed(
def sync(
id: UserIdentifier,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
@ -89,6 +99,7 @@ def sync(
return sync_detailed(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
).parsed
@ -96,12 +107,14 @@ def sync(
async def asyncio_detailed(
id: UserIdentifier,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
) -> Response[Optional[Union[CustomerBalance, Error]]]:
kwargs = _get_kwargs(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
)
@ -114,6 +127,7 @@ async def asyncio_detailed(
async def asyncio(
id: UserIdentifier,
include_total_due: bool,
body: UpdatePaymentBalance,
*,
client: Client,
@ -123,6 +137,7 @@ async def asyncio(
return (
await asyncio_detailed(
id=id,
include_total_due=include_total_due,
body=body,
client=client,
)

View File

@ -3055,6 +3055,7 @@ def test_get_payment_balance_for_org():
result: Optional[Union[CustomerBalance, Error]] = get_payment_balance_for_org.sync(
client=client,
include_total_due=False,
)
if isinstance(result, Error) or result is None:
@ -3068,6 +3069,7 @@ def test_get_payment_balance_for_org():
response: Response[Optional[Union[CustomerBalance, Error]]] = (
get_payment_balance_for_org.sync_detailed(
client=client,
include_total_due=False,
)
)
@ -3083,6 +3085,7 @@ async def test_get_payment_balance_for_org_async():
Union[CustomerBalance, Error]
] = await get_payment_balance_for_org.asyncio(
client=client,
include_total_due=False,
)
# OR run async with more info
@ -3090,6 +3093,7 @@ async def test_get_payment_balance_for_org_async():
Optional[Union[CustomerBalance, Error]]
] = await get_payment_balance_for_org.asyncio_detailed(
client=client,
include_total_due=False,
)
@ -4271,6 +4275,7 @@ def test_get_payment_balance_for_any_org():
result: Optional[Union[CustomerBalance, Error]] = (
get_payment_balance_for_any_org.sync(
client=client,
include_total_due=False,
id=Uuid("<string>"),
)
)
@ -4286,6 +4291,7 @@ def test_get_payment_balance_for_any_org():
response: Response[Optional[Union[CustomerBalance, Error]]] = (
get_payment_balance_for_any_org.sync_detailed(
client=client,
include_total_due=False,
id=Uuid("<string>"),
)
)
@ -4302,6 +4308,7 @@ async def test_get_payment_balance_for_any_org_async():
Union[CustomerBalance, Error]
] = await get_payment_balance_for_any_org.asyncio(
client=client,
include_total_due=False,
id=Uuid("<string>"),
)
@ -4310,6 +4317,7 @@ async def test_get_payment_balance_for_any_org_async():
Optional[Union[CustomerBalance, Error]]
] = await get_payment_balance_for_any_org.asyncio_detailed(
client=client,
include_total_due=False,
id=Uuid("<string>"),
)
@ -4323,6 +4331,7 @@ def test_update_payment_balance_for_any_org():
update_payment_balance_for_any_org.sync(
client=client,
id=Uuid("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
)
@ -4339,6 +4348,7 @@ def test_update_payment_balance_for_any_org():
update_payment_balance_for_any_org.sync_detailed(
client=client,
id=Uuid("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
)
@ -4356,6 +4366,7 @@ async def test_update_payment_balance_for_any_org_async():
] = await update_payment_balance_for_any_org.asyncio(
client=client,
id=Uuid("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
@ -4365,6 +4376,7 @@ async def test_update_payment_balance_for_any_org_async():
] = await update_payment_balance_for_any_org.asyncio_detailed(
client=client,
id=Uuid("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
@ -6112,6 +6124,7 @@ def test_get_payment_balance_for_user():
result: Optional[Union[CustomerBalance, Error]] = get_payment_balance_for_user.sync(
client=client,
include_total_due=False,
)
if isinstance(result, Error) or result is None:
@ -6125,6 +6138,7 @@ def test_get_payment_balance_for_user():
response: Response[Optional[Union[CustomerBalance, Error]]] = (
get_payment_balance_for_user.sync_detailed(
client=client,
include_total_due=False,
)
)
@ -6140,6 +6154,7 @@ async def test_get_payment_balance_for_user_async():
Union[CustomerBalance, Error]
] = await get_payment_balance_for_user.asyncio(
client=client,
include_total_due=False,
)
# OR run async with more info
@ -6147,6 +6162,7 @@ async def test_get_payment_balance_for_user_async():
Optional[Union[CustomerBalance, Error]]
] = await get_payment_balance_for_user.asyncio_detailed(
client=client,
include_total_due=False,
)
@ -7389,6 +7405,7 @@ def test_get_payment_balance_for_any_user():
get_payment_balance_for_any_user.sync(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
)
)
@ -7404,6 +7421,7 @@ def test_get_payment_balance_for_any_user():
get_payment_balance_for_any_user.sync_detailed(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
)
)
@ -7420,6 +7438,7 @@ async def test_get_payment_balance_for_any_user_async():
] = await get_payment_balance_for_any_user.asyncio(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
)
# OR run async with more info
@ -7428,6 +7447,7 @@ async def test_get_payment_balance_for_any_user_async():
] = await get_payment_balance_for_any_user.asyncio_detailed(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
)
@ -7440,6 +7460,7 @@ def test_update_payment_balance_for_any_user():
update_payment_balance_for_any_user.sync(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
)
@ -7456,6 +7477,7 @@ def test_update_payment_balance_for_any_user():
update_payment_balance_for_any_user.sync_detailed(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
)
@ -7473,6 +7495,7 @@ async def test_update_payment_balance_for_any_user_async():
] = await update_payment_balance_for_any_user.asyncio(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)
@ -7482,6 +7505,7 @@ async def test_update_payment_balance_for_any_user_async():
] = await update_payment_balance_for_any_user.asyncio_detailed(
client=client,
id=UserIdentifier("<string>"),
include_total_due=False,
body=UpdatePaymentBalance(),
)

View File

@ -33,7 +33,7 @@ class CustomerBalance(BaseModel):
subscription_id: Optional[str] = None
total_due: float
total_due: Optional[float] = None
updated_at: datetime.datetime

View File

@ -4230,8 +4230,7 @@
"/ml/text-to-cad/iteration": {
"post": {
"tags": [
"ml",
"beta"
"ml"
],
"summary": "Iterate on a CAD model with a prompt.",
"description": "Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n\nYou always get the whole code back, even if you only changed a small part of it.\n\nThis 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\nThis endpoint will soon be deprecated in favor of the `/ml/text-to-cad/multi-file/iteration` endpoint. In that the endpoint path will remain but it will have the same behavior as `ml/text-to-cad/multi-file/iteration`.",
@ -4389,8 +4388,7 @@
"/ml/text-to-cad/multi-file/iteration": {
"post": {
"tags": [
"ml",
"beta"
"ml"
],
"summary": "Iterate on a multi-file CAD model with a prompt.",
"description": "This endpoint can iterate on multi-file models.\n\nEven if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.\n\nYou always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.\n\nThis 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.",
@ -7077,6 +7075,16 @@
"summary": "Get balance for your org.",
"description": "This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.",
"operationId": "get_payment_balance_for_org",
"parameters": [
{
"in": "query",
"name": "include_total_due",
"description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "successful operation",
@ -9651,6 +9659,14 @@
"description": "This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.",
"operationId": "get_payment_balance_for_any_org",
"parameters": [
{
"in": "query",
"name": "include_total_due",
"description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.",
"schema": {
"type": "boolean"
}
},
{
"in": "path",
"name": "id",
@ -9747,6 +9763,14 @@
"schema": {
"$ref": "#/components/schemas/Uuid"
}
},
{
"in": "query",
"name": "include_total_due",
"description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
@ -13365,6 +13389,16 @@
"summary": "Get balance for your user.",
"description": "This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.",
"operationId": "get_payment_balance_for_user",
"parameters": [
{
"in": "query",
"name": "include_total_due",
"description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "successful operation",
@ -16146,6 +16180,14 @@
"schema": {
"$ref": "#/components/schemas/UserIdentifier"
}
},
{
"in": "query",
"name": "include_total_due",
"description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.",
"schema": {
"type": "boolean"
}
}
],
"responses": {
@ -16234,6 +16276,14 @@
"schema": {
"$ref": "#/components/schemas/UserIdentifier"
}
},
{
"in": "query",
"name": "include_total_due",
"description": "If you would like to return the total due for a user. This makes the API call take longer so it is off by default.",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
@ -16421,8 +16471,7 @@
"/ws/modeling/commands": {
"get": {
"tags": [
"modeling",
"beta"
"modeling"
],
"summary": "Open a websocket which accepts modeling commands.",
"description": "Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.",
@ -19913,8 +19962,9 @@
"type": "string"
},
"total_due": {
"nullable": true,
"title": "double",
"description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the customer has on their account.",
"description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the customer has on their account. This amount is only returned if requested from the api.",
"type": "number",
"format": "money-usd"
},
@ -19933,7 +19983,6 @@
"monthly_api_credits_remaining_monetary_value",
"stable_api_credits_remaining",
"stable_api_credits_remaining_monetary_value",
"total_due",
"updated_at"
]
},