client: regenerate from hanzo-inc/cloud@0a52a53e66 (8.5.500)

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-10-01 19:39:01 +00:00
co-authored by Hanzo Dev
parent 32ce9a8595
commit d019bb67d4
10 changed files with 46 additions and 302 deletions
+1 -1
View File
@@ -258,7 +258,6 @@ pkg/hanzoai/cloud/models/ai_history_totals.py
pkg/hanzoai/cloud/models/ai_history_window.py
pkg/hanzoai/cloud/models/ai_judge_benchmark.py
pkg/hanzoai/cloud/models/ai_judge_panel_state.py
pkg/hanzoai/cloud/models/ai_limit.py
pkg/hanzoai/cloud/models/ai_limits.py
pkg/hanzoai/cloud/models/ai_mcp_app.py
pkg/hanzoai/cloud/models/ai_mcp_surface.py
@@ -297,6 +296,7 @@ pkg/hanzoai/cloud/models/ai_throughput_stats.py
pkg/hanzoai/cloud/models/ai_token_count.py
pkg/hanzoai/cloud/models/ai_video_failure.py
pkg/hanzoai/cloud/models/ai_video_status.py
pkg/hanzoai/cloud/models/ai_window.py
pkg/hanzoai/cloud/models/allowance_allowance.py
pkg/hanzoai/cloud/models/allowance_pool.py
pkg/hanzoai/cloud/models/app.py
+2 -2
View File
@@ -1,4 +1,4 @@
ref=v8.5.491
sha256=157019043d667c1c1867c9a0325d91f54bbcf249b5be87c671c201bc54136475
ref=0a52a53e669a23f4396552f8584e340458d9033e
sha256=8ced1d060b57230e5c1bb1af4f8c651f38679b0926d9422a2743a56f3f3c9bd0
repo=hanzo-inc/cloud
path=openapi.yaml
+2 -2
View File
@@ -280,7 +280,6 @@ __all__ = [
"AiHistoryWindow",
"AiJudgeBenchmark",
"AiJudgePanelState",
"AiLimit",
"AiLimits",
"AiMCPApp",
"AiMCPSurface",
@@ -319,6 +318,7 @@ __all__ = [
"AiTokenCount",
"AiVideoFailure",
"AiVideoStatus",
"AiWindow",
"AllowanceAllowance",
"AllowancePool",
"App",
@@ -3309,7 +3309,6 @@ from hanzoai.cloud.models.ai_history_totals import AiHistoryTotals as AiHistoryT
from hanzoai.cloud.models.ai_history_window import AiHistoryWindow as AiHistoryWindow
from hanzoai.cloud.models.ai_judge_benchmark import AiJudgeBenchmark as AiJudgeBenchmark
from hanzoai.cloud.models.ai_judge_panel_state import AiJudgePanelState as AiJudgePanelState
from hanzoai.cloud.models.ai_limit import AiLimit as AiLimit
from hanzoai.cloud.models.ai_limits import AiLimits as AiLimits
from hanzoai.cloud.models.ai_mcp_app import AiMCPApp as AiMCPApp
from hanzoai.cloud.models.ai_mcp_surface import AiMCPSurface as AiMCPSurface
@@ -3348,6 +3347,7 @@ from hanzoai.cloud.models.ai_throughput_stats import AiThroughputStats as AiThro
from hanzoai.cloud.models.ai_token_count import AiTokenCount as AiTokenCount
from hanzoai.cloud.models.ai_video_failure import AiVideoFailure as AiVideoFailure
from hanzoai.cloud.models.ai_video_status import AiVideoStatus as AiVideoStatus
from hanzoai.cloud.models.ai_window import AiWindow as AiWindow
from hanzoai.cloud.models.allowance_allowance import AllowanceAllowance as AllowanceAllowance
from hanzoai.cloud.models.allowance_pool import AllowancePool as AllowancePool
from hanzoai.cloud.models.app import App as App
+6 -253
View File
@@ -149,9 +149,9 @@ class AiApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AiLimits:
"""Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
"""Reads the caller's plan usage: the share used of the session, the day and the month, and when each starts again.
Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
Reads the caller's plan usage: the share used of the session, the day and the month, and when each starts again. Shares only, never amounts.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -212,9 +212,9 @@ class AiApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AiLimits]:
"""Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
"""Reads the caller's plan usage: the share used of the session, the day and the month, and when each starts again.
Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
Reads the caller's plan usage: the share used of the session, the day and the month, and when each starts again. Shares only, never amounts.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -275,9 +275,9 @@ class AiApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
"""Reads the caller's plan usage: the share used of the session, the day and the month, and when each starts again.
Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
Reads the caller's plan usage: the share used of the session, the day and the month, and when each starts again. Shares only, never amounts.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -380,253 +380,6 @@ class AiApi:
@validate_call
def ai_limits_reset(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AiLimits:
"""Uses the caller's free reset for this billing period: their session and weekly windows start again from zero now.
Uses the caller's free reset for this billing period: their session and weekly windows start again from zero now. The month is untouched, so total spend never passes the plan's ceiling. One per period by default; an unused reset lapses at the period end. Answers the limits as they stand after the reset.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._ai_limits_reset_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AiLimits",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def ai_limits_reset_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AiLimits]:
"""Uses the caller's free reset for this billing period: their session and weekly windows start again from zero now.
Uses the caller's free reset for this billing period: their session and weekly windows start again from zero now. The month is untouched, so total spend never passes the plan's ceiling. One per period by default; an unused reset lapses at the period end. Answers the limits as they stand after the reset.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._ai_limits_reset_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AiLimits",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def ai_limits_reset_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Uses the caller's free reset for this billing period: their session and weekly windows start again from zero now.
Uses the caller's free reset for this billing period: their session and weekly windows start again from zero now. The month is untouched, so total spend never passes the plan's ceiling. One per period by default; an unused reset lapses at the period end. Answers the limits as they stand after the reset.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._ai_limits_reset_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AiLimits",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _ai_limits_reset_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json',
'application/problem+json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/ai/limits/reset',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def ai_mcp_tools(
self,
+6 -6
View File
@@ -63,7 +63,7 @@ class FlagApi:
) -> FlagDeletedOut:
"""Removes one flag definition by key and records the deletion in the change log.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set, and every other key an owner's or admin's of the org.
:param key: Key is the flag key to act on, from the path. (required)
:type key: str
@@ -130,7 +130,7 @@ class FlagApi:
) -> ApiResponse[FlagDeletedOut]:
"""Removes one flag definition by key and records the deletion in the change log.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set, and every other key an owner's or admin's of the org.
:param key: Key is the flag key to act on, from the path. (required)
:type key: str
@@ -197,7 +197,7 @@ class FlagApi:
) -> RESTResponseType:
"""Removes one flag definition by key and records the deletion in the change log.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set, and every other key an owner's or admin's of the org.
:param key: Key is the flag key to act on, from the path. (required)
:type key: str
@@ -1896,7 +1896,7 @@ class FlagApi:
) -> FlagDefRow:
"""Creates or replaces the flag definition at the path's key and returns the stored row.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands; every other key is an owner's or admin's of the org, never a member's.
:param key: Key is the flag key to write, from the path. (required)
:type key: str
@@ -1967,7 +1967,7 @@ class FlagApi:
) -> ApiResponse[FlagDefRow]:
"""Creates or replaces the flag definition at the path's key and returns the stored row.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands; every other key is an owner's or admin's of the org, never a member's.
:param key: Key is the flag key to write, from the path. (required)
:type key: str
@@ -2038,7 +2038,7 @@ class FlagApi:
) -> RESTResponseType:
"""Creates or replaces the flag definition at the path's key and returns the stored row.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands; every other key is an owner's or admin's of the org, never a member's.
:param key: Key is the flag key to write, from the path. (required)
:type key: str
+3 -3
View File
@@ -4166,7 +4166,7 @@ class TrustApi:
) -> TrustWritten:
"""Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.
Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk. A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing. A document defaults to GATED. An artifact an independent auditor signed — a SOC 2 report, an ISO certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it. The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.
Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk. A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing. A document defaults to GATED. An artifact an independent auditor signed — an attestation report, a certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it. The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.
:param kind: Kind is the section being written. The URL is the authority. (required)
:type kind: str
@@ -4241,7 +4241,7 @@ class TrustApi:
) -> ApiResponse[TrustWritten]:
"""Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.
Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk. A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing. A document defaults to GATED. An artifact an independent auditor signed — a SOC 2 report, an ISO certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it. The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.
Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk. A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing. A document defaults to GATED. An artifact an independent auditor signed — an attestation report, a certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it. The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.
:param kind: Kind is the section being written. The URL is the authority. (required)
:type kind: str
@@ -4316,7 +4316,7 @@ class TrustApi:
) -> RESTResponseType:
"""Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.
Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk. A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing. A document defaults to GATED. An artifact an independent auditor signed — a SOC 2 report, an ISO certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it. The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.
Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk. A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing. A document defaults to GATED. An artifact an independent auditor signed — an attestation report, a certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it. The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.
:param kind: Kind is the section being written. The URL is the authority. (required)
:type kind: str
+1 -1
View File
@@ -143,7 +143,6 @@ from hanzoai.cloud.models.ai_history_totals import AiHistoryTotals
from hanzoai.cloud.models.ai_history_window import AiHistoryWindow
from hanzoai.cloud.models.ai_judge_benchmark import AiJudgeBenchmark
from hanzoai.cloud.models.ai_judge_panel_state import AiJudgePanelState
from hanzoai.cloud.models.ai_limit import AiLimit
from hanzoai.cloud.models.ai_limits import AiLimits
from hanzoai.cloud.models.ai_mcp_app import AiMCPApp
from hanzoai.cloud.models.ai_mcp_surface import AiMCPSurface
@@ -182,6 +181,7 @@ from hanzoai.cloud.models.ai_throughput_stats import AiThroughputStats
from hanzoai.cloud.models.ai_token_count import AiTokenCount
from hanzoai.cloud.models.ai_video_failure import AiVideoFailure
from hanzoai.cloud.models.ai_video_status import AiVideoStatus
from hanzoai.cloud.models.ai_window import AiWindow
from hanzoai.cloud.models.allowance_allowance import AllowanceAllowance
from hanzoai.cloud.models.allowance_pool import AllowancePool
from hanzoai.cloud.models.app import App
+15 -22
View File
@@ -17,9 +17,9 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.ai_limit import AiLimit
from hanzoai.cloud.models.ai_window import AiWindow
from typing import Optional, Set
from typing_extensions import Self
@@ -27,16 +27,14 @@ class AiLimits(BaseModel):
"""
AiLimits
""" # noqa: E501
month: Optional[AiLimit] = None
day: Optional[AiWindow] = None
month: Optional[AiWindow] = None
period_end: Optional[StrictStr] = None
period_start: Optional[StrictStr] = Field(default=None, description="PeriodStart and PeriodEnd bound the billing period (RFC3339).")
plan: Optional[StrictStr] = Field(default=None, description="Plan is the rung that covers AI (\"dev\", \"max-5x\", \"max-20x\", \"team\", \"team-annual\"), empty when the caller's plan covers none and they spend bought credit only.")
reset_available: Optional[StrictBool] = Field(default=None, description="ResetAvailable says the member can restart their session and weekly windows now; ResetExpiresAt is when an unused reset lapses (the period end).")
reset_expires_at: Optional[StrictStr] = None
session: Optional[AiLimit] = Field(default=None, description="Session, Weekly, WeeklyPremium and Month are the four windows. Month is the org's; the others are this member's.")
weekly: Optional[AiLimit] = None
weekly_premium: Optional[AiLimit] = None
__properties: ClassVar[List[str]] = ["month", "period_end", "period_start", "plan", "reset_available", "reset_expires_at", "session", "weekly", "weekly_premium"]
plan: Optional[StrictStr] = Field(default=None, description="Plan is the plan that covers Enso and Zen in the consumer apps (\"dev\", \"max-5x\", \"max-20x\", \"team\", \"team-annual\", \"agency\", \"advisory\", \"dedicated\"), empty when none does: the caller is on the free allowance.")
session: Optional[AiWindow] = Field(default=None, description="Session is the request window that starts at the first request after the last one ended; Day turns at midnight UTC; Month is the plan's included usage for the billing period. When Month is used up, Enso and Zen keep answering from free models.")
upgrade: Optional[StrictStr] = Field(default=None, description="Upgrade is the plan that raises these limits, absent when none does.")
__properties: ClassVar[List[str]] = ["day", "month", "period_end", "period_start", "plan", "session", "upgrade"]
model_config = ConfigDict(
populate_by_name=True,
@@ -77,18 +75,15 @@ class AiLimits(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of day
if self.day:
_dict['day'] = self.day.to_dict()
# override the default output from pydantic by calling `to_dict()` of month
if self.month:
_dict['month'] = self.month.to_dict()
# override the default output from pydantic by calling `to_dict()` of session
if self.session:
_dict['session'] = self.session.to_dict()
# override the default output from pydantic by calling `to_dict()` of weekly
if self.weekly:
_dict['weekly'] = self.weekly.to_dict()
# override the default output from pydantic by calling `to_dict()` of weekly_premium
if self.weekly_premium:
_dict['weekly_premium'] = self.weekly_premium.to_dict()
return _dict
@classmethod
@@ -101,15 +96,13 @@ class AiLimits(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"month": AiLimit.from_dict(obj["month"]) if obj.get("month") is not None else None,
"day": AiWindow.from_dict(obj["day"]) if obj.get("day") is not None else None,
"month": AiWindow.from_dict(obj["month"]) if obj.get("month") is not None else None,
"period_end": obj.get("period_end"),
"period_start": obj.get("period_start"),
"plan": obj.get("plan"),
"reset_available": obj.get("reset_available"),
"reset_expires_at": obj.get("reset_expires_at"),
"session": AiLimit.from_dict(obj["session"]) if obj.get("session") is not None else None,
"weekly": AiLimit.from_dict(obj["weekly"]) if obj.get("weekly") is not None else None,
"weekly_premium": AiLimit.from_dict(obj["weekly_premium"]) if obj.get("weekly_premium") is not None else None
"session": AiWindow.from_dict(obj["session"]) if obj.get("session") is not None else None,
"upgrade": obj.get("upgrade")
})
return _obj
@@ -22,14 +22,13 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AiLimit(BaseModel):
class AiWindow(BaseModel):
"""
AiLimit
AiWindow
""" # noqa: E501
limit_cents: Optional[StrictInt] = Field(default=None, description="LimitCents is what the plan covers in this window, in billed cents.")
resets_at: Optional[StrictStr] = Field(default=None, description="ResetsAt is when the window starts again (RFC3339), null for a session that is not running: it starts at the member's next priced call.")
used_cents: Optional[StrictInt] = Field(default=None, description="UsedCents is what the plan has covered in this window, in billed cents.")
__properties: ClassVar[List[str]] = ["limit_cents", "resets_at", "used_cents"]
percent: Optional[StrictInt] = Field(default=None, description="Percent is the share of the window used, 0 to 100, rounded up so any use shows.")
resets_at: Optional[StrictStr] = Field(default=None, description="ResetsAt is when the window starts again (RFC3339), null for a session that is not running: it starts at the next request.")
__properties: ClassVar[List[str]] = ["percent", "resets_at"]
model_config = ConfigDict(
populate_by_name=True,
@@ -49,7 +48,7 @@ class AiLimit(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AiLimit from a JSON string"""
"""Create an instance of AiWindow from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +73,7 @@ class AiLimit(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AiLimit from a dict"""
"""Create an instance of AiWindow from a dict"""
if obj is None:
return None
@@ -82,9 +81,8 @@ class AiLimit(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"limit_cents": obj.get("limit_cents"),
"resets_at": obj.get("resets_at"),
"used_cents": obj.get("used_cents")
"percent": obj.get("percent"),
"resets_at": obj.get("resets_at")
})
return _obj
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzoai"
version = "8.5.164"
version = "8.5.500"
description = "The official Python library for the Hanzo API"
dynamic = ["readme"]
license = "Apache-2.0"