client: regenerate from hanzo-inc/cloud@ffdcf5c42d (8.5.699)

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-10-09 19:09:02 +00:00
co-authored by Hanzo Dev
parent 4ffcf2bb1a
commit 527ba6ae03
29 changed files with 1849 additions and 687 deletions
+7 -4
View File
@@ -325,6 +325,7 @@ pkg/hanzoai/cloud/models/ask_source.py
pkg/hanzoai/cloud/models/ask_web_question.py
pkg/hanzoai/cloud/models/asset.py
pkg/hanzoai/cloud/models/audit.py
pkg/hanzoai/cloud/models/audit_act.py
pkg/hanzoai/cloud/models/audit_trail_page.py
pkg/hanzoai/cloud/models/audit_wire.py
pkg/hanzoai/cloud/models/author_author_repo.py
@@ -647,6 +648,7 @@ pkg/hanzoai/cloud/models/compliance_acc_list.py
pkg/hanzoai/cloud/models/compliance_acc_view.py
pkg/hanzoai/cloud/models/compliance_accreditation_decision.py
pkg/hanzoai/cloud/models/compliance_accreditation_req.py
pkg/hanzoai/cloud/models/compliance_act.py
pkg/hanzoai/cloud/models/compliance_audit_list.py
pkg/hanzoai/cloud/models/compliance_check_list.py
pkg/hanzoai/cloud/models/compliance_check_view.py
@@ -1029,10 +1031,11 @@ pkg/hanzoai/cloud/models/git_file_json.py
pkg/hanzoai/cloud/models/git_files_json.py
pkg/hanzoai/cloud/models/git_gc_out.py
pkg/hanzoai/cloud/models/git_job_view.py
pkg/hanzoai/cloud/models/git_key_list.py
pkg/hanzoai/cloud/models/git_key_view.py
pkg/hanzoai/cloud/models/git_link.py
pkg/hanzoai/cloud/models/git_link_all.py
pkg/hanzoai/cloud/models/git_link_req.py
pkg/hanzoai/cloud/models/git_linked.py
pkg/hanzoai/cloud/models/git_mirror_list.py
pkg/hanzoai/cloud/models/git_mirror_req.py
pkg/hanzoai/cloud/models/git_mirror_target_req.py
pkg/hanzoai/cloud/models/git_mirror_target_view.py
pkg/hanzoai/cloud/models/git_open_req.py
@@ -1049,7 +1052,6 @@ pkg/hanzoai/cloud/models/git_push_resp.py
pkg/hanzoai/cloud/models/git_readme_json.py
pkg/hanzoai/cloud/models/git_ref_json.py
pkg/hanzoai/cloud/models/git_refs_json.py
pkg/hanzoai/cloud/models/git_register_key_req.py
pkg/hanzoai/cloud/models/git_repo_list.py
pkg/hanzoai/cloud/models/git_repo_view.py
pkg/hanzoai/cloud/models/git_run_start.py
@@ -1060,6 +1062,7 @@ pkg/hanzoai/cloud/models/git_subscription_list.py
pkg/hanzoai/cloud/models/git_subscription_view.py
pkg/hanzoai/cloud/models/git_tree_entry_json.py
pkg/hanzoai/cloud/models/git_tree_json.py
pkg/hanzoai/cloud/models/git_unmatched.py
pkg/hanzoai/cloud/models/git_usage_repo.py
pkg/hanzoai/cloud/models/git_usage_view.py
pkg/hanzoai/cloud/models/git_workflow_list.py
+2 -2
View File
@@ -1,4 +1,4 @@
ref=1e531e42c6fbfc0ed491e26c2f0d2a4361b4c83c
sha256=c191586dca1c3ab6038dfdbef5750ea642e888c0239aff4f8a6878a2889fec19
ref=ffdcf5c42d8fe3f3a56e877ceeaf22bc10cc490e
sha256=b9e684c147b86f15504a86d81f9c382b782a2a6c72b8cc4b5b333100851dd1a2
repo=hanzo-inc/cloud
path=openapi.yaml
+14 -8
View File
@@ -347,6 +347,7 @@ __all__ = [
"AskWebQuestion",
"Asset",
"Audit",
"AuditAct",
"AuditTrailPage",
"AuditWire",
"AuthorAuthorRepo",
@@ -669,6 +670,7 @@ __all__ = [
"ComplianceAccView",
"ComplianceAccreditationDecision",
"ComplianceAccreditationReq",
"ComplianceAct",
"ComplianceAuditList",
"ComplianceCheckList",
"ComplianceCheckView",
@@ -1051,10 +1053,11 @@ __all__ = [
"GitFilesJSON",
"GitGcOut",
"GitJobView",
"GitKeyList",
"GitKeyView",
"GitLink",
"GitLinkAll",
"GitLinkReq",
"GitLinked",
"GitMirrorList",
"GitMirrorReq",
"GitMirrorTargetReq",
"GitMirrorTargetView",
"GitOpenReq",
@@ -1071,7 +1074,6 @@ __all__ = [
"GitReadmeJSON",
"GitRefJSON",
"GitRefsJSON",
"GitRegisterKeyReq",
"GitRepoList",
"GitRepoView",
"GitRunStart",
@@ -1082,6 +1084,7 @@ __all__ = [
"GitSubscriptionView",
"GitTreeEntryJSON",
"GitTreeJSON",
"GitUnmatched",
"GitUsageRepo",
"GitUsageView",
"GitWorkflowList",
@@ -3499,6 +3502,7 @@ from hanzoai.cloud.models.ask_source import AskSource as AskSource
from hanzoai.cloud.models.ask_web_question import AskWebQuestion as AskWebQuestion
from hanzoai.cloud.models.asset import Asset as Asset
from hanzoai.cloud.models.audit import Audit as Audit
from hanzoai.cloud.models.audit_act import AuditAct as AuditAct
from hanzoai.cloud.models.audit_trail_page import AuditTrailPage as AuditTrailPage
from hanzoai.cloud.models.audit_wire import AuditWire as AuditWire
from hanzoai.cloud.models.author_author_repo import AuthorAuthorRepo as AuthorAuthorRepo
@@ -3821,6 +3825,7 @@ from hanzoai.cloud.models.compliance_acc_list import ComplianceAccList as Compli
from hanzoai.cloud.models.compliance_acc_view import ComplianceAccView as ComplianceAccView
from hanzoai.cloud.models.compliance_accreditation_decision import ComplianceAccreditationDecision as ComplianceAccreditationDecision
from hanzoai.cloud.models.compliance_accreditation_req import ComplianceAccreditationReq as ComplianceAccreditationReq
from hanzoai.cloud.models.compliance_act import ComplianceAct as ComplianceAct
from hanzoai.cloud.models.compliance_audit_list import ComplianceAuditList as ComplianceAuditList
from hanzoai.cloud.models.compliance_check_list import ComplianceCheckList as ComplianceCheckList
from hanzoai.cloud.models.compliance_check_view import ComplianceCheckView as ComplianceCheckView
@@ -4203,10 +4208,11 @@ from hanzoai.cloud.models.git_file_json import GitFileJSON as GitFileJSON
from hanzoai.cloud.models.git_files_json import GitFilesJSON as GitFilesJSON
from hanzoai.cloud.models.git_gc_out import GitGcOut as GitGcOut
from hanzoai.cloud.models.git_job_view import GitJobView as GitJobView
from hanzoai.cloud.models.git_key_list import GitKeyList as GitKeyList
from hanzoai.cloud.models.git_key_view import GitKeyView as GitKeyView
from hanzoai.cloud.models.git_link import GitLink as GitLink
from hanzoai.cloud.models.git_link_all import GitLinkAll as GitLinkAll
from hanzoai.cloud.models.git_link_req import GitLinkReq as GitLinkReq
from hanzoai.cloud.models.git_linked import GitLinked as GitLinked
from hanzoai.cloud.models.git_mirror_list import GitMirrorList as GitMirrorList
from hanzoai.cloud.models.git_mirror_req import GitMirrorReq as GitMirrorReq
from hanzoai.cloud.models.git_mirror_target_req import GitMirrorTargetReq as GitMirrorTargetReq
from hanzoai.cloud.models.git_mirror_target_view import GitMirrorTargetView as GitMirrorTargetView
from hanzoai.cloud.models.git_open_req import GitOpenReq as GitOpenReq
@@ -4223,7 +4229,6 @@ from hanzoai.cloud.models.git_push_resp import GitPushResp as GitPushResp
from hanzoai.cloud.models.git_readme_json import GitReadmeJSON as GitReadmeJSON
from hanzoai.cloud.models.git_ref_json import GitRefJSON as GitRefJSON
from hanzoai.cloud.models.git_refs_json import GitRefsJSON as GitRefsJSON
from hanzoai.cloud.models.git_register_key_req import GitRegisterKeyReq as GitRegisterKeyReq
from hanzoai.cloud.models.git_repo_list import GitRepoList as GitRepoList
from hanzoai.cloud.models.git_repo_view import GitRepoView as GitRepoView
from hanzoai.cloud.models.git_run_start import GitRunStart as GitRunStart
@@ -4234,6 +4239,7 @@ from hanzoai.cloud.models.git_subscription_list import GitSubscriptionList as Gi
from hanzoai.cloud.models.git_subscription_view import GitSubscriptionView as GitSubscriptionView
from hanzoai.cloud.models.git_tree_entry_json import GitTreeEntryJSON as GitTreeEntryJSON
from hanzoai.cloud.models.git_tree_json import GitTreeJSON as GitTreeJSON
from hanzoai.cloud.models.git_unmatched import GitUnmatched as GitUnmatched
from hanzoai.cloud.models.git_usage_repo import GitUsageRepo as GitUsageRepo
from hanzoai.cloud.models.git_usage_view import GitUsageView as GitUsageView
from hanzoai.cloud.models.git_workflow_list import GitWorkflowList as GitWorkflowList
+505 -3
View File
@@ -340,6 +340,257 @@ class AgentApi:
@validate_call
def delete_agent_chat_conversations_by_id(
self,
id: StrictStr,
_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,
) -> None:
"""Delete one of your conversations
Removes the conversation for good: every turn of it, and every link it was shared by, which stops opening and leaves the lists of the people it was open to. Only the member who opened it may delete it; anyone else is answered 404, as for one that is not there. Every delete is written to the audit trail.
:param id: (required)
:type id: str
: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._delete_agent_chat_conversations_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 delete_agent_chat_conversations_by_id_with_http_info(
self,
id: StrictStr,
_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[None]:
"""Delete one of your conversations
Removes the conversation for good: every turn of it, and every link it was shared by, which stops opening and leaves the lists of the people it was open to. Only the member who opened it may delete it; anyone else is answered 404, as for one that is not there. Every delete is written to the audit trail.
:param id: (required)
:type id: str
: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._delete_agent_chat_conversations_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 delete_agent_chat_conversations_by_id_without_preload_content(
self,
id: StrictStr,
_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:
"""Delete one of your conversations
Removes the conversation for good: every turn of it, and every link it was shared by, which stops opening and leaves the lists of the people it was open to. Only the member who opened it may delete it; anyone else is answered 404, as for one that is not there. Every delete is written to the audit trail.
:param id: (required)
:type id: str
: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._delete_agent_chat_conversations_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _delete_agent_chat_conversations_by_id_serialize(
self,
id,
_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
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='DELETE',
resource_path='/v1/agent/chat/conversations/{id}',
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 delete_agent_chat_conversations_by_id_shares_by_share(
self,
@@ -3273,7 +3524,7 @@ class AgentApi:
) -> None:
"""List the agent threads in your org
Returns a summary of every agent conversation in the caller's org — id, derived title, and when it was last appended to — for populating a thread list. Scoped to the caller's org and nothing else, and that isolation is structural rather than a filter: conversations are persisted in a store opened PER ORG, so there is no query in which another tenant's threads could appear. A validated principal with a non-empty org is required: 401 without a principal, 403 without an org.
Returns a summary of every agent conversation in the caller's org — id, title, when it was last appended to, and whether it is pinned or archived — for populating a thread list: pinned first, then most recent. Archived conversations are left out; `?archived=true` lists them alone. Scoped to the caller's org and nothing else, and that isolation is structural rather than a filter: conversations are persisted in a store opened PER ORG, so there is no query in which another tenant's threads could appear. A validated principal with a non-empty org is required: 401 without a principal, 403 without an org.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -3335,7 +3586,7 @@ class AgentApi:
) -> ApiResponse[None]:
"""List the agent threads in your org
Returns a summary of every agent conversation in the caller's org — id, derived title, and when it was last appended to — for populating a thread list. Scoped to the caller's org and nothing else, and that isolation is structural rather than a filter: conversations are persisted in a store opened PER ORG, so there is no query in which another tenant's threads could appear. A validated principal with a non-empty org is required: 401 without a principal, 403 without an org.
Returns a summary of every agent conversation in the caller's org — id, title, when it was last appended to, and whether it is pinned or archived — for populating a thread list: pinned first, then most recent. Archived conversations are left out; `?archived=true` lists them alone. Scoped to the caller's org and nothing else, and that isolation is structural rather than a filter: conversations are persisted in a store opened PER ORG, so there is no query in which another tenant's threads could appear. A validated principal with a non-empty org is required: 401 without a principal, 403 without an org.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -3397,7 +3648,7 @@ class AgentApi:
) -> RESTResponseType:
"""List the agent threads in your org
Returns a summary of every agent conversation in the caller's org — id, derived title, and when it was last appended to — for populating a thread list. Scoped to the caller's org and nothing else, and that isolation is structural rather than a filter: conversations are persisted in a store opened PER ORG, so there is no query in which another tenant's threads could appear. A validated principal with a non-empty org is required: 401 without a principal, 403 without an org.
Returns a summary of every agent conversation in the caller's org — id, title, when it was last appended to, and whether it is pinned or archived — for populating a thread list: pinned first, then most recent. Archived conversations are left out; `?archived=true` lists them alone. Scoped to the caller's org and nothing else, and that isolation is structural rather than a filter: conversations are persisted in a store opened PER ORG, so there is no query in which another tenant's threads could appear. A validated principal with a non-empty org is required: 401 without a principal, 403 without an org.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -9062,6 +9313,257 @@ class AgentApi:
@validate_call
def patch_agent_chat_conversations_by_id(
self,
id: StrictStr,
_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,
) -> None:
"""Rename, pin or archive one of your conversations
Takes `{title?, pinned?, archived?}` and changes what it names, leaving the rest; a body naming none is refused 400, and so is an empty title. A title is cut to one line of at most 80 characters. Answers the conversation as the list does — id, title, updatedAt, pinned, archived — and the change does not move `updatedAt`, which stays when it was last spoken in. The list puts pinned conversations first and leaves archived ones out; `?archived=true` lists those alone. Only the member who opened the conversation may change it; another member's, another org's, and one recorded with no member answer 404. Every change is written to the audit trail.
:param id: (required)
:type id: str
: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._patch_agent_chat_conversations_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 patch_agent_chat_conversations_by_id_with_http_info(
self,
id: StrictStr,
_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[None]:
"""Rename, pin or archive one of your conversations
Takes `{title?, pinned?, archived?}` and changes what it names, leaving the rest; a body naming none is refused 400, and so is an empty title. A title is cut to one line of at most 80 characters. Answers the conversation as the list does — id, title, updatedAt, pinned, archived — and the change does not move `updatedAt`, which stays when it was last spoken in. The list puts pinned conversations first and leaves archived ones out; `?archived=true` lists those alone. Only the member who opened the conversation may change it; another member's, another org's, and one recorded with no member answer 404. Every change is written to the audit trail.
:param id: (required)
:type id: str
: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._patch_agent_chat_conversations_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 patch_agent_chat_conversations_by_id_without_preload_content(
self,
id: StrictStr,
_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:
"""Rename, pin or archive one of your conversations
Takes `{title?, pinned?, archived?}` and changes what it names, leaving the rest; a body naming none is refused 400, and so is an empty title. A title is cut to one line of at most 80 characters. Answers the conversation as the list does — id, title, updatedAt, pinned, archived — and the change does not move `updatedAt`, which stays when it was last spoken in. The list puts pinned conversations first and leaves archived ones out; `?archived=true` lists those alone. Only the member who opened the conversation may change it; another member's, another org's, and one recorded with no member answer 404. Every change is written to the audit trail.
:param id: (required)
:type id: str
: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._patch_agent_chat_conversations_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _patch_agent_chat_conversations_by_id_serialize(
self,
id,
_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
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='PATCH',
resource_path='/v1/agent/chat/conversations/{id}',
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 patch_agent_sessions_by_id(
self,
+528 -9
View File
@@ -1212,6 +1212,7 @@ class AiApi:
var_class: Annotated[Optional[StrictStr], Field(description="Class keeps one class: premium (third-party frontier models), ours (Hanzo's priced models) or free.")] = None,
family: Annotated[Optional[StrictStr], Field(description="Family keeps one Hanzo family: enso, zen, kai or zoo.")] = None,
capability: Annotated[Optional[StrictStr], Field(description="Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).")] = None,
free: Annotated[Optional[StrictBool], Field(description="Free keeps the models a call to which bills nothing (bounded by the free allowances instead of a balance).")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit is the most models to answer, 1 to 500; 0 answers 50.")] = None,
_request_timeout: Union[
None,
@@ -1226,9 +1227,9 @@ class AiApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AiModels:
"""Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model's price), context window and capabilities.
"""Searches the model catalog — the one GET /v1/models lists, every OpenRouter model among it as last synced — by text, class, family, capability or free, and answers each match with its class, family, whether it is free, its list price (per token and per million; variable for a router billed at the answering model's price; a resold model's every vendor rate and conditional rate as billed), context window, output bound, expiry and capabilities.
Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model's price), context window and capabilities.
Searches the model catalog — the one GET /v1/models lists, every OpenRouter model among it as last synced — by text, class, family, capability or free, and answers each match with its class, family, whether it is free, its list price (per token and per million; variable for a router billed at the answering model's price; a resold model's every vendor rate and conditional rate as billed), context window, output bound, expiry and capabilities.
:param q: Q matches the model's id, name, description or owner, ignoring case.
:type q: str
@@ -1238,6 +1239,8 @@ class AiApi:
:type family: str
:param capability: Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
:type capability: str
:param free: Free keeps the models a call to which bills nothing (bounded by the free allowances instead of a balance).
:type free: bool
:param limit: Limit is the most models to answer, 1 to 500; 0 answers 50.
:type limit: int
:param _request_timeout: timeout setting for this request. If one
@@ -1267,6 +1270,7 @@ class AiApi:
var_class=var_class,
family=family,
capability=capability,
free=free,
limit=limit,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -1295,6 +1299,7 @@ class AiApi:
var_class: Annotated[Optional[StrictStr], Field(description="Class keeps one class: premium (third-party frontier models), ours (Hanzo's priced models) or free.")] = None,
family: Annotated[Optional[StrictStr], Field(description="Family keeps one Hanzo family: enso, zen, kai or zoo.")] = None,
capability: Annotated[Optional[StrictStr], Field(description="Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).")] = None,
free: Annotated[Optional[StrictBool], Field(description="Free keeps the models a call to which bills nothing (bounded by the free allowances instead of a balance).")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit is the most models to answer, 1 to 500; 0 answers 50.")] = None,
_request_timeout: Union[
None,
@@ -1309,9 +1314,9 @@ class AiApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AiModels]:
"""Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model's price), context window and capabilities.
"""Searches the model catalog — the one GET /v1/models lists, every OpenRouter model among it as last synced — by text, class, family, capability or free, and answers each match with its class, family, whether it is free, its list price (per token and per million; variable for a router billed at the answering model's price; a resold model's every vendor rate and conditional rate as billed), context window, output bound, expiry and capabilities.
Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model's price), context window and capabilities.
Searches the model catalog — the one GET /v1/models lists, every OpenRouter model among it as last synced — by text, class, family, capability or free, and answers each match with its class, family, whether it is free, its list price (per token and per million; variable for a router billed at the answering model's price; a resold model's every vendor rate and conditional rate as billed), context window, output bound, expiry and capabilities.
:param q: Q matches the model's id, name, description or owner, ignoring case.
:type q: str
@@ -1321,6 +1326,8 @@ class AiApi:
:type family: str
:param capability: Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
:type capability: str
:param free: Free keeps the models a call to which bills nothing (bounded by the free allowances instead of a balance).
:type free: bool
:param limit: Limit is the most models to answer, 1 to 500; 0 answers 50.
:type limit: int
:param _request_timeout: timeout setting for this request. If one
@@ -1350,6 +1357,7 @@ class AiApi:
var_class=var_class,
family=family,
capability=capability,
free=free,
limit=limit,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -1378,6 +1386,7 @@ class AiApi:
var_class: Annotated[Optional[StrictStr], Field(description="Class keeps one class: premium (third-party frontier models), ours (Hanzo's priced models) or free.")] = None,
family: Annotated[Optional[StrictStr], Field(description="Family keeps one Hanzo family: enso, zen, kai or zoo.")] = None,
capability: Annotated[Optional[StrictStr], Field(description="Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).")] = None,
free: Annotated[Optional[StrictBool], Field(description="Free keeps the models a call to which bills nothing (bounded by the free allowances instead of a balance).")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit is the most models to answer, 1 to 500; 0 answers 50.")] = None,
_request_timeout: Union[
None,
@@ -1392,9 +1401,9 @@ class AiApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model's price), context window and capabilities.
"""Searches the model catalog — the one GET /v1/models lists, every OpenRouter model among it as last synced — by text, class, family, capability or free, and answers each match with its class, family, whether it is free, its list price (per token and per million; variable for a router billed at the answering model's price; a resold model's every vendor rate and conditional rate as billed), context window, output bound, expiry and capabilities.
Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model's price), context window and capabilities.
Searches the model catalog — the one GET /v1/models lists, every OpenRouter model among it as last synced — by text, class, family, capability or free, and answers each match with its class, family, whether it is free, its list price (per token and per million; variable for a router billed at the answering model's price; a resold model's every vendor rate and conditional rate as billed), context window, output bound, expiry and capabilities.
:param q: Q matches the model's id, name, description or owner, ignoring case.
:type q: str
@@ -1404,6 +1413,8 @@ class AiApi:
:type family: str
:param capability: Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
:type capability: str
:param free: Free keeps the models a call to which bills nothing (bounded by the free allowances instead of a balance).
:type free: bool
:param limit: Limit is the most models to answer, 1 to 500; 0 answers 50.
:type limit: int
:param _request_timeout: timeout setting for this request. If one
@@ -1433,6 +1444,7 @@ class AiApi:
var_class=var_class,
family=family,
capability=capability,
free=free,
limit=limit,
_request_auth=_request_auth,
_content_type=_content_type,
@@ -1456,6 +1468,7 @@ class AiApi:
var_class,
family,
capability,
free,
limit,
_request_auth,
_content_type,
@@ -1495,6 +1508,10 @@ class AiApi:
_query_params.append(('capability', capability))
if free is not None:
_query_params.append(('free', free))
if limit is not None:
_query_params.append(('limit', limit))
@@ -41573,6 +41590,508 @@ class AiApi:
@validate_call
def get_models_vendors_by_vendor(
self,
vendor: StrictStr,
_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,
) -> None:
"""Lists every model a vendor lists now, each entry exactly as the vendor listed it (prices, context, output bound, modalities, parameters, created, expiration), and when the list was last synced.
Lists every model a vendor lists now, each entry exactly as the vendor listed it (prices, context, output bound, modalities, parameters, created, expiration), and when the list was last synced. ?free=1 keeps the models the vendor charges nothing for. Public, as the vendor's own list is: the free lane reads it in place of the vendor's.
:param vendor: (required)
:type vendor: str
: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._get_models_vendors_by_vendor_serialize(
vendor=vendor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get_models_vendors_by_vendor_with_http_info(
self,
vendor: StrictStr,
_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[None]:
"""Lists every model a vendor lists now, each entry exactly as the vendor listed it (prices, context, output bound, modalities, parameters, created, expiration), and when the list was last synced.
Lists every model a vendor lists now, each entry exactly as the vendor listed it (prices, context, output bound, modalities, parameters, created, expiration), and when the list was last synced. ?free=1 keeps the models the vendor charges nothing for. Public, as the vendor's own list is: the free lane reads it in place of the vendor's.
:param vendor: (required)
:type vendor: str
: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._get_models_vendors_by_vendor_serialize(
vendor=vendor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get_models_vendors_by_vendor_without_preload_content(
self,
vendor: StrictStr,
_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:
"""Lists every model a vendor lists now, each entry exactly as the vendor listed it (prices, context, output bound, modalities, parameters, created, expiration), and when the list was last synced.
Lists every model a vendor lists now, each entry exactly as the vendor listed it (prices, context, output bound, modalities, parameters, created, expiration), and when the list was last synced. ?free=1 keeps the models the vendor charges nothing for. Public, as the vendor's own list is: the free lane reads it in place of the vendor's.
:param vendor: (required)
:type vendor: str
: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._get_models_vendors_by_vendor_serialize(
vendor=vendor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_models_vendors_by_vendor_serialize(
self,
vendor,
_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
if vendor is not None:
_path_params['vendor'] = vendor
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/models/vendors/{vendor}',
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 get_models_vendors_by_vendor_events(
self,
vendor: StrictStr,
_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,
) -> None:
"""Lists the changes syncs read in a vendor's model list, newest first.
Lists the changes syncs read in a vendor's model list, newest first. Each is new, back, gone, price, free (was priced, now free) or paid (was free, now priced), with the price list before and after. ?id= keeps one model's; ?limit= bounds the rows (100, at most 1000).
:param vendor: (required)
:type vendor: str
: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._get_models_vendors_by_vendor_events_serialize(
vendor=vendor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get_models_vendors_by_vendor_events_with_http_info(
self,
vendor: StrictStr,
_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[None]:
"""Lists the changes syncs read in a vendor's model list, newest first.
Lists the changes syncs read in a vendor's model list, newest first. Each is new, back, gone, price, free (was priced, now free) or paid (was free, now priced), with the price list before and after. ?id= keeps one model's; ?limit= bounds the rows (100, at most 1000).
:param vendor: (required)
:type vendor: str
: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._get_models_vendors_by_vendor_events_serialize(
vendor=vendor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get_models_vendors_by_vendor_events_without_preload_content(
self,
vendor: StrictStr,
_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:
"""Lists the changes syncs read in a vendor's model list, newest first.
Lists the changes syncs read in a vendor's model list, newest first. Each is new, back, gone, price, free (was priced, now free) or paid (was free, now priced), with the price list before and after. ?id= keeps one model's; ?limit= bounds the rows (100, at most 1000).
:param vendor: (required)
:type vendor: str
: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._get_models_vendors_by_vendor_events_serialize(
vendor=vendor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_models_vendors_by_vendor_events_serialize(
self,
vendor,
_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
if vendor is not None:
_path_params['vendor'] = vendor
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/models/vendors/{vendor}/events',
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 get_videos_by_id(
self,
@@ -73394,7 +73913,7 @@ class AiApi:
) -> AiDecisionsResponse:
"""Implements POST /v1/decisions (the Decisions API).
Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai's versioned id kai-<12 hex of the weights' sha256> — priced as kai and sent as asked — or Jev by OpenRouter's vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev's list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, '.', '_' and '-'. A handle belongs to the org that observed it: no other org's request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request's text counted once, the state once and each question's instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint's reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer's input tokens at the model's price.
Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"boolean\"|\"choice\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai's versioned id kai-<12 hex of the weights' sha256> — priced as kai and sent as asked — or Jev by OpenRouter's vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev's list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. A boolean is a yes/no probability, answered {\"type\": \"boolean\", \"probability\": p}. noul is accepted as Jev's spelling of it and answered in Jev's shape, {\"type\": \"noul\", \"noul\": p}; an older Kai adds confidence and answer_confidence to a noul's. A boolean carries no confidence. Jev is asked a boolean as a noul, and its answer comes back as exactly the boolean. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, '.', '_' and '-'. A handle belongs to the org that observed it: no other org's request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request's text counted once, the state once and each question's instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint's reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer's input tokens at the model's price.
:param ai_decisions_request: (required)
:type ai_decisions_request: AiDecisionsRequest
@@ -73470,7 +73989,7 @@ class AiApi:
) -> ApiResponse[AiDecisionsResponse]:
"""Implements POST /v1/decisions (the Decisions API).
Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai's versioned id kai-<12 hex of the weights' sha256> — priced as kai and sent as asked — or Jev by OpenRouter's vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev's list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, '.', '_' and '-'. A handle belongs to the org that observed it: no other org's request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request's text counted once, the state once and each question's instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint's reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer's input tokens at the model's price.
Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"boolean\"|\"choice\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai's versioned id kai-<12 hex of the weights' sha256> — priced as kai and sent as asked — or Jev by OpenRouter's vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev's list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. A boolean is a yes/no probability, answered {\"type\": \"boolean\", \"probability\": p}. noul is accepted as Jev's spelling of it and answered in Jev's shape, {\"type\": \"noul\", \"noul\": p}; an older Kai adds confidence and answer_confidence to a noul's. A boolean carries no confidence. Jev is asked a boolean as a noul, and its answer comes back as exactly the boolean. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, '.', '_' and '-'. A handle belongs to the org that observed it: no other org's request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request's text counted once, the state once and each question's instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint's reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer's input tokens at the model's price.
:param ai_decisions_request: (required)
:type ai_decisions_request: AiDecisionsRequest
@@ -73546,7 +74065,7 @@ class AiApi:
) -> RESTResponseType:
"""Implements POST /v1/decisions (the Decisions API).
Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai's versioned id kai-<12 hex of the weights' sha256> — priced as kai and sent as asked — or Jev by OpenRouter's vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev's list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, '.', '_' and '-'. A handle belongs to the org that observed it: no other org's request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request's text counted once, the state once and each question's instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint's reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer's input tokens at the model's price.
Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"boolean\"|\"choice\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai's versioned id kai-<12 hex of the weights' sha256> — priced as kai and sent as asked — or Jev by OpenRouter's vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev's list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. A boolean is a yes/no probability, answered {\"type\": \"boolean\", \"probability\": p}. noul is accepted as Jev's spelling of it and answered in Jev's shape, {\"type\": \"noul\", \"noul\": p}; an older Kai adds confidence and answer_confidence to a noul's. A boolean carries no confidence. Jev is asked a boolean as a noul, and its answer comes back as exactly the boolean. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, '.', '_' and '-'. A handle belongs to the org that observed it: no other org's request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request's text counted once, the state once and each question's instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint's reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer's input tokens at the model's price.
:param ai_decisions_request: (required)
:type ai_decisions_request: AiDecisionsRequest
+60 -9
View File
@@ -901,6 +901,7 @@ class EventApi:
def get_event_insights_events(
self,
limit: Annotated[Optional[StrictInt], Field(description="Limit is how many rows to return, newest first. Default 50, maximum 200; a value at or below zero, or one that is not a number, takes the default.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events to return against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -916,10 +917,12 @@ class EventApi:
) -> EventEventList:
"""Returns the caller org's most recent product events, newest first.
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture endpoints fill — one row per stored event, with the row's attributes returned as the properties object. The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 401 without a validated bearer, 503 when the warehouse is unreachable.
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture endpoints fill — one row per stored event, with the row's attributes returned as the properties object. What a platform operator did acting as someone else is left out unless impersonated asks for it; such a row carries impersonated and impersonated_by in its properties. The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 401 without a validated bearer, 400 on an unknown impersonated value, 503 when the warehouse is unreachable.
:param limit: Limit is how many rows to return, newest first. Default 50, maximum 200; a value at or below zero, or one that is not a number, takes the default.
:type limit: int
:param impersonated: Impersonated is which events to return against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -944,6 +947,7 @@ class EventApi:
_param = self._get_event_insights_events_serialize(
limit=limit,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -968,6 +972,7 @@ class EventApi:
def get_event_insights_events_with_http_info(
self,
limit: Annotated[Optional[StrictInt], Field(description="Limit is how many rows to return, newest first. Default 50, maximum 200; a value at or below zero, or one that is not a number, takes the default.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events to return against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -983,10 +988,12 @@ class EventApi:
) -> ApiResponse[EventEventList]:
"""Returns the caller org's most recent product events, newest first.
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture endpoints fill — one row per stored event, with the row's attributes returned as the properties object. The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 401 without a validated bearer, 503 when the warehouse is unreachable.
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture endpoints fill — one row per stored event, with the row's attributes returned as the properties object. What a platform operator did acting as someone else is left out unless impersonated asks for it; such a row carries impersonated and impersonated_by in its properties. The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 401 without a validated bearer, 400 on an unknown impersonated value, 503 when the warehouse is unreachable.
:param limit: Limit is how many rows to return, newest first. Default 50, maximum 200; a value at or below zero, or one that is not a number, takes the default.
:type limit: int
:param impersonated: Impersonated is which events to return against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -1011,6 +1018,7 @@ class EventApi:
_param = self._get_event_insights_events_serialize(
limit=limit,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1035,6 +1043,7 @@ class EventApi:
def get_event_insights_events_without_preload_content(
self,
limit: Annotated[Optional[StrictInt], Field(description="Limit is how many rows to return, newest first. Default 50, maximum 200; a value at or below zero, or one that is not a number, takes the default.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events to return against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -1050,10 +1059,12 @@ class EventApi:
) -> RESTResponseType:
"""Returns the caller org's most recent product events, newest first.
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture endpoints fill — one row per stored event, with the row's attributes returned as the properties object. The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 401 without a validated bearer, 503 when the warehouse is unreachable.
Returns the caller org's most recent product events, newest first. The console's raw-event view over event.event — the same table the capture endpoints fill — one row per stored event, with the row's attributes returned as the properties object. What a platform operator did acting as someone else is left out unless impersonated asks for it; such a row carries impersonated and impersonated_by in its properties. The org is the validated principal's — never a parameter — and a read requires a real bearer, never the write-only publishable key. 401 without a validated bearer, 400 on an unknown impersonated value, 503 when the warehouse is unreachable.
:param limit: Limit is how many rows to return, newest first. Default 50, maximum 200; a value at or below zero, or one that is not a number, takes the default.
:type limit: int
:param impersonated: Impersonated is which events to return against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -1078,6 +1089,7 @@ class EventApi:
_param = self._get_event_insights_events_serialize(
limit=limit,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1097,6 +1109,7 @@ class EventApi:
def _get_event_insights_events_serialize(
self,
limit,
impersonated,
_request_auth,
_content_type,
_headers,
@@ -1123,6 +1136,10 @@ class EventApi:
_query_params.append(('limit', limit))
if impersonated is not None:
_query_params.append(('impersonated', impersonated))
# process the header parameters
# process the form parameters
# process the body parameter
@@ -1414,6 +1431,7 @@ class EventApi:
range: Annotated[Optional[StrictStr], Field(description="Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.")] = None,
start: Annotated[Optional[StrictStr], Field(description="Start is the inclusive lower bound of a custom window, RFC3339. Requires end.")] = None,
end: Annotated[Optional[StrictStr], Field(description="End is the exclusive upper bound of a custom window, RFC3339. Requires start.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -1429,7 +1447,7 @@ class EventApi:
) -> EventOverview:
"""Returns the caller org's analytics KPIs for one time window.
Returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet. The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 401 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet. The web and commerce lenses count the tenant's own traffic: what a platform operator did while acting as someone else is left out unless impersonated asks for it (include, or only). The LLM lens reads the usage ledger, which carries no such mark, and counts every call. The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 401 without a validated bearer, 400 on an unknown range or impersonated value, 503 when the warehouse is unreachable.
:param range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.
:type range: str
@@ -1437,6 +1455,8 @@ class EventApi:
:type start: str
:param end: End is the exclusive upper bound of a custom window, RFC3339. Requires start.
:type end: str
:param impersonated: Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -1463,6 +1483,7 @@ class EventApi:
range=range,
start=start,
end=end,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1489,6 +1510,7 @@ class EventApi:
range: Annotated[Optional[StrictStr], Field(description="Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.")] = None,
start: Annotated[Optional[StrictStr], Field(description="Start is the inclusive lower bound of a custom window, RFC3339. Requires end.")] = None,
end: Annotated[Optional[StrictStr], Field(description="End is the exclusive upper bound of a custom window, RFC3339. Requires start.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -1504,7 +1526,7 @@ class EventApi:
) -> ApiResponse[EventOverview]:
"""Returns the caller org's analytics KPIs for one time window.
Returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet. The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 401 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet. The web and commerce lenses count the tenant's own traffic: what a platform operator did while acting as someone else is left out unless impersonated asks for it (include, or only). The LLM lens reads the usage ledger, which carries no such mark, and counts every call. The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 401 without a validated bearer, 400 on an unknown range or impersonated value, 503 when the warehouse is unreachable.
:param range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.
:type range: str
@@ -1512,6 +1534,8 @@ class EventApi:
:type start: str
:param end: End is the exclusive upper bound of a custom window, RFC3339. Requires start.
:type end: str
:param impersonated: Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -1538,6 +1562,7 @@ class EventApi:
range=range,
start=start,
end=end,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1564,6 +1589,7 @@ class EventApi:
range: Annotated[Optional[StrictStr], Field(description="Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.")] = None,
start: Annotated[Optional[StrictStr], Field(description="Start is the inclusive lower bound of a custom window, RFC3339. Requires end.")] = None,
end: Annotated[Optional[StrictStr], Field(description="End is the exclusive upper bound of a custom window, RFC3339. Requires start.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -1579,7 +1605,7 @@ class EventApi:
) -> RESTResponseType:
"""Returns the caller org's analytics KPIs for one time window.
Returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet. The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 401 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Returns the caller org's analytics KPIs for one time window. Three lenses over one warehouse: llm is the live per-org LLM usage ledger (requests, tokens, spend, models, providers, errors) and is always real; web (pageviews, visitors, sessions) and commerce (orders, revenue, AOV) read the product-event table and report available=false rather than fabricating zeros when it holds nothing yet. The web and commerce lenses count the tenant's own traffic: what a platform operator did while acting as someone else is left out unless impersonated asks for it (include, or only). The LLM lens reads the usage ledger, which carries no such mark, and counts every call. The org is the validated principal's — never a parameter — so a caller can only ever read its own tenant. 401 without a validated bearer, 400 on an unknown range or impersonated value, 503 when the warehouse is unreachable.
:param range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.
:type range: str
@@ -1587,6 +1613,8 @@ class EventApi:
:type start: str
:param end: End is the exclusive upper bound of a custom window, RFC3339. Requires start.
:type end: str
:param impersonated: Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -1613,6 +1641,7 @@ class EventApi:
range=range,
start=start,
end=end,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -1634,6 +1663,7 @@ class EventApi:
range,
start,
end,
impersonated,
_request_auth,
_content_type,
_headers,
@@ -1668,6 +1698,10 @@ class EventApi:
_query_params.append(('end', end))
if impersonated is not None:
_query_params.append(('impersonated', impersonated))
# process the header parameters
# process the form parameters
# process the body parameter
@@ -2518,6 +2552,7 @@ class EventApi:
start: Annotated[Optional[StrictStr], Field(description="Start is the inclusive lower bound of a custom window, RFC3339. Requires end.")] = None,
end: Annotated[Optional[StrictStr], Field(description="End is the exclusive upper bound of a custom window, RFC3339. Requires start.")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2533,7 +2568,7 @@ class EventApi:
) -> EventTop:
"""Returns the caller org's ranked lenses for one window, five of them at once.
Returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains (\"(direct)\" for a missing or same-origin one) and topSources the utm_source campaigns (\"(none)\" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet. The org is the validated principal's — never a parameter. 401 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains (\"(direct)\" for a missing or same-origin one) and topSources the utm_source campaigns (\"(none)\" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet, and count the tenant's own traffic: what a platform operator did acting as someone else is left out unless impersonated asks for it (include, or only). Models reads the usage ledger, which carries no such mark. The org is the validated principal's — never a parameter. 401 without a validated bearer, 400 on an unknown range or impersonated value, 503 when the warehouse is unreachable.
:param range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.
:type range: str
@@ -2543,6 +2578,8 @@ class EventApi:
:type end: str
:param limit: Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.
:type limit: int
:param impersonated: Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -2570,6 +2607,7 @@ class EventApi:
start=start,
end=end,
limit=limit,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2597,6 +2635,7 @@ class EventApi:
start: Annotated[Optional[StrictStr], Field(description="Start is the inclusive lower bound of a custom window, RFC3339. Requires end.")] = None,
end: Annotated[Optional[StrictStr], Field(description="End is the exclusive upper bound of a custom window, RFC3339. Requires start.")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2612,7 +2651,7 @@ class EventApi:
) -> ApiResponse[EventTop]:
"""Returns the caller org's ranked lenses for one window, five of them at once.
Returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains (\"(direct)\" for a missing or same-origin one) and topSources the utm_source campaigns (\"(none)\" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet. The org is the validated principal's — never a parameter. 401 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains (\"(direct)\" for a missing or same-origin one) and topSources the utm_source campaigns (\"(none)\" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet, and count the tenant's own traffic: what a platform operator did acting as someone else is left out unless impersonated asks for it (include, or only). Models reads the usage ledger, which carries no such mark. The org is the validated principal's — never a parameter. 401 without a validated bearer, 400 on an unknown range or impersonated value, 503 when the warehouse is unreachable.
:param range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.
:type range: str
@@ -2622,6 +2661,8 @@ class EventApi:
:type end: str
:param limit: Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.
:type limit: int
:param impersonated: Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -2649,6 +2690,7 @@ class EventApi:
start=start,
end=end,
limit=limit,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2676,6 +2718,7 @@ class EventApi:
start: Annotated[Optional[StrictStr], Field(description="Start is the inclusive lower bound of a custom window, RFC3339. Requires end.")] = None,
end: Annotated[Optional[StrictStr], Field(description="End is the exclusive upper bound of a custom window, RFC3339. Requires start.")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.")] = None,
impersonated: Annotated[Optional[StrictStr], Field(description="Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -2691,7 +2734,7 @@ class EventApi:
) -> RESTResponseType:
"""Returns the caller org's ranked lenses for one window, five of them at once.
Returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains (\"(direct)\" for a missing or same-origin one) and topSources the utm_source campaigns (\"(none)\" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet. The org is the validated principal's — never a parameter. 401 without a validated bearer, 400 on an unknown range, 503 when the warehouse is unreachable.
Returns the caller org's ranked lenses for one window, five of them at once. models ranks LLM models by spend and is always real; products ranks commerce orders by revenue; topPages ranks requested paths, topReferrers the external referrer domains (\"(direct)\" for a missing or same-origin one) and topSources the utm_source campaigns (\"(none)\" when absent), each by pageviews. Every lens carries each row's share of the in-window total, so a top-N honestly shows the long tail. The four event lenses report available=false rather than fabricating zeros when the product-event table holds nothing yet, and count the tenant's own traffic: what a platform operator did acting as someone else is left out unless impersonated asks for it (include, or only). Models reads the usage ledger, which carries no such mark. The org is the validated principal's — never a parameter. 401 without a validated bearer, 400 on an unknown range or impersonated value, 503 when the warehouse is unreachable.
:param range: Range is a relative window: a count and a unit — 24h, 7d, 90d, any <N>h or <N>d — or day, week, month, all. Default 24h. Ignored when both start and end are given. An unknown value, or one past the 730-day horizon, is a 400.
:type range: str
@@ -2701,6 +2744,8 @@ class EventApi:
:type end: str
:param limit: Limit bounds every ranked lens in the response. Default 10, maximum 100; a value at or below zero, or one that is not a number, takes the default.
:type limit: int
:param impersonated: Impersonated is which events the product-event lenses count against the mark a platform operator leaves acting as someone else: exclude (the default, the tenant's own traffic), include, or only. Anything else is a 400.
:type impersonated: str
: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
@@ -2728,6 +2773,7 @@ class EventApi:
start=start,
end=end,
limit=limit,
impersonated=impersonated,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -2750,6 +2796,7 @@ class EventApi:
start,
end,
limit,
impersonated,
_request_auth,
_content_type,
_headers,
@@ -2788,6 +2835,10 @@ class EventApi:
_query_params.append(('limit', limit))
if impersonated is not None:
_query_params.append(('impersonated', impersonated))
# process the header parameters
# process the form parameters
# process the body parameter
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -10469,9 +10469,9 @@ class IamApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> IamKeysListResponse:
"""Returns an organization's API keys, newest first — what each is called, what it may reach, its publishable half, and when it was last used.
"""Returns the API keys of an organization that you may see, newest first — what each is called, what it may reach, its publishable half, and when it was last used.
Returns an organization's API keys, newest first — what each is called, what it may reach, its publishable half, and when it was last used. Secret halves are never listed. Which organization comes from your credentials, not from the request: you read your own and no one else's. The capability that admits a confidential client to this collection does not itself name a tenant, so the tenant is decided here.
Returns the API keys of an organization that you may see, newest first — what each is called, what it may reach, its publishable half, and when it was last used. Secret halves are never listed. Which keys come from your credentials, not from the request. You may name an organization you belong to: its admin sees every key it holds, and a member sees the keys they hold there. Naming any other organization is refused.
:param owner:
:type owner: str
@@ -10537,9 +10537,9 @@ class IamApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[IamKeysListResponse]:
"""Returns an organization's API keys, newest first — what each is called, what it may reach, its publishable half, and when it was last used.
"""Returns the API keys of an organization that you may see, newest first — what each is called, what it may reach, its publishable half, and when it was last used.
Returns an organization's API keys, newest first — what each is called, what it may reach, its publishable half, and when it was last used. Secret halves are never listed. Which organization comes from your credentials, not from the request: you read your own and no one else's. The capability that admits a confidential client to this collection does not itself name a tenant, so the tenant is decided here.
Returns the API keys of an organization that you may see, newest first — what each is called, what it may reach, its publishable half, and when it was last used. Secret halves are never listed. Which keys come from your credentials, not from the request. You may name an organization you belong to: its admin sees every key it holds, and a member sees the keys they hold there. Naming any other organization is refused.
:param owner:
:type owner: str
@@ -10605,9 +10605,9 @@ class IamApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Returns an organization's API keys, newest first — what each is called, what it may reach, its publishable half, and when it was last used.
"""Returns the API keys of an organization that you may see, newest first — what each is called, what it may reach, its publishable half, and when it was last used.
Returns an organization's API keys, newest first — what each is called, what it may reach, its publishable half, and when it was last used. Secret halves are never listed. Which organization comes from your credentials, not from the request: you read your own and no one else's. The capability that admits a confidential client to this collection does not itself name a tenant, so the tenant is decided here.
Returns the API keys of an organization that you may see, newest first — what each is called, what it may reach, its publishable half, and when it was last used. Secret halves are never listed. Which keys come from your credentials, not from the request. You may name an organization you belong to: its admin sees every key it holds, and a member sees the keys they hold there. Naming any other organization is refused.
:param owner:
:type owner: str
+7 -4
View File
@@ -209,6 +209,7 @@ from hanzoai.cloud.models.ask_source import AskSource
from hanzoai.cloud.models.ask_web_question import AskWebQuestion
from hanzoai.cloud.models.asset import Asset
from hanzoai.cloud.models.audit import Audit
from hanzoai.cloud.models.audit_act import AuditAct
from hanzoai.cloud.models.audit_trail_page import AuditTrailPage
from hanzoai.cloud.models.audit_wire import AuditWire
from hanzoai.cloud.models.author_author_repo import AuthorAuthorRepo
@@ -531,6 +532,7 @@ from hanzoai.cloud.models.compliance_acc_list import ComplianceAccList
from hanzoai.cloud.models.compliance_acc_view import ComplianceAccView
from hanzoai.cloud.models.compliance_accreditation_decision import ComplianceAccreditationDecision
from hanzoai.cloud.models.compliance_accreditation_req import ComplianceAccreditationReq
from hanzoai.cloud.models.compliance_act import ComplianceAct
from hanzoai.cloud.models.compliance_audit_list import ComplianceAuditList
from hanzoai.cloud.models.compliance_check_list import ComplianceCheckList
from hanzoai.cloud.models.compliance_check_view import ComplianceCheckView
@@ -913,10 +915,11 @@ from hanzoai.cloud.models.git_file_json import GitFileJSON
from hanzoai.cloud.models.git_files_json import GitFilesJSON
from hanzoai.cloud.models.git_gc_out import GitGcOut
from hanzoai.cloud.models.git_job_view import GitJobView
from hanzoai.cloud.models.git_key_list import GitKeyList
from hanzoai.cloud.models.git_key_view import GitKeyView
from hanzoai.cloud.models.git_link import GitLink
from hanzoai.cloud.models.git_link_all import GitLinkAll
from hanzoai.cloud.models.git_link_req import GitLinkReq
from hanzoai.cloud.models.git_linked import GitLinked
from hanzoai.cloud.models.git_mirror_list import GitMirrorList
from hanzoai.cloud.models.git_mirror_req import GitMirrorReq
from hanzoai.cloud.models.git_mirror_target_req import GitMirrorTargetReq
from hanzoai.cloud.models.git_mirror_target_view import GitMirrorTargetView
from hanzoai.cloud.models.git_open_req import GitOpenReq
@@ -933,7 +936,6 @@ from hanzoai.cloud.models.git_push_resp import GitPushResp
from hanzoai.cloud.models.git_readme_json import GitReadmeJSON
from hanzoai.cloud.models.git_ref_json import GitRefJSON
from hanzoai.cloud.models.git_refs_json import GitRefsJSON
from hanzoai.cloud.models.git_register_key_req import GitRegisterKeyReq
from hanzoai.cloud.models.git_repo_list import GitRepoList
from hanzoai.cloud.models.git_repo_view import GitRepoView
from hanzoai.cloud.models.git_run_start import GitRunStart
@@ -944,6 +946,7 @@ from hanzoai.cloud.models.git_subscription_list import GitSubscriptionList
from hanzoai.cloud.models.git_subscription_view import GitSubscriptionView
from hanzoai.cloud.models.git_tree_entry_json import GitTreeEntryJSON
from hanzoai.cloud.models.git_tree_json import GitTreeJSON
from hanzoai.cloud.models.git_unmatched import GitUnmatched
from hanzoai.cloud.models.git_usage_repo import GitUsageRepo
from hanzoai.cloud.models.git_usage_view import GitUsageView
from hanzoai.cloud.models.git_workflow_list import GitWorkflowList
+8 -2
View File
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.ai_price import AiPrice
from typing import Optional, Set
@@ -30,13 +30,16 @@ class AiModel(BaseModel):
capabilities: Optional[List[StrictStr]] = Field(default=None, description="Capabilities are tools, vision and reasoning, those the model supports.")
var_class: Optional[StrictStr] = Field(default=None, description="Class is premium, ours or free.", alias="class")
context_window: Optional[StrictInt] = Field(default=None, description="ContextWindow is the most tokens the model reads at once, absent when the catalog does not say.")
expires: Optional[StrictStr] = Field(default=None, description="Expires is the day the model's vendor stops serving it (2006-01-02), absent when it states none.")
family: Optional[StrictStr] = Field(default=None, description="Family is the Hanzo family (enso, zen, kai, zoo), absent for a third-party model.")
free: Optional[StrictBool] = Field(default=None, description="Free is whether a call bills nothing.")
id: Optional[StrictStr] = Field(default=None, description="ID is the model's id, the one a completion or a decision names.")
inputs: Optional[List[StrictStr]] = Field(default=None, description="Inputs are the modalities the model reads.")
max_output_tokens: Optional[StrictInt] = Field(default=None, description="MaxOutputTokens is the most one answer may hold, absent when the catalog does not say.")
name: Optional[StrictStr] = Field(default=None, description="Name is the model's display name.")
outputs: Optional[List[StrictStr]] = Field(default=None, description="Outputs are the modalities the model writes.")
pricing: Optional[AiPrice] = Field(default=None, description="Pricing is the model's list price.")
__properties: ClassVar[List[str]] = ["capabilities", "class", "context_window", "family", "id", "inputs", "name", "outputs", "pricing"]
__properties: ClassVar[List[str]] = ["capabilities", "class", "context_window", "expires", "family", "free", "id", "inputs", "max_output_tokens", "name", "outputs", "pricing"]
model_config = ConfigDict(
populate_by_name=True,
@@ -95,9 +98,12 @@ class AiModel(BaseModel):
"capabilities": obj.get("capabilities"),
"class": obj.get("class"),
"context_window": obj.get("context_window"),
"expires": obj.get("expires"),
"family": obj.get("family"),
"free": obj.get("free"),
"id": obj.get("id"),
"inputs": obj.get("inputs"),
"max_output_tokens": obj.get("max_output_tokens"),
"name": obj.get("name"),
"outputs": obj.get("outputs"),
"pricing": AiPrice.from_dict(obj["pricing"]) if obj.get("pricing") is not None else None
+5 -1
View File
@@ -34,7 +34,9 @@ class AiModelInfo(BaseModel):
context_window: Optional[StrictInt] = None
created: Optional[StrictInt] = None
description: Optional[StrictStr] = None
expires: Optional[StrictStr] = None
family: Optional[StrictStr] = None
free: Optional[StrictBool] = None
id: Optional[StrictStr] = None
inputs: Optional[List[StrictStr]] = None
max_output_tokens: Optional[StrictInt] = None
@@ -48,7 +50,7 @@ class AiModelInfo(BaseModel):
supports_reasoning: Optional[StrictBool] = None
supports_tools: Optional[StrictBool] = None
supports_vision: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["access", "canonical_slug", "class", "context_window", "created", "description", "family", "id", "inputs", "max_output_tokens", "name", "object", "outputs", "owned_by", "premium", "pricing", "provider", "supports_reasoning", "supports_tools", "supports_vision"]
__properties: ClassVar[List[str]] = ["access", "canonical_slug", "class", "context_window", "created", "description", "expires", "family", "free", "id", "inputs", "max_output_tokens", "name", "object", "outputs", "owned_by", "premium", "pricing", "provider", "supports_reasoning", "supports_tools", "supports_vision"]
model_config = ConfigDict(
populate_by_name=True,
@@ -113,7 +115,9 @@ class AiModelInfo(BaseModel):
"context_window": obj.get("context_window"),
"created": obj.get("created"),
"description": obj.get("description"),
"expires": obj.get("expires"),
"family": obj.get("family"),
"free": obj.get("free"),
"id": obj.get("id"),
"inputs": obj.get("inputs"),
"max_output_tokens": obj.get("max_output_tokens"),
@@ -29,9 +29,11 @@ class AiModelPricingInfo(BaseModel):
completion: Optional[StrictStr] = None
input_per_million: Optional[Union[StrictFloat, StrictInt]] = None
output_per_million: Optional[Union[StrictFloat, StrictInt]] = None
overrides: Optional[List[Dict[str, Any]]] = None
prompt: Optional[StrictStr] = None
rates: Optional[Dict[str, StrictStr]] = None
variable: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["completion", "input_per_million", "output_per_million", "prompt", "variable"]
__properties: ClassVar[List[str]] = ["completion", "input_per_million", "output_per_million", "overrides", "prompt", "rates", "variable"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,7 +89,9 @@ class AiModelPricingInfo(BaseModel):
"completion": obj.get("completion"),
"input_per_million": obj.get("input_per_million"),
"output_per_million": obj.get("output_per_million"),
"overrides": obj.get("overrides"),
"prompt": obj.get("prompt"),
"rates": obj.get("rates"),
"variable": obj.get("variable")
})
return _obj
+5 -1
View File
@@ -29,9 +29,11 @@ class AiPrice(BaseModel):
completion: Optional[StrictStr] = Field(default=None, description="Completion is the price of one output token, a decimal string.")
input_per_million: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="InputPerMillion is the price of a million input tokens.")
output_per_million: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="OutputPerMillion is the price of a million output tokens.")
overrides: Optional[List[Dict[str, Any]]] = Field(default=None, description="Overrides are the vendor's conditional rates as billed, each with its condition: min_prompt_tokens, or utc_start, utc_end and utc_days.")
prompt: Optional[StrictStr] = Field(default=None, description="Prompt is the price of one input token, a decimal string.")
rates: Optional[Dict[str, StrictStr]] = Field(default=None, description="Rates is every rate a resold model's vendor states, in the vendor's names and units (USD per token for prompt, completion, input_cache_read, input_cache_write, internal_reasoning; per request; per search for web_search), as billed: the vendor's rate times our margin, exact.")
variable: Optional[StrictBool] = Field(default=None, description="Variable is true for a router that bills each answer at the price of the model that gave it; the figures above are then that router's ceiling.")
__properties: ClassVar[List[str]] = ["completion", "input_per_million", "output_per_million", "prompt", "variable"]
__properties: ClassVar[List[str]] = ["completion", "input_per_million", "output_per_million", "overrides", "prompt", "rates", "variable"]
model_config = ConfigDict(
populate_by_name=True,
@@ -87,7 +89,9 @@ class AiPrice(BaseModel):
"completion": obj.get("completion"),
"input_per_million": obj.get("input_per_million"),
"output_per_million": obj.get("output_per_million"),
"overrides": obj.get("overrides"),
"prompt": obj.get("prompt"),
"rates": obj.get("rates"),
"variable": obj.get("variable")
})
return _obj
@@ -17,18 +17,19 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.git_key_view import GitKeyView
from typing import Optional, Set
from typing_extensions import Self
class GitKeyList(BaseModel):
class AuditAct(BaseModel):
"""
GitKeyList
AuditAct
""" # noqa: E501
data: Optional[List[GitKeyView]] = Field(default=None, description="Data holds the org's keys.")
__properties: ClassVar[List[str]] = ["data"]
name: Optional[StrictStr] = Field(default=None, description="Name is the operator's IAM username.")
owner: Optional[StrictStr] = Field(default=None, description="Owner is the org of the operator's IAM row: \"admin\" for a SuperAdmin.")
sub: Optional[StrictStr] = Field(default=None, description="Sub is the operator's IAM subject.")
__properties: ClassVar[List[str]] = ["name", "owner", "sub"]
model_config = ConfigDict(
populate_by_name=True,
@@ -48,7 +49,7 @@ class GitKeyList(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GitKeyList from a JSON string"""
"""Create an instance of AuditAct from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -69,18 +70,11 @@ class GitKeyList(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.data:
for _item_data in self.data:
if _item_data:
_items.append(_item_data.to_dict())
_dict['data'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GitKeyList from a dict"""
"""Create an instance of AuditAct from a dict"""
if obj is None:
return None
@@ -88,7 +82,9 @@ class GitKeyList(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [GitKeyView.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
"name": obj.get("name"),
"owner": obj.get("owner"),
"sub": obj.get("sub")
})
return _obj
+7 -1
View File
@@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.audit_act import AuditAct
from typing import Optional, Set
from typing_extensions import Self
@@ -26,6 +27,7 @@ class AuditWire(BaseModel):
"""
AuditWire
""" # noqa: E501
act: Optional[AuditAct] = Field(default=None, description="Act is present ONLY on an action taken in a support session: the platform operator IAM signed in AS this row's sub, while org, sub and email stay the person's. A console row carrying `act` was done by the operator it names.")
action: Optional[StrictStr] = Field(default=None, description="Action is the verb that was performed. It is the event's name, not the HTTP method — a request-sourced record carries both, and the pair is what makes a row readable (\"grant.create\" at POST /v1/admin/grants).")
after: Optional[Any] = None
auth_method: Optional[StrictStr] = Field(default=None, description="Auth is the credential the actor presented: \"jwt\", \"api-key\", or \"none\".", alias="authMethod")
@@ -49,7 +51,7 @@ class AuditWire(BaseModel):
sub: Optional[StrictStr] = Field(default=None, description="Sub is the acting user (the IAM subject). Empty for a machine principal or an anonymous request, which is how a service action is told from a person's.")
time: Optional[StrictStr] = Field(default=None, description="Time is when the action happened, RFC3339Nano in UTC. The stored column has the same precision and sorts the same way, so a client can range and order on this string verbatim.")
user_agent: Optional[StrictStr] = Field(default=None, description="UserAgent is the client the request announced itself as. Client-supplied, so it is evidence about what claimed to act, not proof of it.", alias="userAgent")
__properties: ClassVar[List[str]] = ["action", "after", "authMethod", "before", "email", "hash", "home", "isAdmin", "method", "org", "path", "prevHash", "reason", "requestId", "resource", "resourceId", "result", "seq", "sourceIp", "status", "sub", "time", "userAgent"]
__properties: ClassVar[List[str]] = ["act", "action", "after", "authMethod", "before", "email", "hash", "home", "isAdmin", "method", "org", "path", "prevHash", "reason", "requestId", "resource", "resourceId", "result", "seq", "sourceIp", "status", "sub", "time", "userAgent"]
model_config = ConfigDict(
populate_by_name=True,
@@ -90,6 +92,9 @@ class AuditWire(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of act
if self.act:
_dict['act'] = self.act.to_dict()
# set to None if after (nullable) is None
# and model_fields_set contains the field
if self.after is None and "after" in self.model_fields_set:
@@ -112,6 +117,7 @@ class AuditWire(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"act": AuditAct.from_dict(obj["act"]) if obj.get("act") is not None else None,
"action": obj.get("action"),
"after": obj.get("after"),
"authMethod": obj.get("authMethod"),
@@ -0,0 +1,91 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ComplianceAct(BaseModel):
"""
ComplianceAct
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the operator's IAM username.")
owner: Optional[StrictStr] = Field(default=None, description="Owner is the org of the operator's IAM row: \"admin\" for a SuperAdmin.")
sub: Optional[StrictStr] = Field(default=None, description="Sub is the operator's IAM subject.")
__properties: ClassVar[List[str]] = ["name", "owner", "sub"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ComplianceAct from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ComplianceAct from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"owner": obj.get("owner"),
"sub": obj.get("sub")
})
return _obj
+7 -1
View File
@@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.compliance_act import ComplianceAct
from typing import Optional, Set
from typing_extensions import Self
@@ -26,6 +27,7 @@ class ComplianceWire(BaseModel):
"""
ComplianceWire
""" # noqa: E501
act: Optional[ComplianceAct] = Field(default=None, description="Act is present ONLY on an action taken in a support session: the platform operator IAM signed in AS this row's sub, while org, sub and email stay the person's. A console row carrying `act` was done by the operator it names.")
action: Optional[StrictStr] = Field(default=None, description="Action is the verb that was performed. It is the event's name, not the HTTP method — a request-sourced record carries both, and the pair is what makes a row readable (\"grant.create\" at POST /v1/admin/grants).")
after: Optional[Any] = None
auth_method: Optional[StrictStr] = Field(default=None, description="Auth is the credential the actor presented: \"jwt\", \"api-key\", or \"none\".", alias="authMethod")
@@ -49,7 +51,7 @@ class ComplianceWire(BaseModel):
sub: Optional[StrictStr] = Field(default=None, description="Sub is the acting user (the IAM subject). Empty for a machine principal or an anonymous request, which is how a service action is told from a person's.")
time: Optional[StrictStr] = Field(default=None, description="Time is when the action happened, RFC3339Nano in UTC. The stored column has the same precision and sorts the same way, so a client can range and order on this string verbatim.")
user_agent: Optional[StrictStr] = Field(default=None, description="UserAgent is the client the request announced itself as. Client-supplied, so it is evidence about what claimed to act, not proof of it.", alias="userAgent")
__properties: ClassVar[List[str]] = ["action", "after", "authMethod", "before", "email", "hash", "home", "isAdmin", "method", "org", "path", "prevHash", "reason", "requestId", "resource", "resourceId", "result", "seq", "sourceIp", "status", "sub", "time", "userAgent"]
__properties: ClassVar[List[str]] = ["act", "action", "after", "authMethod", "before", "email", "hash", "home", "isAdmin", "method", "org", "path", "prevHash", "reason", "requestId", "resource", "resourceId", "result", "seq", "sourceIp", "status", "sub", "time", "userAgent"]
model_config = ConfigDict(
populate_by_name=True,
@@ -90,6 +92,9 @@ class ComplianceWire(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of act
if self.act:
_dict['act'] = self.act.to_dict()
# set to None if after (nullable) is None
# and model_fields_set contains the field
if self.after is None and "after" in self.model_fields_set:
@@ -112,6 +117,7 @@ class ComplianceWire(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"act": ComplianceAct.from_dict(obj["act"]) if obj.get("act") is not None else None,
"action": obj.get("action"),
"after": obj.get("after"),
"authMethod": obj.get("authMethod"),
+3 -1
View File
@@ -32,13 +32,14 @@ class EventOverview(BaseModel):
""" # noqa: E501
commerce: Optional[EventCommerceOverview] = Field(default=None, description="Commerce is the orders/revenue lens over product events.")
end: Optional[StrictStr] = Field(default=None, description="End is the window's exclusive upper bound, RFC3339 UTC.")
impersonated: Optional[StrictStr] = Field(default=None, description="Impersonated is which events web and commerce counted against the mark a platform operator leaves acting as someone else: exclude (the tenant's own traffic), include, or only. LLM reads the usage ledger, which carries no mark.")
interval: Optional[StrictStr] = Field(default=None, description="Interval is the bucket width the window implies: hour or day.")
llm: Optional[EventLLMOverview] = Field(default=None, description="LLM is the LLM usage lens — real per-org data.")
range: Optional[StrictStr] = Field(default=None, description="Range is the window that was actually applied: 24h, 7d, 30d or custom.")
scope: Optional[EventScope] = Field(default=None, description="Scope names the tenant these numbers belong to.")
start: Optional[StrictStr] = Field(default=None, description="Start is the window's inclusive lower bound, RFC3339 UTC.")
web: Optional[EventWebOverview] = Field(default=None, description="Web is the web-traffic lens over product events.")
__properties: ClassVar[List[str]] = ["commerce", "end", "interval", "llm", "range", "scope", "start", "web"]
__properties: ClassVar[List[str]] = ["commerce", "end", "impersonated", "interval", "llm", "range", "scope", "start", "web"]
model_config = ConfigDict(
populate_by_name=True,
@@ -105,6 +106,7 @@ class EventOverview(BaseModel):
_obj = cls.model_validate({
"commerce": EventCommerceOverview.from_dict(obj["commerce"]) if obj.get("commerce") is not None else None,
"end": obj.get("end"),
"impersonated": obj.get("impersonated"),
"interval": obj.get("interval"),
"llm": EventLLMOverview.from_dict(obj["llm"]) if obj.get("llm") is not None else None,
"range": obj.get("range"),
+3 -1
View File
@@ -31,6 +31,7 @@ class EventTop(BaseModel):
EventTop
""" # noqa: E501
end: Optional[StrictStr] = Field(default=None, description="End is the window's exclusive upper bound, RFC3339 UTC.")
impersonated: Optional[StrictStr] = Field(default=None, description="Impersonated is which events products, topPages, topReferrers and topSources counted against the mark a platform operator leaves acting as someone else: exclude (the tenant's own traffic), include, or only. Models reads the usage ledger, which carries no mark.")
models: Optional[EventTopModels] = Field(default=None, description="Models ranks the window's LLM models by spend — real per-org data.")
products: Optional[EventTopProducts] = Field(default=None, description="Products ranks the window's products by revenue.")
range: Optional[StrictStr] = Field(default=None, description="Range is the window that was actually applied: 24h, 7d, 30d or custom.")
@@ -39,7 +40,7 @@ class EventTop(BaseModel):
top_pages: Optional[EventBreakdown] = Field(default=None, description="Pages ranks the paths visitors requested, by pageviews.", alias="topPages")
top_referrers: Optional[EventBreakdown] = Field(default=None, description="Referrers ranks the external domains visitors arrived from, by pageviews.", alias="topReferrers")
top_sources: Optional[EventBreakdown] = Field(default=None, description="Sources ranks the utm_source campaigns visitors arrived on, by pageviews.", alias="topSources")
__properties: ClassVar[List[str]] = ["end", "models", "products", "range", "scope", "start", "topPages", "topReferrers", "topSources"]
__properties: ClassVar[List[str]] = ["end", "impersonated", "models", "products", "range", "scope", "start", "topPages", "topReferrers", "topSources"]
model_config = ConfigDict(
populate_by_name=True,
@@ -111,6 +112,7 @@ class EventTop(BaseModel):
_obj = cls.model_validate({
"end": obj.get("end"),
"impersonated": obj.get("impersonated"),
"models": EventTopModels.from_dict(obj["models"]) if obj.get("models") is not None else None,
"products": EventTopProducts.from_dict(obj["products"]) if obj.get("products") is not None else None,
"range": obj.get("range"),
@@ -22,16 +22,15 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GitKeyView(BaseModel):
class GitLink(BaseModel):
"""
GitKeyView
GitLink
""" # noqa: E501
created_at: Optional[StrictStr] = Field(default=None, description="CreatedAt is RFC 3339 UTC.", alias="createdAt")
fingerprint: Optional[StrictStr] = Field(default=None, description="Fingerprint is the key's SHA256 fingerprint (\"SHA256:…\"), globally unique and the handle SSH auth resolves a presented key by.")
id: Optional[StrictStr] = Field(default=None, description="ID is the key's identifier (\"gitkey_…\"), the handle to delete it by.")
public_key: Optional[StrictStr] = Field(default=None, description="PublicKey is the canonical OpenSSH authorized-key line as stored.", alias="publicKey")
title: Optional[StrictStr] = Field(default=None, description="Title is the key's label — the caller's, or the comment on the key line.")
__properties: ClassVar[List[str]] = ["createdAt", "fingerprint", "id", "publicKey", "title"]
clone_url: Optional[StrictStr] = Field(default=None, description="CloneURL is the address its history is fetched from and pushed to.", alias="cloneUrl")
name: Optional[StrictStr] = Field(default=None, description="Name is the repository's name on its provider.")
owner: Optional[StrictStr] = Field(default=None, description="Owner is the account the repository belongs to on its provider.")
provider: Optional[StrictStr] = Field(default=None, description="Provider is \"github\", \"forge\" (git.hanzo.ai, Hanzo's own), or \"git\" for any other host.")
__properties: ClassVar[List[str]] = ["cloneUrl", "name", "owner", "provider"]
model_config = ConfigDict(
populate_by_name=True,
@@ -51,7 +50,7 @@ class GitKeyView(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GitKeyView from a JSON string"""
"""Create an instance of GitLink from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +75,7 @@ class GitKeyView(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GitKeyView from a dict"""
"""Create an instance of GitLink from a dict"""
if obj is None:
return None
@@ -84,11 +83,10 @@ class GitKeyView(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"createdAt": obj.get("createdAt"),
"fingerprint": obj.get("fingerprint"),
"id": obj.get("id"),
"publicKey": obj.get("publicKey"),
"title": obj.get("title")
"cloneUrl": obj.get("cloneUrl"),
"name": obj.get("name"),
"owner": obj.get("owner"),
"provider": obj.get("provider")
})
return _obj
@@ -22,13 +22,12 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GitRegisterKeyReq(BaseModel):
class GitLinkAll(BaseModel):
"""
GitRegisterKeyReq
GitLinkAll
""" # noqa: E501
public_key: Optional[StrictStr] = Field(default=None, description="PublicKey is one OpenSSH authorized-key line (\"ssh-ed25519 AAAA… you@host\"). Required; a line that does not parse is refused and never stored.", alias="publicKey")
title: Optional[StrictStr] = Field(default=None, description="Title labels the key in the console. Max 256 chars; when omitted the comment on the key line is used.")
__properties: ClassVar[List[str]] = ["publicKey", "title"]
owner: Optional[StrictStr] = Field(default=None, description="Owner is the GitHub account a repository named n is looked for under, as github.com/<owner>/<n>. Empty is the account the estate's table names for the org; an org it does not name must give one.")
__properties: ClassVar[List[str]] = ["owner"]
model_config = ConfigDict(
populate_by_name=True,
@@ -48,7 +47,7 @@ class GitRegisterKeyReq(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GitRegisterKeyReq from a JSON string"""
"""Create an instance of GitLinkAll from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +72,7 @@ class GitRegisterKeyReq(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GitRegisterKeyReq from a dict"""
"""Create an instance of GitLinkAll from a dict"""
if obj is None:
return None
@@ -81,8 +80,7 @@ class GitRegisterKeyReq(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"publicKey": obj.get("publicKey"),
"title": obj.get("title")
"owner": obj.get("owner")
})
return _obj
@@ -22,13 +22,13 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GitMirrorReq(BaseModel):
class GitLinkReq(BaseModel):
"""
GitMirrorReq
GitLinkReq
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the local repo to mirror into, from the :name path segment. It is CREATED on first use.")
project: Optional[StrictStr] = Field(default=None, description="Project is the sub-scope to land the repo in; empty uses the caller's own, exactly as a create would.")
source: Optional[StrictStr] = Field(default=None, description="Source is the http(s) git URL to fetch from. The host is SSRF-guarded, and a credential is sent only if we hold one NAMED FOR that host — so a tenant-supplied URL to anywhere else fetches anonymously.")
name: Optional[StrictStr] = Field(default=None, description="Name is the repository, from the :name path segment. It is made when the org has none of that name.")
project: Optional[StrictStr] = Field(default=None, description="Project is the sub-scope to make it in; empty uses the caller's own.")
source: Optional[StrictStr] = Field(default=None, description="Source is where its history lives: an http(s) clone address, such as https://github.com/acme/widgets.git. Its host must let the caller read it.")
__properties: ClassVar[List[str]] = ["name", "project", "source"]
model_config = ConfigDict(
@@ -49,7 +49,7 @@ class GitMirrorReq(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GitMirrorReq from a JSON string"""
"""Create an instance of GitLinkReq from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +74,7 @@ class GitMirrorReq(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GitMirrorReq from a dict"""
"""Create an instance of GitLinkReq from a dict"""
if obj is None:
return None
+107
View File
@@ -0,0 +1,107 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.git_repo_view import GitRepoView
from hanzoai.cloud.models.git_unmatched import GitUnmatched
from typing import Optional, Set
from typing_extensions import Self
class GitLinked(BaseModel):
"""
GitLinked
""" # noqa: E501
held: Optional[List[StrictStr]] = Field(default=None, description="Held are the repositories that hold their own history here, which a link would hide.")
linked: Optional[List[GitRepoView]] = Field(default=None, description="Linked are the repositories it linked, each to its namesake on GitHub.")
unmatched: Optional[List[GitUnmatched]] = Field(default=None, description="Unmatched are the repositories it left as they were, each with what GitHub answered: no namesake readable as the caller is never replaced by a guess.")
__properties: ClassVar[List[str]] = ["held", "linked", "unmatched"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GitLinked from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in linked (list)
_items = []
if self.linked:
for _item_linked in self.linked:
if _item_linked:
_items.append(_item_linked.to_dict())
_dict['linked'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in unmatched (list)
_items = []
if self.unmatched:
for _item_unmatched in self.unmatched:
if _item_unmatched:
_items.append(_item_unmatched.to_dict())
_dict['unmatched'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GitLinked from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"held": obj.get("held"),
"linked": [GitRepoView.from_dict(_item) for _item in obj["linked"]] if obj.get("linked") is not None else None,
"unmatched": [GitUnmatched.from_dict(_item) for _item in obj["unmatched"]] if obj.get("unmatched") is not None else None
})
return _obj
+7 -1
View File
@@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.git_link import GitLink
from typing import Optional, Set
from typing_extensions import Self
@@ -33,6 +34,7 @@ class GitRepoView(BaseModel):
description: Optional[StrictStr] = Field(default=None, description="Description is the caller-supplied blurb (max 4KiB).")
head: Optional[StrictStr] = Field(default=None, description="Head is the resolved HEAD commit, empty on an empty repo.")
id: Optional[StrictStr] = Field(default=None, description="ID is the repo's stable, prefixed identifier (\"repo_\" + 128 random bits).")
link: Optional[GitLink] = Field(default=None, description="Link is where the repo's history lives when it is on another host: reads are served from a cache filled from there and pushes go there. Absent for a repo whose history is here.")
name: Optional[StrictStr] = Field(default=None, description="Name is the org-unique handle, and the last path segment of both URLs below.")
org: Optional[StrictStr] = Field(default=None, description="Org owns the repo — the gateway-minted X-Org-Id, and the isolation key.")
project: Optional[StrictStr] = Field(default=None, description="Project is the optional sub-scope the repo lives in; absent for the org's default scope.")
@@ -40,7 +42,7 @@ class GitRepoView(BaseModel):
size_bytes: Optional[StrictInt] = Field(default=None, description="SizeBytes is the repo's measured on-disk size, re-measured on create, after each push, and after a gc. This is the number billing meters.", alias="sizeBytes")
ssh_url: Optional[StrictStr] = Field(default=None, description="SSHURL is the scp-style SSH remote (git@host:org/repo.git).", alias="sshUrl")
updated_at: Optional[StrictStr] = Field(default=None, description="UpdatedAt is RFC 3339 UTC, empty until the first write.", alias="updatedAt")
__properties: ClassVar[List[str]] = ["branches", "cloneUrl", "createdAt", "defaultBranch", "description", "head", "id", "name", "org", "project", "public", "sizeBytes", "sshUrl", "updatedAt"]
__properties: ClassVar[List[str]] = ["branches", "cloneUrl", "createdAt", "defaultBranch", "description", "head", "id", "link", "name", "org", "project", "public", "sizeBytes", "sshUrl", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
@@ -81,6 +83,9 @@ class GitRepoView(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of link
if self.link:
_dict['link'] = self.link.to_dict()
return _dict
@classmethod
@@ -100,6 +105,7 @@ class GitRepoView(BaseModel):
"description": obj.get("description"),
"head": obj.get("head"),
"id": obj.get("id"),
"link": GitLink.from_dict(obj["link"]) if obj.get("link") is not None else None,
"name": obj.get("name"),
"org": obj.get("org"),
"project": obj.get("project"),
+89
View File
@@ -0,0 +1,89 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GitUnmatched(BaseModel):
"""
GitUnmatched
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the repository.")
reason: Optional[StrictStr] = Field(default=None, description="Reason is what GitHub answered about its namesake.")
__properties: ClassVar[List[str]] = ["name", "reason"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GitUnmatched from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GitUnmatched from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"reason": obj.get("reason")
})
return _obj
+5 -1
View File
@@ -29,6 +29,7 @@ class IamToken(BaseModel):
""" # noqa: E501
access_token: Optional[StrictStr] = Field(default=None, alias="accessToken")
access_token_hash: Optional[StrictStr] = Field(default=None, alias="accessTokenHash")
actor: Optional[StrictStr] = None
application: Optional[StrictStr] = None
code: Optional[StrictStr] = None
code_challenge: Optional[StrictStr] = Field(default=None, alias="codeChallenge")
@@ -45,6 +46,7 @@ class IamToken(BaseModel):
organization: Optional[StrictStr] = None
owner: Optional[StrictStr] = None
public_grant: Optional[StrictBool] = Field(default=None, description="PublicGrant records that this grant was established WITHOUT client authentication — a PKCE code exchange from a client that presented no secret. Whether a client is confidential is a property of the GRANT, not only of the registration: `hanzo-cli` and every @hanzo/iam SPA keep a registered secret for a BACKEND path while the surface that actually signs in is a public PKCE client that cannot hold one. authorizationCodeGrant already makes exactly that bounded relaxation; this is the same fact, recorded so refreshTokenGrant can honour it instead of demanding a secret the client never had (which 401s invalid_client and kills the session at the access token's expiry). Carried across rotation, so the second refresh behaves like the first.", alias="publicGrant")
reason: Optional[StrictStr] = None
redirect_uri: Optional[StrictStr] = Field(default=None, description="RedirectUri binds the authorization code to the exact redirect URI of the authorize request (RFC 6749 §4.1.3): the token endpoint refuses a code redeemed with a different redirect_uri, closing code-injection across a client's registered URIs.", alias="redirectUri")
refresh_consumed: Optional[StrictBool] = Field(default=None, alias="refreshConsumed")
refresh_expire_in: Optional[StrictInt] = Field(default=None, alias="refreshExpireIn")
@@ -57,7 +59,7 @@ class IamToken(BaseModel):
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
user: Optional[StrictStr] = None
user_code: Optional[StrictStr] = Field(default=None, alias="userCode")
__properties: ClassVar[List[str]] = ["accessToken", "accessTokenHash", "application", "code", "codeChallenge", "codeChallengeMethod", "codeExpireIn", "codeIsUsed", "createdAt", "createdTime", "deleted", "expiresIn", "id", "name", "nonce", "organization", "owner", "publicGrant", "redirectUri", "refreshConsumed", "refreshExpireIn", "refreshFamily", "refreshToken", "refreshTokenHash", "resource", "scope", "tokenType", "updatedAt", "user", "userCode"]
__properties: ClassVar[List[str]] = ["accessToken", "accessTokenHash", "actor", "application", "code", "codeChallenge", "codeChallengeMethod", "codeExpireIn", "codeIsUsed", "createdAt", "createdTime", "deleted", "expiresIn", "id", "name", "nonce", "organization", "owner", "publicGrant", "reason", "redirectUri", "refreshConsumed", "refreshExpireIn", "refreshFamily", "refreshToken", "refreshTokenHash", "resource", "scope", "tokenType", "updatedAt", "user", "userCode"]
model_config = ConfigDict(
populate_by_name=True,
@@ -112,6 +114,7 @@ class IamToken(BaseModel):
_obj = cls.model_validate({
"accessToken": obj.get("accessToken"),
"accessTokenHash": obj.get("accessTokenHash"),
"actor": obj.get("actor"),
"application": obj.get("application"),
"code": obj.get("code"),
"codeChallenge": obj.get("codeChallenge"),
@@ -128,6 +131,7 @@ class IamToken(BaseModel):
"organization": obj.get("organization"),
"owner": obj.get("owner"),
"publicGrant": obj.get("publicGrant"),
"reason": obj.get("reason"),
"redirectUri": obj.get("redirectUri"),
"refreshConsumed": obj.get("refreshConsumed"),
"refreshExpireIn": obj.get("refreshExpireIn"),
@@ -26,8 +26,9 @@ class ProviderGithubBackfillIn(BaseModel):
"""
ProviderGithubBackfillIn
""" # noqa: E501
repo: Optional[StrictStr] = Field(default=None, description="Repo narrows the pass to ONE granted repository, named `owner/name` or bare `name` (case-insensitive). Empty walks every granted repository. A project page syncs its own issues with this; the org-wide pass stays the default. A name the connection does not grant is a 404, never a silent empty pass that reads as \"this repository has no issues\".")
state: Optional[StrictStr] = Field(default=None, description="State is the GitHub issue state to walk: \"open\" (the default), \"closed\" or \"all\". Anything else is a 400.")
__properties: ClassVar[List[str]] = ["state"]
__properties: ClassVar[List[str]] = ["repo", "state"]
model_config = ConfigDict(
populate_by_name=True,
@@ -80,6 +81,7 @@ class ProviderGithubBackfillIn(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"repo": obj.get("repo"),
"state": obj.get("state")
})
return _obj
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzoai"
version = "8.5.655"
version = "8.5.699"
description = "The official Python library for the Hanzo API"
dynamic = ["readme"]
license = "Apache-2.0"
Generated
+1 -1
View File
@@ -2252,7 +2252,7 @@ wheels = [
[[package]]
name = "hanzoai"
version = "8.5.653"
version = "8.5.655"
source = { editable = "." }
dependencies = [
{ name = "pydantic" },