Regenerate against the current cloud document

This commit is contained in:
2026-09-03 16:15:52 -07:00
parent fae213a6c0
commit f91d612e2c
34 changed files with 3659 additions and 2221 deletions
+22 -4
View File
@@ -673,6 +673,7 @@ __all__ = [
"EnrollResult",
"Enrollment",
"EnrollmentList",
"EnrollmentView",
"Enrolment",
"EntitlementsView",
"Entry",
@@ -711,7 +712,6 @@ __all__ = [
"EvaluatorList",
"EvaluatorReq",
"EvaluatorView",
"Event",
"EventIn",
"EventList",
"EventView",
@@ -987,6 +987,9 @@ __all__ = [
"IamWorkspacesDeleteOutput",
"IamWorkspacesInput",
"IamWorkspacesListOutput",
"IdentityIn",
"IdentityList",
"IdentityView",
"ImageOrigin",
"ImageView",
"ImportCapTableIn",
@@ -1049,6 +1052,7 @@ __all__ = [
"JobCancel",
"JobCanceled",
"JobList",
"JoinFailure",
"JourneyStep",
"JudgeSpec",
"KbAuthorizeOut",
@@ -1120,6 +1124,7 @@ __all__ = [
"LinkMint",
"LinkView",
"ListOut",
"Listed",
"Listing",
"ListingPage",
"Liveness",
@@ -2186,11 +2191,13 @@ __all__ = [
"ProvisionResult",
"ProvisionedResource",
"ProvisionedSummary",
"PublicRooms",
"PublishInput",
"PublishKitIn",
"PublishReq",
"PublishResult",
"PublishedClaim",
"PublishedView",
"PullList",
"PullView",
"Purge",
@@ -2266,6 +2273,7 @@ __all__ = [
"RegistryStatus",
"RegistryTagList",
"RegistryToken",
"ReindexOut",
"ReleaseBoard",
"ReleaseRow",
"Remark",
@@ -2450,6 +2458,7 @@ __all__ = [
"SeriesPoint",
"Service",
"ServiceDetail",
"ServiceIn",
"ServicePort",
"Session",
"SessionDetail",
@@ -2475,6 +2484,7 @@ __all__ = [
"SkillDeleted",
"SkillIn",
"SkillWritten",
"SlackJoinOut",
"SlotView",
"SocialAccount",
"SocialAccountBody",
@@ -2710,7 +2720,6 @@ __all__ = [
"WriteIn",
"Written",
"Wrote",
"ZapProcReq",
]
# import apis into sdk package
@@ -3373,6 +3382,7 @@ from hanzoai.cloud.models.enroll_req import EnrollReq as EnrollReq
from hanzoai.cloud.models.enroll_result import EnrollResult as EnrollResult
from hanzoai.cloud.models.enrollment import Enrollment as Enrollment
from hanzoai.cloud.models.enrollment_list import EnrollmentList as EnrollmentList
from hanzoai.cloud.models.enrollment_view import EnrollmentView as EnrollmentView
from hanzoai.cloud.models.enrolment import Enrolment as Enrolment
from hanzoai.cloud.models.entitlements_view import EntitlementsView as EntitlementsView
from hanzoai.cloud.models.entry import Entry as Entry
@@ -3411,7 +3421,6 @@ from hanzoai.cloud.models.evaluate_in import EvaluateIn as EvaluateIn
from hanzoai.cloud.models.evaluator_list import EvaluatorList as EvaluatorList
from hanzoai.cloud.models.evaluator_req import EvaluatorReq as EvaluatorReq
from hanzoai.cloud.models.evaluator_view import EvaluatorView as EvaluatorView
from hanzoai.cloud.models.event import Event as Event
from hanzoai.cloud.models.event_in import EventIn as EventIn
from hanzoai.cloud.models.event_list import EventList as EventList
from hanzoai.cloud.models.event_view import EventView as EventView
@@ -3687,6 +3696,9 @@ from hanzoai.cloud.models.iam_workspace import IamWorkspace as IamWorkspace
from hanzoai.cloud.models.iam_workspaces_delete_output import IamWorkspacesDeleteOutput as IamWorkspacesDeleteOutput
from hanzoai.cloud.models.iam_workspaces_input import IamWorkspacesInput as IamWorkspacesInput
from hanzoai.cloud.models.iam_workspaces_list_output import IamWorkspacesListOutput as IamWorkspacesListOutput
from hanzoai.cloud.models.identity_in import IdentityIn as IdentityIn
from hanzoai.cloud.models.identity_list import IdentityList as IdentityList
from hanzoai.cloud.models.identity_view import IdentityView as IdentityView
from hanzoai.cloud.models.image_origin import ImageOrigin as ImageOrigin
from hanzoai.cloud.models.image_view import ImageView as ImageView
from hanzoai.cloud.models.import_cap_table_in import ImportCapTableIn as ImportCapTableIn
@@ -3749,6 +3761,7 @@ from hanzoai.cloud.models.item_view import ItemView as ItemView
from hanzoai.cloud.models.job_cancel import JobCancel as JobCancel
from hanzoai.cloud.models.job_canceled import JobCanceled as JobCanceled
from hanzoai.cloud.models.job_list import JobList as JobList
from hanzoai.cloud.models.join_failure import JoinFailure as JoinFailure
from hanzoai.cloud.models.journey_step import JourneyStep as JourneyStep
from hanzoai.cloud.models.judge_spec import JudgeSpec as JudgeSpec
from hanzoai.cloud.models.kb_authorize_out import KbAuthorizeOut as KbAuthorizeOut
@@ -3820,6 +3833,7 @@ from hanzoai.cloud.models.link_list import LinkList as LinkList
from hanzoai.cloud.models.link_mint import LinkMint as LinkMint
from hanzoai.cloud.models.link_view import LinkView as LinkView
from hanzoai.cloud.models.list_out import ListOut as ListOut
from hanzoai.cloud.models.listed import Listed as Listed
from hanzoai.cloud.models.listing import Listing as Listing
from hanzoai.cloud.models.listing_page import ListingPage as ListingPage
from hanzoai.cloud.models.liveness import Liveness as Liveness
@@ -4886,11 +4900,13 @@ from hanzoai.cloud.models.provision_request import ProvisionRequest as Provision
from hanzoai.cloud.models.provision_result import ProvisionResult as ProvisionResult
from hanzoai.cloud.models.provisioned_resource import ProvisionedResource as ProvisionedResource
from hanzoai.cloud.models.provisioned_summary import ProvisionedSummary as ProvisionedSummary
from hanzoai.cloud.models.public_rooms import PublicRooms as PublicRooms
from hanzoai.cloud.models.publish_input import PublishInput as PublishInput
from hanzoai.cloud.models.publish_kit_in import PublishKitIn as PublishKitIn
from hanzoai.cloud.models.publish_req import PublishReq as PublishReq
from hanzoai.cloud.models.publish_result import PublishResult as PublishResult
from hanzoai.cloud.models.published_claim import PublishedClaim as PublishedClaim
from hanzoai.cloud.models.published_view import PublishedView as PublishedView
from hanzoai.cloud.models.pull_list import PullList as PullList
from hanzoai.cloud.models.pull_view import PullView as PullView
from hanzoai.cloud.models.purge import Purge as Purge
@@ -4966,6 +4982,7 @@ from hanzoai.cloud.models.registry_project_list import RegistryProjectList as Re
from hanzoai.cloud.models.registry_status import RegistryStatus as RegistryStatus
from hanzoai.cloud.models.registry_tag_list import RegistryTagList as RegistryTagList
from hanzoai.cloud.models.registry_token import RegistryToken as RegistryToken
from hanzoai.cloud.models.reindex_out import ReindexOut as ReindexOut
from hanzoai.cloud.models.release_board import ReleaseBoard as ReleaseBoard
from hanzoai.cloud.models.release_row import ReleaseRow as ReleaseRow
from hanzoai.cloud.models.remark import Remark as Remark
@@ -5150,6 +5167,7 @@ from hanzoai.cloud.models.series_line import SeriesLine as SeriesLine
from hanzoai.cloud.models.series_point import SeriesPoint as SeriesPoint
from hanzoai.cloud.models.service import Service as Service
from hanzoai.cloud.models.service_detail import ServiceDetail as ServiceDetail
from hanzoai.cloud.models.service_in import ServiceIn as ServiceIn
from hanzoai.cloud.models.service_port import ServicePort as ServicePort
from hanzoai.cloud.models.session import Session as Session
from hanzoai.cloud.models.session_detail import SessionDetail as SessionDetail
@@ -5175,6 +5193,7 @@ from hanzoai.cloud.models.skill import Skill as Skill
from hanzoai.cloud.models.skill_deleted import SkillDeleted as SkillDeleted
from hanzoai.cloud.models.skill_in import SkillIn as SkillIn
from hanzoai.cloud.models.skill_written import SkillWritten as SkillWritten
from hanzoai.cloud.models.slack_join_out import SlackJoinOut as SlackJoinOut
from hanzoai.cloud.models.slot_view import SlotView as SlotView
from hanzoai.cloud.models.social_account import SocialAccount as SocialAccount
from hanzoai.cloud.models.social_account_body import SocialAccountBody as SocialAccountBody
@@ -5410,4 +5429,3 @@ from hanzoai.cloud.models.world_wire import WorldWire as WorldWire
from hanzoai.cloud.models.write_in import WriteIn as WriteIn
from hanzoai.cloud.models.written import Written as Written
from hanzoai.cloud.models.wrote import Wrote as Wrote
from hanzoai.cloud.models.zap_proc_req import ZapProcReq as ZapProcReq
-3
View File
@@ -7457,7 +7457,6 @@ class AgentsApi:
) -> CodingStarted:
"""Start one autonomous coding run against a repo in the caller's org
Runs a coding task on a repository: clones it into a sandbox, lets a model read and edit the code, run the tests, and push the work to a branch. Say the thing you want done — \"fix the failing auth test in hanzoai/cloud\" — and the run infers the repo, the branch and the plan. No prefix, no ceremony. It answers 202 with the run's handle the moment the run is ADMITTED — not when it finishes. A coding run takes minutes; holding a request open for one would tie a connection to a model loop and give the caller nothing it cannot get better from the session stream. The handle is a session id, and that is deliberate: the session is already the run's durable record and its live stream (/v1/agents/sessions/{id}/stream), so this op does not grow a progress endpoint, a status endpoint or a cancel endpoint of its own. One way to watch a run, whoever started it. It is also how work CONTINUES. Pass an earlier run's session as `after` and this one starts from where that one stopped, so \"now add tests for it\" builds on the branch already pushed instead of a fresh clone. The follow-up still gets its own branch and its own session — one run, one branch, always reviewable on its own.
:param coding_start_in: (required)
:type coding_start_in: CodingStartIn
@@ -7524,7 +7523,6 @@ class AgentsApi:
) -> ApiResponse[CodingStarted]:
"""Start one autonomous coding run against a repo in the caller's org
Runs a coding task on a repository: clones it into a sandbox, lets a model read and edit the code, run the tests, and push the work to a branch. Say the thing you want done — \"fix the failing auth test in hanzoai/cloud\" — and the run infers the repo, the branch and the plan. No prefix, no ceremony. It answers 202 with the run's handle the moment the run is ADMITTED — not when it finishes. A coding run takes minutes; holding a request open for one would tie a connection to a model loop and give the caller nothing it cannot get better from the session stream. The handle is a session id, and that is deliberate: the session is already the run's durable record and its live stream (/v1/agents/sessions/{id}/stream), so this op does not grow a progress endpoint, a status endpoint or a cancel endpoint of its own. One way to watch a run, whoever started it. It is also how work CONTINUES. Pass an earlier run's session as `after` and this one starts from where that one stopped, so \"now add tests for it\" builds on the branch already pushed instead of a fresh clone. The follow-up still gets its own branch and its own session — one run, one branch, always reviewable on its own.
:param coding_start_in: (required)
:type coding_start_in: CodingStartIn
@@ -7591,7 +7589,6 @@ class AgentsApi:
) -> RESTResponseType:
"""Start one autonomous coding run against a repo in the caller's org
Runs a coding task on a repository: clones it into a sandbox, lets a model read and edit the code, run the tests, and push the work to a branch. Say the thing you want done — \"fix the failing auth test in hanzoai/cloud\" — and the run infers the repo, the branch and the plan. No prefix, no ceremony. It answers 202 with the run's handle the moment the run is ADMITTED — not when it finishes. A coding run takes minutes; holding a request open for one would tie a connection to a model loop and give the caller nothing it cannot get better from the session stream. The handle is a session id, and that is deliberate: the session is already the run's durable record and its live stream (/v1/agents/sessions/{id}/stream), so this op does not grow a progress endpoint, a status endpoint or a cancel endpoint of its own. One way to watch a run, whoever started it. It is also how work CONTINUES. Pass an earlier run's session as `after` and this one starts from where that one stopped, so \"now add tests for it\" builds on the branch already pushed instead of a fresh clone. The follow-up still gets its own branch and its own session — one run, one branch, always reviewable on its own.
:param coding_start_in: (required)
:type coding_start_in: CodingStartIn
+6 -13
View File
@@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictInt, StrictStr
from typing import Any, Dict, Optional
from typing import Optional
from typing_extensions import Annotated
from hanzoai.cloud.models.board import Board
from hanzoai.cloud.models.dataset_list import DatasetList
@@ -74,7 +74,7 @@ class EvalApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> object:
) -> None:
"""Removes the named dataset of the caller's org AND all of its examples, in one transaction.
Removes the named dataset of the caller's org AND all of its examples, in one transaction. This is not a detach: the examples are gone with the set, so a dataset cannot be resurrected by re-creating the name. A name this org does not have is 404 — never a silent success — and a name belonging to another tenant is the same 404, because the delete is predicated on the validated org. Requires a validated principal; 403 without one. Runs and scores already recorded against the dataset are telemetry events and are NOT deleted with it.
@@ -112,7 +112,7 @@ class EvalApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -141,7 +141,7 @@ class EvalApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[object]:
) -> ApiResponse[None]:
"""Removes the named dataset of the caller's org AND all of its examples, in one transaction.
Removes the named dataset of the caller's org AND all of its examples, in one transaction. This is not a detach: the examples are gone with the set, so a dataset cannot be resurrected by re-creating the name. A name this org does not have is 404 — never a silent success — and a name belonging to another tenant is the same 404, because the delete is predicated on the validated org. Requires a validated principal; 403 without one. Runs and scores already recorded against the dataset are telemetry events and are NOT deleted with it.
@@ -179,7 +179,7 @@ class EvalApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -246,7 +246,7 @@ class EvalApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -287,13 +287,6 @@ class EvalApi:
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
+6 -13
View File
@@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictInt, StrictStr
from typing import Any, Dict, Optional
from typing import Optional
from typing_extensions import Annotated
from hanzoai.cloud.models.definition import Definition
from hanzoai.cloud.models.fn_list import FnList
@@ -65,7 +65,7 @@ class FunctionsApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> object:
) -> None:
"""Removes one of the caller org's functions and answers 204.
Removes one of the caller org's functions and answers 204. A name this org does not hold is 404 — never a silent success — and a name belonging to another tenant is the same 404, because the delete is predicated on the validated org.
@@ -103,7 +103,7 @@ class FunctionsApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'204': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -132,7 +132,7 @@ class FunctionsApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[object]:
) -> ApiResponse[None]:
"""Removes one of the caller org's functions and answers 204.
Removes one of the caller org's functions and answers 204. A name this org does not hold is 404 — never a silent success — and a name belonging to another tenant is the same 404, because the delete is predicated on the validated org.
@@ -170,7 +170,7 @@ class FunctionsApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'204': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -237,7 +237,7 @@ class FunctionsApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'204': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -278,13 +278,6 @@ class FunctionsApi:
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
File diff suppressed because it is too large Load Diff
+247
View File
@@ -59,6 +59,7 @@ from hanzoai.cloud.models.linear_comment_out import LinearCommentOut
from hanzoai.cloud.models.list_out import ListOut
from hanzoai.cloud.models.provider_view import ProviderView
from hanzoai.cloud.models.refresh_out import RefreshOut
from hanzoai.cloud.models.slack_join_out import SlackJoinOut
from hanzoai.cloud.models.verify_out import VerifyOut
from hanzoai.cloud.api_client import ApiClient, RequestSerialized
@@ -12537,6 +12538,252 @@ class IntegrationsApi:
@validate_call
def post_integrations_slack_join(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> SlackJoinOut:
"""Joins every public channel in the caller org's workspace.
Joins every public channel in the caller org's workspace. Org admin, because it changes what the whole workspace sees: after it the agent is a member of every public room and answers in all of them.
: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._post_integrations_slack_join_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SlackJoinOut",
}
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 post_integrations_slack_join_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[SlackJoinOut]:
"""Joins every public channel in the caller org's workspace.
Joins every public channel in the caller org's workspace. Org admin, because it changes what the whole workspace sees: after it the agent is a member of every public room and answers in all of them.
: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._post_integrations_slack_join_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SlackJoinOut",
}
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 post_integrations_slack_join_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Joins every public channel in the caller org's workspace.
Joins every public channel in the caller org's workspace. Org admin, because it changes what the whole workspace sees: after it the agent is a member of every public room and answers in all of them.
: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._post_integrations_slack_join_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SlackJoinOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_integrations_slack_join_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/integrations/slack/join',
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 post_integrations_teams_events(
self,
+247
View File
@@ -25,6 +25,7 @@ from hanzoai.cloud.models.graph_out import GraphOut
from hanzoai.cloud.models.kb_authorize_out import KbAuthorizeOut
from hanzoai.cloud.models.kb_connectors_out import KbConnectorsOut
from hanzoai.cloud.models.kb_sync_out import KbSyncOut
from hanzoai.cloud.models.reindex_out import ReindexOut
from hanzoai.cloud.models.search_in import SearchIn
from hanzoai.cloud.models.search_out import SearchOut
@@ -2132,6 +2133,252 @@ class KnowledgeApi:
@validate_call
def post_knowledge_reindex(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ReindexOut:
"""Rebuilds the caller org's retrieval from its documents: the vector collection is dropped and created again at the configured embedding size and every page, memory and source is embedded into it; the lexical index is reconciled to the same set.
Rebuilds the caller org's retrieval from its documents: the vector collection is dropped and created again at the configured embedding size and every page, memory and source is embedded into it; the lexical index is reconciled to the same set. It is what an operator runs after the embedding model or its dimension changes, and what puts an org's retrieval right after a vector outage. It requires ORG ADMIN and runs inline: an org's knowledge is a few thousand documents, and the answer is the count. The request has no body. Response: {\"vectors\": 412, \"lexical\": 412, \"removed\": 3, \"failed\": 0}
: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._post_knowledge_reindex_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ReindexOut",
}
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 post_knowledge_reindex_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[ReindexOut]:
"""Rebuilds the caller org's retrieval from its documents: the vector collection is dropped and created again at the configured embedding size and every page, memory and source is embedded into it; the lexical index is reconciled to the same set.
Rebuilds the caller org's retrieval from its documents: the vector collection is dropped and created again at the configured embedding size and every page, memory and source is embedded into it; the lexical index is reconciled to the same set. It is what an operator runs after the embedding model or its dimension changes, and what puts an org's retrieval right after a vector outage. It requires ORG ADMIN and runs inline: an org's knowledge is a few thousand documents, and the answer is the count. The request has no body. Response: {\"vectors\": 412, \"lexical\": 412, \"removed\": 3, \"failed\": 0}
: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._post_knowledge_reindex_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ReindexOut",
}
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 post_knowledge_reindex_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Rebuilds the caller org's retrieval from its documents: the vector collection is dropped and created again at the configured embedding size and every page, memory and source is embedded into it; the lexical index is reconciled to the same set.
Rebuilds the caller org's retrieval from its documents: the vector collection is dropped and created again at the configured embedding size and every page, memory and source is embedded into it; the lexical index is reconciled to the same set. It is what an operator runs after the embedding model or its dimension changes, and what puts an org's retrieval right after a vector outage. It requires ORG ADMIN and runs inline: an org's knowledge is a few thousand documents, and the answer is the count. The request has no body. Response: {\"vectors\": 412, \"lexical\": 412, \"removed\": 3, \"failed\": 0}
: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._post_knowledge_reindex_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ReindexOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_knowledge_reindex_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/knowledge/reindex',
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 post_knowledge_search(
self,
File diff suppressed because it is too large Load Diff
+299 -1
View File
@@ -16,7 +16,7 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictBytes, StrictStr
from pydantic import Field, StrictBytes, StrictInt, StrictStr
from typing import List, Optional, Tuple, Union
from typing_extensions import Annotated
from hanzoai.cloud.models.bot_roster import BotRoster
@@ -26,6 +26,7 @@ from hanzoai.cloud.models.collab_result import CollabResult
from hanzoai.cloud.models.cookie_ack import CookieAck
from hanzoai.cloud.models.plan_info import PlanInfo
from hanzoai.cloud.models.provider_info import ProviderInfo
from hanzoai.cloud.models.public_rooms import PublicRooms
from hanzoai.cloud.models.stats_out import StatsOut
from hanzoai.cloud.models.team_message import TeamMessage
from hanzoai.cloud.models.team_message_write import TeamMessageWrite
@@ -2583,6 +2584,303 @@ class TeamApi:
@validate_call
def get_team_public(
self,
q: Annotated[Optional[StrictStr], Field(description="Q matches a room's name or its topic.")] = None,
org: Annotated[Optional[StrictStr], Field(description="Org narrows to one org's published rooms.")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit caps the page, 50 when unstated and 200 at most. An unparseable value reads as unstated rather than as zero — zero pages is not an answer anybody asked for.")] = None,
_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,
) -> PublicRooms:
"""Lists the rooms orgs have published, across every org.
Lists the rooms orgs have published, across every org. It is NOT part of GET /rooms, and the separation is the point: that address answers the CALLER'S rooms, so folding these in would put strangers' channels in somebody's own sidebar. It reads the directory and never a tenant's store. Every field it can answer with is one an org published by making a room public, so there is nothing here to scope by org — a directory only its own org can read is not a directory. An authenticated principal is still required, because an anonymous crawler is not who this is for.
:param q: Q matches a room's name or its topic.
:type q: str
:param org: Org narrows to one org's published rooms.
:type org: str
:param limit: Limit caps the page, 50 when unstated and 200 at most. An unparseable value reads as unstated rather than as zero — zero pages is not an answer anybody asked for.
:type limit: int
: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_team_public_serialize(
q=q,
org=org,
limit=limit,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "PublicRooms",
}
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_team_public_with_http_info(
self,
q: Annotated[Optional[StrictStr], Field(description="Q matches a room's name or its topic.")] = None,
org: Annotated[Optional[StrictStr], Field(description="Org narrows to one org's published rooms.")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit caps the page, 50 when unstated and 200 at most. An unparseable value reads as unstated rather than as zero — zero pages is not an answer anybody asked for.")] = None,
_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[PublicRooms]:
"""Lists the rooms orgs have published, across every org.
Lists the rooms orgs have published, across every org. It is NOT part of GET /rooms, and the separation is the point: that address answers the CALLER'S rooms, so folding these in would put strangers' channels in somebody's own sidebar. It reads the directory and never a tenant's store. Every field it can answer with is one an org published by making a room public, so there is nothing here to scope by org — a directory only its own org can read is not a directory. An authenticated principal is still required, because an anonymous crawler is not who this is for.
:param q: Q matches a room's name or its topic.
:type q: str
:param org: Org narrows to one org's published rooms.
:type org: str
:param limit: Limit caps the page, 50 when unstated and 200 at most. An unparseable value reads as unstated rather than as zero — zero pages is not an answer anybody asked for.
:type limit: int
: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_team_public_serialize(
q=q,
org=org,
limit=limit,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "PublicRooms",
}
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_team_public_without_preload_content(
self,
q: Annotated[Optional[StrictStr], Field(description="Q matches a room's name or its topic.")] = None,
org: Annotated[Optional[StrictStr], Field(description="Org narrows to one org's published rooms.")] = None,
limit: Annotated[Optional[StrictInt], Field(description="Limit caps the page, 50 when unstated and 200 at most. An unparseable value reads as unstated rather than as zero — zero pages is not an answer anybody asked for.")] = None,
_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 rooms orgs have published, across every org.
Lists the rooms orgs have published, across every org. It is NOT part of GET /rooms, and the separation is the point: that address answers the CALLER'S rooms, so folding these in would put strangers' channels in somebody's own sidebar. It reads the directory and never a tenant's store. Every field it can answer with is one an org published by making a room public, so there is nothing here to scope by org — a directory only its own org can read is not a directory. An authenticated principal is still required, because an anonymous crawler is not who this is for.
:param q: Q matches a room's name or its topic.
:type q: str
:param org: Org narrows to one org's published rooms.
:type org: str
:param limit: Limit caps the page, 50 when unstated and 200 at most. An unparseable value reads as unstated rather than as zero — zero pages is not an answer anybody asked for.
:type limit: int
: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_team_public_serialize(
q=q,
org=org,
limit=limit,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "PublicRooms",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_team_public_serialize(
self,
q,
org,
limit,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if q is not None:
_query_params.append(('q', q))
if org is not None:
_query_params.append(('org', org))
if limit is not None:
_query_params.append(('limit', limit))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/team/public',
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_team_rooms(
self,
+11 -25
View File
@@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import StrictInt, StrictStr
from typing import Any, Dict, Optional
from typing import Optional
from hanzoai.cloud.models.buy_input import BuyInput
from hanzoai.cloud.models.call import Call
from hanzoai.cloud.models.call_input import CallInput
@@ -63,7 +63,7 @@ class TelApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> object:
) -> None:
"""Ends a call this org placed.
Ends a call this org placed. The holding is read for THIS org before the carrier is asked, for the reason releaseNumber gives one surface up: an id belonging to another tenant would otherwise be hung up by whoever guessed it.
@@ -101,7 +101,7 @@ class TelApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -130,7 +130,7 @@ class TelApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[object]:
) -> ApiResponse[None]:
"""Ends a call this org placed.
Ends a call this org placed. The holding is read for THIS org before the carrier is asked, for the reason releaseNumber gives one surface up: an id belonging to another tenant would otherwise be hung up by whoever guessed it.
@@ -168,7 +168,7 @@ class TelApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -235,7 +235,7 @@ class TelApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -276,13 +276,6 @@ class TelApi:
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
@@ -324,7 +317,7 @@ class TelApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> object:
) -> None:
"""Checks the holding is THIS org's before it reaches the carrier.
Checks the holding is THIS org's before it reaches the carrier. Without that read, an id belonging to another tenant would be released by whoever guessed it.
@@ -362,7 +355,7 @@ class TelApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -391,7 +384,7 @@ class TelApi:
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[object]:
) -> ApiResponse[None]:
"""Checks the holding is THIS org's before it reaches the carrier.
Checks the holding is THIS org's before it reaches the carrier. Without that read, an id belonging to another tenant would be released by whoever guessed it.
@@ -429,7 +422,7 @@ class TelApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -496,7 +489,7 @@ class TelApi:
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "object",
'204': None,
}
response_data = self.api_client.call_api(
*_param,
@@ -537,13 +530,6 @@ class TelApi:
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
+11 -2
View File
@@ -540,6 +540,7 @@ from hanzoai.cloud.models.enroll_req import EnrollReq
from hanzoai.cloud.models.enroll_result import EnrollResult
from hanzoai.cloud.models.enrollment import Enrollment
from hanzoai.cloud.models.enrollment_list import EnrollmentList
from hanzoai.cloud.models.enrollment_view import EnrollmentView
from hanzoai.cloud.models.enrolment import Enrolment
from hanzoai.cloud.models.entitlements_view import EntitlementsView
from hanzoai.cloud.models.entry import Entry
@@ -578,7 +579,6 @@ from hanzoai.cloud.models.evaluate_in import EvaluateIn
from hanzoai.cloud.models.evaluator_list import EvaluatorList
from hanzoai.cloud.models.evaluator_req import EvaluatorReq
from hanzoai.cloud.models.evaluator_view import EvaluatorView
from hanzoai.cloud.models.event import Event
from hanzoai.cloud.models.event_in import EventIn
from hanzoai.cloud.models.event_list import EventList
from hanzoai.cloud.models.event_view import EventView
@@ -854,6 +854,9 @@ from hanzoai.cloud.models.iam_workspace import IamWorkspace
from hanzoai.cloud.models.iam_workspaces_delete_output import IamWorkspacesDeleteOutput
from hanzoai.cloud.models.iam_workspaces_input import IamWorkspacesInput
from hanzoai.cloud.models.iam_workspaces_list_output import IamWorkspacesListOutput
from hanzoai.cloud.models.identity_in import IdentityIn
from hanzoai.cloud.models.identity_list import IdentityList
from hanzoai.cloud.models.identity_view import IdentityView
from hanzoai.cloud.models.image_origin import ImageOrigin
from hanzoai.cloud.models.image_view import ImageView
from hanzoai.cloud.models.import_cap_table_in import ImportCapTableIn
@@ -916,6 +919,7 @@ from hanzoai.cloud.models.item_view import ItemView
from hanzoai.cloud.models.job_cancel import JobCancel
from hanzoai.cloud.models.job_canceled import JobCanceled
from hanzoai.cloud.models.job_list import JobList
from hanzoai.cloud.models.join_failure import JoinFailure
from hanzoai.cloud.models.journey_step import JourneyStep
from hanzoai.cloud.models.judge_spec import JudgeSpec
from hanzoai.cloud.models.kb_authorize_out import KbAuthorizeOut
@@ -987,6 +991,7 @@ from hanzoai.cloud.models.link_list import LinkList
from hanzoai.cloud.models.link_mint import LinkMint
from hanzoai.cloud.models.link_view import LinkView
from hanzoai.cloud.models.list_out import ListOut
from hanzoai.cloud.models.listed import Listed
from hanzoai.cloud.models.listing import Listing
from hanzoai.cloud.models.listing_page import ListingPage
from hanzoai.cloud.models.liveness import Liveness
@@ -2053,11 +2058,13 @@ from hanzoai.cloud.models.provision_request import ProvisionRequest
from hanzoai.cloud.models.provision_result import ProvisionResult
from hanzoai.cloud.models.provisioned_resource import ProvisionedResource
from hanzoai.cloud.models.provisioned_summary import ProvisionedSummary
from hanzoai.cloud.models.public_rooms import PublicRooms
from hanzoai.cloud.models.publish_input import PublishInput
from hanzoai.cloud.models.publish_kit_in import PublishKitIn
from hanzoai.cloud.models.publish_req import PublishReq
from hanzoai.cloud.models.publish_result import PublishResult
from hanzoai.cloud.models.published_claim import PublishedClaim
from hanzoai.cloud.models.published_view import PublishedView
from hanzoai.cloud.models.pull_list import PullList
from hanzoai.cloud.models.pull_view import PullView
from hanzoai.cloud.models.purge import Purge
@@ -2133,6 +2140,7 @@ from hanzoai.cloud.models.registry_project_list import RegistryProjectList
from hanzoai.cloud.models.registry_status import RegistryStatus
from hanzoai.cloud.models.registry_tag_list import RegistryTagList
from hanzoai.cloud.models.registry_token import RegistryToken
from hanzoai.cloud.models.reindex_out import ReindexOut
from hanzoai.cloud.models.release_board import ReleaseBoard
from hanzoai.cloud.models.release_row import ReleaseRow
from hanzoai.cloud.models.remark import Remark
@@ -2317,6 +2325,7 @@ from hanzoai.cloud.models.series_line import SeriesLine
from hanzoai.cloud.models.series_point import SeriesPoint
from hanzoai.cloud.models.service import Service
from hanzoai.cloud.models.service_detail import ServiceDetail
from hanzoai.cloud.models.service_in import ServiceIn
from hanzoai.cloud.models.service_port import ServicePort
from hanzoai.cloud.models.session import Session
from hanzoai.cloud.models.session_detail import SessionDetail
@@ -2342,6 +2351,7 @@ from hanzoai.cloud.models.skill import Skill
from hanzoai.cloud.models.skill_deleted import SkillDeleted
from hanzoai.cloud.models.skill_in import SkillIn
from hanzoai.cloud.models.skill_written import SkillWritten
from hanzoai.cloud.models.slack_join_out import SlackJoinOut
from hanzoai.cloud.models.slot_view import SlotView
from hanzoai.cloud.models.social_account import SocialAccount
from hanzoai.cloud.models.social_account_body import SocialAccountBody
@@ -2577,4 +2587,3 @@ from hanzoai.cloud.models.world_wire import WorldWire
from hanzoai.cloud.models.write_in import WriteIn
from hanzoai.cloud.models.written import Written
from hanzoai.cloud.models.wrote import Wrote
from hanzoai.cloud.models.zap_proc_req import ZapProcReq
+1 -1
View File
@@ -28,7 +28,7 @@ class BackendStatus(BaseModel):
""" # noqa: E501
error: Optional[StrictStr] = Field(default=None, description="Error is the failure text from a leg whose status is degraded — the reason a configured backend could not answer. Absent otherwise.")
hits: Optional[StrictInt] = Field(default=None, description="Hits is how many results this leg returned, counted BEFORE fusion, so it is not the number that survived into Fusion.Hits — fusion merges what both legs found and the caller's limit and offset then page it. 0 for a leg that did not run.")
name: Optional[StrictStr] = Field(default=None, description="Name is which leg this reports: \"index\", the lexical store, \"vector\", the semantic one, or \"code\", the org's own repositories. Match.Backend uses the same three names.")
name: Optional[StrictStr] = Field(default=None, description="Name is which leg this reports: \"index\", the lexical store, \"vector\", the semantic one, \"code\", the org's own repositories, or \"rerank\", the relevance pass over the fused window. Match.Backend uses the same names.")
status: Optional[StrictStr] = Field(default=None, description="Status is one of ok, degraded, disabled, skipped — four distinct operational facts that are never collapsed. It ran and answered; it is configured and FAILED (Error says how, and only this one is a fault); this deployment never provisioned it; or the request's mode excluded it.")
took_ms: Optional[StrictInt] = Field(default=None, description="TookMS is how long this leg took, in milliseconds, timed around its own call and excluding fusion. 0 for a leg that was skipped or is disabled, since nothing was called.")
__properties: ClassVar[List[str]] = ["error", "hits", "name", "status", "took_ms"]
+1 -1
View File
@@ -29,7 +29,7 @@ class Capabilities(BaseModel):
actions: Optional[StrictBool] = Field(default=None, description="Actions is whether the transport renders an INTERACTIVE control natively, and it is the flag to read before composing one. The vocabulary is a closed kind-tagged union (envelope.go), exactly four kinds, each carrying only its own field plus an optional label: command — a bot command to run (`command`), rendered as a button that invokes it. url — an external link (`url`), rendered as a link button. select — a menu (`options`, each a label and the value choosing it returns), rendered as a picker. approval — a reference to an approval request (`approval.id`), rendered as approve/deny controls bound to that id. False on every transport, and nothing refuses a send for it: actions are accepted, validated per kind, and flattened by renderText to one line each after the text — `[label] command`, `[label] url`, `[label] opt | opt`, `[label] approval requested: <id>`. So a caller that needs a real control must read this flag and degrade itself; a caller that only needs the choice communicated can send actions and take the text form.")
dm: Optional[StrictBool] = Field(default=None, description="DM is whether the transport carries a DIRECT message at all. True for slack, teams, telegram and whatsapp — whatsapp is nothing else, since the Cloud API addresses a person's number and there is no room a third party joins. False for discord, honestly: that ingress is guild-scoped slash commands — an interaction without a guild id is refused at the endpoint — so nothing ever arrives classified as a DM, no reply route is ever learned for one, and a send addressed at a Discord DM is refused 409.")
group: Optional[StrictBool] = Field(default=None, description="Group is whether the transport carries multi-person rooms — a Discord guild channel, a Slack channel, a Teams channel or group chat, a Telegram group or supergroup. False on whatsapp alone, which has no such room to carry.")
media: Optional[StrictBool] = Field(default=None, description="Media is whether the transport renders an ATTACHMENT natively. False everywhere, and a send is not refused for it: renderText flattens each attachment to one `kind: url (mime)` line after the text rather than dropping it. A transport whose egress hands its door the raw text would drop the attachment instead, and an attachment-only send would reach the platform with nothing to say — which is why the flag and the flattening are pinned together.")
media: Optional[StrictBool] = Field(default=None, description="Media is whether the transport renders an ATTACHMENT natively. False everywhere, and a send is not refused for it: renderText flattens each attachment to one `kind: url (mime)` line after the text rather than dropping it. A transport whose egress passes the raw text straight through would drop the attachment instead, and an attachment-only send would reach the platform with nothing to say — which is why the flag and the flattening are pinned together.")
thread: Optional[StrictBool] = Field(default=None, description="Thread is whether a reply can be threaded UNDER a specific message. True for slack alone: it is the only transport whose ingress reports a thread (thread_ts, published as the envelope's replyTo) and whose send posts back into it. Discord's replyTo makes an inline reply rather than a thread, Telegram's and WhatsApp's each quote one message, and Teams carries no reply target at all — a replyTo sent to it is ignored.")
__properties: ClassVar[List[str]] = ["actions", "dm", "group", "media", "thread"]
+12 -12
View File
@@ -26,18 +26,18 @@ class CodingStartIn(BaseModel):
"""
CodingStartIn
""" # noqa: E501
after: Optional[StrictStr] = Field(default=None, description="After names a previous run's session, and starts this one from where that one stopped instead of from the repository's default. It is how a follow-up instruction — \"now add tests for it\" — builds on work already done rather than beginning again on a fresh clone. It sets the base and nothing else, so this run still writes its OWN branch. One run, one branch: a run that wrote back onto an earlier run's branch would break the rule the forge's ref policy is built on, and would leave two turns of work with one name to review. A caller who already knows the branch may pass Base directly; this exists because the branch is derived from a session id and nobody should have to know how. Base wins if both are given.")
agent_ref: Optional[StrictStr] = Field(default=None, description="AgentRef names a configured agent to run as, which is how an org pins a harness, a model and a prompt to a name. Empty runs the default agent.", alias="agentRef")
base: Optional[StrictStr] = Field(default=None, description="Base is the branch to start from. Empty takes the repository's default. The run never writes here — it writes the agent branch it answers with.")
desktop: Optional[StrictBool] = Field(default=None, description="Desktop asks for a run with a SCREEN — an image carrying an X server — for a task that has to drive a browser or another windowed program. False, the default, is a headless checkout, which is what writing code needs.")
project: Optional[StrictStr] = Field(default=None, description="Project scopes the run to one board's work when the org keeps more than one. Empty is the org's default.")
prompt: Optional[StrictStr] = Field(default=None, description="Prompt is the task, in the words you would use with a colleague who has the checkout open. It is the whole instruction: there is no second field for context, and a prompt that names files and the outcome it wants gets a run that does not have to guess either.")
reply_channel: Optional[StrictStr] = Field(default=None, description="ReplyChannel / ReplyThread are WHERE THE RUN NARRATES ITSELF, when the surface that started it has somewhere for it to talk. Empty means nobody is listening and the run simply does not narrate — which is the app surface's case, because /v1/agents/coding hands back a session id and the session stream is a better progress feed than any message could be. It is an ADDRESS and not a token: the engine says \"put this text there\", and the process that owns the workspace's bot credential is the one that actually posts. So a run reports into a Slack thread without the engine ever holding the token that could post anywhere else in that workspace.", alias="replyChannel")
reply_thread: Optional[StrictStr] = Field(default=None, description="ReplyThread narrows that address to one THREAD inside the channel: on Slack it is the parent message's ts, the same value a reply carries as thread_ts. Empty puts the run's status line at the top level of the channel instead. The channel is what decides whether a run narrates at all, so this on its own addresses nothing — a thread with no ReplyChannel is a run nobody hears.", alias="replyThread")
repo: Optional[StrictStr] = Field(default=None, description="Repo is what to work on, as `owner/name` in the caller's own org. The engine resolves the clone URL and the push credential from the org itself, so this says WHICH repository and never how to reach it.")
target_id: Optional[StrictStr] = Field(default=None, description="TargetID routes the run to a registered machine the org has claimed instead of to a sandbox in our cluster. Empty runs it here, which is the usual case.", alias="targetId")
timeout_seconds: Optional[StrictInt] = Field(default=None, description="TimeoutSeconds bounds the whole run. Unset takes the default budget; a run that hits the bound is stopped and reports what it had done by then.", alias="timeoutSeconds")
tool: Optional[StrictStr] = Field(default=None, description="Tool is which harness runs the prompt — dev | claude | codex | python | node — and Desktop is whether the run needs a screen. Both are empty by default, which is `dev` with no screen, and that default is what every caller gets until it says otherwise. They are two fields because they are two questions. The harness decides what argv starts; the screen decides which image carries an X server. A caller may want claude WITH a browser it can see, and a single enum would have made that combination unsayable.")
after: Optional[StrictStr] = None
agent_ref: Optional[StrictStr] = Field(default=None, alias="agentRef")
base: Optional[StrictStr] = None
desktop: Optional[StrictBool] = None
project: Optional[StrictStr] = None
prompt: Optional[StrictStr] = None
reply_channel: Optional[StrictStr] = Field(default=None, alias="replyChannel")
reply_thread: Optional[StrictStr] = Field(default=None, alias="replyThread")
repo: Optional[StrictStr] = None
target_id: Optional[StrictStr] = Field(default=None, alias="targetId")
timeout_seconds: Optional[StrictInt] = Field(default=None, alias="timeoutSeconds")
tool: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["after", "agentRef", "base", "desktop", "project", "prompt", "replyChannel", "replyThread", "repo", "targetId", "timeoutSeconds", "tool"]
model_config = ConfigDict(
+5 -5
View File
@@ -26,11 +26,11 @@ class CodingStarted(BaseModel):
"""
CodingStarted
""" # noqa: E501
branch: Optional[StrictStr] = Field(default=None, description="Branch is the ref the run will push its work to, and the ONLY ref it is permitted to write. It exists before the work does, so it is safe to tell somebody where to look while the run is still going.")
repo: Optional[StrictStr] = Field(default=None, description="Repo is the repository the run was admitted against, echoed back as the engine resolved it.")
routed: Optional[StrictBool] = Field(default=None, description="Routed says the run went to one of the org's own registered machines rather than to a sandbox in our cluster. False is the ordinary case.")
session_id: Optional[StrictStr] = Field(default=None, description="SessionID is the run's handle: its durable record, and the id its live progress streams under at /v1/agents/sessions/{sessionId}/stream. Every later question about this run is asked with it.", alias="sessionId")
target_id: Optional[StrictStr] = Field(default=None, description="TargetID names that machine when Routed is true, and is empty otherwise.", alias="targetId")
branch: Optional[StrictStr] = None
repo: Optional[StrictStr] = None
routed: Optional[StrictBool] = None
session_id: Optional[StrictStr] = Field(default=None, alias="sessionId")
target_id: Optional[StrictStr] = Field(default=None, alias="targetId")
__properties: ClassVar[List[str]] = ["branch", "repo", "routed", "sessionId", "targetId"]
model_config = ConfigDict(
@@ -22,16 +22,13 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Event(BaseModel):
class EnrollmentView(BaseModel):
"""
Event
EnrollmentView
""" # noqa: E501
distinct_id: Optional[StrictStr] = Field(default=None, alias="distinctId")
event: Optional[StrictStr] = None
properties: Optional[Dict[str, Any]] = None
time: Optional[StrictStr] = None
type: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["distinctId", "event", "properties", "time", "type"]
expires_at: Optional[StrictStr] = Field(default=None, description="ExpiresAt is when the un-used token lapses, RFC 3339.", alias="expiresAt")
jwt: Optional[StrictStr] = Field(default=None, description="JWT is the one-time enrollment token the device presents ONCE to join the fabric (zt edge enroll / zt-edge-tunnel enroll). Spent or lapsed, it authenticates nothing; this surface stores it nowhere.")
__properties: ClassVar[List[str]] = ["expiresAt", "jwt"]
model_config = ConfigDict(
populate_by_name=True,
@@ -51,7 +48,7 @@ class Event(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Event from a JSON string"""
"""Create an instance of EnrollmentView from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +73,7 @@ class Event(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Event from a dict"""
"""Create an instance of EnrollmentView from a dict"""
if obj is None:
return None
@@ -84,11 +81,8 @@ class Event(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"distinctId": obj.get("distinctId"),
"event": obj.get("event"),
"properties": obj.get("properties"),
"time": obj.get("time"),
"type": obj.get("type")
"expiresAt": obj.get("expiresAt"),
"jwt": obj.get("jwt")
})
return _obj
+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 IdentityIn(BaseModel):
"""
IdentityIn
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the device's name within the org — a DNS label. The fabric knows the identity as \"<name>.<org>\"; every answer here uses the caller's name.")
roles: Optional[List[StrictStr]] = Field(default=None, description="Roles are extra role attributes for the identity, each scoped to the caller's org on the way in (\"k3s-host\" is written as \"k3s-host.<org>\") so no caller can claim an attribute another tenant's policy selects. A role of the form \"<service>-host\" makes this identity a HOST of that published service — the bind policy from POST /v1/network/services selects exactly that attribute — and is refused when the org has no such service.")
__properties: ClassVar[List[str]] = ["name", "roles"]
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 IdentityIn 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 IdentityIn 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"),
"roles": obj.get("roles")
})
return _obj
+95
View File
@@ -0,0 +1,95 @@
# 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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.identity_view import IdentityView
from typing import Optional, Set
from typing_extensions import Self
class IdentityList(BaseModel):
"""
IdentityList
""" # noqa: E501
identities: Optional[List[IdentityView]] = Field(default=None, description="Identities is one row per fabric identity tagged with the caller's org role.")
__properties: ClassVar[List[str]] = ["identities"]
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 IdentityList 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 identities (list)
_items = []
if self.identities:
for _item_identities in self.identities:
if _item_identities:
_items.append(_item_identities.to_dict())
_dict['identities'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of IdentityList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"identities": [IdentityView.from_dict(_item) for _item in obj["identities"]] if obj.get("identities") is not None else None
})
return _obj
+97
View File
@@ -0,0 +1,97 @@
# 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.enrollment_view import EnrollmentView
from typing import Optional, Set
from typing_extensions import Self
class IdentityView(BaseModel):
"""
IdentityView
""" # noqa: E501
enrollment: Optional[EnrollmentView] = Field(default=None, description="Enrollment is present only while the identity holds an un-used one-time token — on create, and on a listed identity that has not yet enrolled, so a mislaid JWT can be read again until it is spent or lapses.")
id: Optional[StrictStr] = Field(default=None, description="ID is the identity's fabric id — the key DELETE addresses.")
name: Optional[StrictStr] = Field(default=None, description="Name is the identity's name within the org.")
roles: Optional[List[StrictStr]] = Field(default=None, description="Roles are the identity's role attributes as the fabric holds them: the org's own \"org-<org>\" plus any org-scoped roles it was minted with.")
__properties: ClassVar[List[str]] = ["enrollment", "id", "name", "roles"]
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 IdentityView 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 enrollment
if self.enrollment:
_dict['enrollment'] = self.enrollment.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of IdentityView from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enrollment": EnrollmentView.from_dict(obj["enrollment"]) if obj.get("enrollment") is not None else None,
"id": obj.get("id"),
"name": obj.get("name"),
"roles": obj.get("roles")
})
return _obj
+91
View File
@@ -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 JoinFailure(BaseModel):
"""
JoinFailure
""" # noqa: E501
channel: Optional[StrictStr] = Field(default=None, description="Channel is Slack's id for the room that refused.")
error: Optional[StrictStr] = Field(default=None, description="Error is Slack's own code, carried through unchanged.")
name: Optional[StrictStr] = Field(default=None, description="Name is that room's human name, so the operator does not have to look the id up.")
__properties: ClassVar[List[str]] = ["channel", "error", "name"]
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 JoinFailure 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 JoinFailure from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"channel": obj.get("channel"),
"error": obj.get("error"),
"name": obj.get("name")
})
return _obj
+3 -1
View File
@@ -27,11 +27,12 @@ class LeaseIn(BaseModel):
LeaseIn
""" # noqa: E501
var_class: Optional[StrictStr] = Field(default=None, description="Class is what the sandbox is FOR: \"exec\" for a code-interpreter call, \"dev\" for a workspace bound to a project, \"desktop\" for one with a screen. It decides the image, the working directory and the isolation.", alias="class")
cluster: Optional[StrictStr] = Field(default=None, description="Cluster names one of the org's attached clusters to run the sandbox on — the fleet-local name it was registered under. Empty runs on the home cluster. The named cluster must carry the sandbox namespace and the gvisor runtime class; a name the org has not attached is 404.")
image: Optional[StrictStr] = Field(default=None, description="Image overrides the image the class would pick. Honoured only for a caller the policy admits, and the sandbox that comes back names the image it GOT.")
project: Optional[StrictStr] = Field(default=None, description="Project binds the sandbox to one of the org's projects. Required for a dev or desktop class, which are single-attach per project; an exec sandbox carries none.")
runtime: Optional[StrictStr] = Field(default=None, description="Runtime asks for an isolation: runc, gvisor, kata-clh or kata-fc. It is a REQUEST, not a guarantee — the sandbox that comes back carries the runtime it was actually given, which is the field to read.")
ttl_sec: Optional[StrictInt] = Field(default=None, description="TTLSec is how long the lease runs before the reaper may take it, in seconds. Zero takes the class's own default.", alias="ttlSec")
__properties: ClassVar[List[str]] = ["class", "image", "project", "runtime", "ttlSec"]
__properties: ClassVar[List[str]] = ["class", "cluster", "image", "project", "runtime", "ttlSec"]
model_config = ConfigDict(
populate_by_name=True,
@@ -85,6 +86,7 @@ class LeaseIn(BaseModel):
_obj = cls.model_validate({
"class": obj.get("class"),
"cluster": obj.get("cluster"),
"image": obj.get("image"),
"project": obj.get("project"),
"runtime": obj.get("runtime"),
+3 -1
View File
@@ -27,11 +27,12 @@ class Leased(BaseModel):
Leased
""" # noqa: E501
var_class: Optional[StrictStr] = Field(default=None, description="Class is what was actually leased, from the closed set LeaseIn.Class names: exec | dev | desktop | android. A request that named none leased an `exec`, so this is where a caller learns which kind of computer it is holding, and it is what Workdir below follows from.", alias="class")
cluster: Optional[StrictStr] = Field(default=None, description="Cluster is the attached cluster this sandbox runs on, when one was named. Empty is the home cluster.")
id: Optional[StrictStr] = Field(default=None, description="ID names this computer for every later call — run, read, write, stop and end all take it, and a LeaseIn carrying it resumes THIS sandbox instead of leasing a second one. Minted here; a caller cannot choose it, and a resumed lease that had expired comes back under a new one.")
runtime: Optional[StrictStr] = Field(default=None, description="Runtime is the boundary this sandbox GOT, which need not be the one asked for — carried for the same reason Workdir is, that it is a fact only the owner knows and a caller assuming it would be holding a second copy. Empty is the node's default runtime, and a real answer.")
status: Optional[StrictStr] = Field(default=None, description="Status is where the pod stands, from the store's three: pending | running | error. A lease that ANSWERS has already waited for the pod, so this reads `running` — a start that failed is a 503 and no sandbox at all. Read it anyway: exec refuses a sandbox that is not running, so anything else here is the reason the next call will not work.")
workdir: Optional[StrictStr] = Field(default=None, description="Workdir is the absolute directory this sandbox keeps files in, and what a relative path in a later read, write or run resolves against — /work for dev, desktop and android (the project volume's mount point), /mnt/data for exec (the artifact directory the code tool tells the model to write to). A path that climbs above it is refused rather than rewritten.")
__properties: ClassVar[List[str]] = ["class", "id", "runtime", "status", "workdir"]
__properties: ClassVar[List[str]] = ["class", "cluster", "id", "runtime", "status", "workdir"]
model_config = ConfigDict(
populate_by_name=True,
@@ -85,6 +86,7 @@ class Leased(BaseModel):
_obj = cls.model_validate({
"class": obj.get("class"),
"cluster": obj.get("cluster"),
"id": obj.get("id"),
"runtime": obj.get("runtime"),
"status": obj.get("status"),
+99
View File
@@ -0,0 +1,99 @@
# 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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Listed(BaseModel):
"""
Listed
""" # noqa: E501
members: Optional[StrictInt] = Field(default=None, description="Members counts the room, and never names anybody in it.")
name: Optional[StrictStr] = Field(default=None, description="Name is what a person sees, without the sigil a client draws.")
org: Optional[StrictStr] = Field(default=None, description="Org owns the room. It is also what a caller filters by to browse one org.")
room: Optional[StrictStr] = Field(default=None, description="Room addresses it in the owning store — what a join is called with.")
space: Optional[StrictStr] = Field(default=None, description="Space is where the room lives inside that org.")
topic: Optional[StrictStr] = Field(default=None, description="Topic is the room's one-line subject, empty when it has none.")
updated: Optional[StrictInt] = Field(default=None, description="Updated is when this row was last written, unix seconds.")
__properties: ClassVar[List[str]] = ["members", "name", "org", "room", "space", "topic", "updated"]
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 Listed 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 Listed from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"members": obj.get("members"),
"name": obj.get("name"),
"org": obj.get("org"),
"room": obj.get("room"),
"space": obj.get("space"),
"topic": obj.get("topic"),
"updated": obj.get("updated")
})
return _obj
+20 -20
View File
@@ -18,28 +18,28 @@ import pprint
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from hanzoai.cloud.models.capture_batch import CaptureBatch
from hanzoai.cloud.models.event import Event
from hanzoai.cloud.models.capture_event import CaptureEvent
from hanzoai.cloud.models.insights_body import InsightsBody
from pydantic import StrictStr, Field
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self
POSTEVENTREQUEST_ONE_OF_SCHEMAS = ["CaptureBatch", "Event", "InsightsBody", "List[Event]"]
POSTEVENTREQUEST_ONE_OF_SCHEMAS = ["CaptureBatch", "CaptureEvent", "InsightsBody", "List[CaptureEvent]"]
class PostEventRequest(BaseModel):
"""
PostEventRequest
"""
# data type: Event
oneof_schema_1_validator: Optional[Event] = None
# data type: List[Event]
oneof_schema_2_validator: Optional[List[Event]] = None
# data type: CaptureEvent
oneof_schema_1_validator: Optional[CaptureEvent] = None
# data type: List[CaptureEvent]
oneof_schema_2_validator: Optional[List[CaptureEvent]] = None
# data type: CaptureBatch
oneof_schema_3_validator: Optional[CaptureBatch] = None
# data type: InsightsBody
oneof_schema_4_validator: Optional[InsightsBody] = None
actual_instance: Optional[Union[CaptureBatch, Event, InsightsBody, List[Event]]] = None
one_of_schemas: Set[str] = { "CaptureBatch", "Event", "InsightsBody", "List[Event]" }
actual_instance: Optional[Union[CaptureBatch, CaptureEvent, InsightsBody, List[CaptureEvent]]] = None
one_of_schemas: Set[str] = { "CaptureBatch", "CaptureEvent", "InsightsBody", "List[CaptureEvent]" }
model_config = ConfigDict(
validate_assignment=True,
@@ -62,12 +62,12 @@ class PostEventRequest(BaseModel):
instance = PostEventRequest.model_construct()
error_messages = []
match = 0
# validate data type: Event
if not isinstance(v, Event):
error_messages.append(f"Error! Input type `{type(v)}` is not `Event`")
# validate data type: CaptureEvent
if not isinstance(v, CaptureEvent):
error_messages.append(f"Error! Input type `{type(v)}` is not `CaptureEvent`")
else:
match += 1
# validate data type: List[Event]
# validate data type: List[CaptureEvent]
try:
instance.oneof_schema_2_validator = v
match += 1
@@ -85,10 +85,10 @@ class PostEventRequest(BaseModel):
match += 1
if match > 1:
# more than 1 match
raise ValueError("Multiple matches found when setting `actual_instance` in PostEventRequest with oneOf schemas: CaptureBatch, Event, InsightsBody, List[Event]. Details: " + ", ".join(error_messages))
raise ValueError("Multiple matches found when setting `actual_instance` in PostEventRequest with oneOf schemas: CaptureBatch, CaptureEvent, InsightsBody, List[CaptureEvent]. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
raise ValueError("No match found when setting `actual_instance` in PostEventRequest with oneOf schemas: CaptureBatch, Event, InsightsBody, List[Event]. Details: " + ", ".join(error_messages))
raise ValueError("No match found when setting `actual_instance` in PostEventRequest with oneOf schemas: CaptureBatch, CaptureEvent, InsightsBody, List[CaptureEvent]. Details: " + ", ".join(error_messages))
else:
return v
@@ -103,13 +103,13 @@ class PostEventRequest(BaseModel):
error_messages = []
match = 0
# deserialize data into Event
# deserialize data into CaptureEvent
try:
instance.actual_instance = Event.from_json(json_str)
instance.actual_instance = CaptureEvent.from_json(json_str)
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# deserialize data into List[Event]
# deserialize data into List[CaptureEvent]
try:
# validation
instance.oneof_schema_2_validator = json.loads(json_str)
@@ -133,10 +133,10 @@ class PostEventRequest(BaseModel):
if match > 1:
# more than 1 match
raise ValueError("Multiple matches found when deserializing the JSON string into PostEventRequest with oneOf schemas: CaptureBatch, Event, InsightsBody, List[Event]. Details: " + ", ".join(error_messages))
raise ValueError("Multiple matches found when deserializing the JSON string into PostEventRequest with oneOf schemas: CaptureBatch, CaptureEvent, InsightsBody, List[CaptureEvent]. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
raise ValueError("No match found when deserializing the JSON string into PostEventRequest with oneOf schemas: CaptureBatch, Event, InsightsBody, List[Event]. Details: " + ", ".join(error_messages))
raise ValueError("No match found when deserializing the JSON string into PostEventRequest with oneOf schemas: CaptureBatch, CaptureEvent, InsightsBody, List[CaptureEvent]. Details: " + ", ".join(error_messages))
else:
return instance
@@ -150,7 +150,7 @@ class PostEventRequest(BaseModel):
else:
return json.dumps(self.actual_instance)
def to_dict(self) -> Optional[Union[Dict[str, Any], CaptureBatch, Event, InsightsBody, List[Event]]]:
def to_dict(self) -> Optional[Union[Dict[str, Any], CaptureBatch, CaptureEvent, InsightsBody, List[CaptureEvent]]]:
"""Returns the dict representation of the actual instance"""
if self.actual_instance is None:
return None
+1 -1
View File
@@ -26,7 +26,7 @@ class Provenance(BaseModel):
"""
Provenance
""" # noqa: E501
backend: Optional[StrictStr] = Field(default=None, description="Backend is the leg that contributed this match: \"index\" (lexical), \"vector\" (semantic) or \"code\" (the org's repositories). It is the same name that leg reports itself under in Fusion.Backends, so a hit can be traced to a status.")
backend: Optional[StrictStr] = Field(default=None, description="Backend is the leg that contributed this match: \"index\" (lexical), \"vector\" (semantic), \"code\" (the org's repositories) or \"rerank\" (the cross-encoder pass, whose Score is the relevance it assigned). It is the same name that leg reports itself under in Fusion.Backends, so a hit can be traced to a status.")
rank: Optional[StrictInt] = Field(default=None, description="Rank is this document's 1-based position in THAT leg's own result list, before fusion — 1 is the leg's best hit. It is the only input to the fused score: RRF adds 1/(60+rank) per leg, which is why a document two legs ranked second beats one a single leg ranked first.")
score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Score is the leg's NATIVE score, on that leg's own scale, reported for explanation and never used in ranking — the scales are incomparable (a cosine similarity against a term-match count), which is why fusion works on ranks. The vector leg reports Qdrant's cosine similarity; the lexical leg exposes no per-row score and reports 0, meaning \"unscored\", not \"scored zero\".")
__properties: ClassVar[List[str]] = ["backend", "rank", "score"]
+95
View File
@@ -0,0 +1,95 @@
# 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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.listed import Listed
from typing import Optional, Set
from typing_extensions import Self
class PublicRooms(BaseModel):
"""
PublicRooms
""" # noqa: E501
rooms: Optional[List[Listed]] = Field(default=None, description="Rooms is every published room the query matched, newest-written first.")
__properties: ClassVar[List[str]] = ["rooms"]
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 PublicRooms 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 rooms (list)
_items = []
if self.rooms:
for _item_rooms in self.rooms:
if _item_rooms:
_items.append(_item_rooms.to_dict())
_dict['rooms'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PublicRooms from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"rooms": [Listed.from_dict(_item) for _item in obj["rooms"]] if obj.get("rooms") is not None else None
})
return _obj
@@ -17,19 +17,19 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
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 ZapProcReq(BaseModel):
class PublishedView(BaseModel):
"""
ZapProcReq
PublishedView
""" # noqa: E501
description: Optional[StrictStr] = None
name: Optional[StrictStr] = None
project: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["description", "name", "project"]
dns: Optional[StrictStr] = Field(default=None, description="DNS is the name the fabric answers for this service — what a kubeconfig server, or any client on the org's overlay, dials.")
id: Optional[StrictStr] = Field(default=None, description="ID is the fabric service's id.")
name: Optional[StrictStr] = Field(default=None, description="Name is the service's name within the org.")
__properties: ClassVar[List[str]] = ["dns", "id", "name"]
model_config = ConfigDict(
populate_by_name=True,
@@ -49,7 +49,7 @@ class ZapProcReq(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ZapProcReq from a JSON string"""
"""Create an instance of PublishedView from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -74,7 +74,7 @@ class ZapProcReq(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ZapProcReq from a dict"""
"""Create an instance of PublishedView from a dict"""
if obj is None:
return None
@@ -82,9 +82,9 @@ class ZapProcReq(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"description": obj.get("description"),
"name": obj.get("name"),
"project": obj.get("project")
"dns": obj.get("dns"),
"id": obj.get("id"),
"name": obj.get("name")
})
return _obj
+93
View File
@@ -0,0 +1,93 @@
# 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, StrictInt
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ReindexOut(BaseModel):
"""
ReindexOut
""" # noqa: E501
failed: Optional[StrictInt] = Field(default=None, description="Failed is how many documents could not be embedded; each is logged with its name, and the rest of the rebuild went on without it.")
lexical: Optional[StrictInt] = Field(default=None, description="Lexical is how many rows the org's lexical index holds now; 0 in a deployment without the index app.")
removed: Optional[StrictInt] = Field(default=None, description="Removed is how many rows the lexical index held for documents that no longer exist; 0 without the index app.")
vectors: Optional[StrictInt] = Field(default=None, description="Vectors is how many documents were embedded and written to the org's collection, which was dropped and created again at the configured size.")
__properties: ClassVar[List[str]] = ["failed", "lexical", "removed", "vectors"]
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 ReindexOut 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 ReindexOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"failed": obj.get("failed"),
"lexical": obj.get("lexical"),
"removed": obj.get("removed"),
"vectors": obj.get("vectors")
})
return _obj
+3 -1
View File
@@ -27,6 +27,7 @@ class Sandbox(BaseModel):
Sandbox
""" # noqa: E501
var_class: Optional[StrictStr] = Field(default=None, description="Class is what the sandbox is FOR, and it decides the image, the working directory and the isolation: \"exec\" for a code-interpreter call (workdir /mnt/data, no project, bounded per org), \"dev\" for a workspace bound to a project (workdir /work, single-attach), \"desktop\" for one with a screen.", alias="class")
cluster: Optional[StrictStr] = Field(default=None, description="Cluster is the attached cluster this sandbox runs on — the fleet-local name the lease named — or empty for the home cluster. Immutable for the life of the lease, like the pod it locates: every later call into the sandbox reads it to reach the right apiserver.")
connected_at: Optional[StrictInt] = Field(default=None, description="ConnectedAt is when somebody was last known to have this sandbox's project OPEN, Unix seconds. It is a fact with an EXPIRY rather than a flag: a watcher restamps it every beat of its stream, and it goes stale on its own when the stream dies, so nothing has to be turned off by a process that may not be there any more. The reaper reads it to choose WHICH idle allowance applies — see lifecycle.go. Zero means nobody has said so, which puts the sandbox on the short clock.", alias="connectedAt")
created_at: Optional[StrictInt] = Field(default=None, description="CreatedAt is when the lease was first taken, Unix seconds.", alias="createdAt")
error: Optional[StrictStr] = Field(default=None, description="Error is why the sandbox could not come up, in plain words. Present only with status \"error\", and it is the field to read rather than inferring a cause from the absence of a pod.")
@@ -40,7 +41,7 @@ class Sandbox(BaseModel):
runtime: Optional[StrictStr] = Field(default=None, description="Runtime is the isolation boundary this sandbox GOT, which is not always the one it asked for: a caller states a preference and runtimeFor answers with what the sandbox can actually have. Reported so a person comparing two runtimes is comparing the runtimes they got rather than the ones they typed — the difference between those two is the whole reason to record it. Empty means the node's default runtime, which is a real answer and not a missing one. This is not a copy that can go stale. runtimeClassName is IMMUTABLE on a pod, a sandbox's pod is created once and never recreated (restartPolicy Never, no pool), and its name is never reused — so for as long as the pod this row names exists, it is running this runtime. The alternative, asking the apiserver on every read, buys nothing and costs a round trip per row.")
status: Optional[StrictStr] = Field(default=None, description="Status is where the sandbox is in its life: \"pending\" while the pod is coming up, \"running\" once it can take work, \"error\" when it cannot. Only a running sandbox takes an exec or mints an interactive ticket.")
volume: Optional[StrictStr] = Field(default=None, description="Volume is the persistent volume attached to the sandbox, when it has one. A dev sandbox keeps its work across leases through it; an exec sandbox has none and loses everything outside /mnt/data when the lease ends.")
__properties: ClassVar[List[str]] = ["class", "connectedAt", "createdAt", "error", "expiresAt", "id", "image", "kind", "lastUsedAt", "org", "project", "runtime", "status", "volume"]
__properties: ClassVar[List[str]] = ["class", "cluster", "connectedAt", "createdAt", "error", "expiresAt", "id", "image", "kind", "lastUsedAt", "org", "project", "runtime", "status", "volume"]
model_config = ConfigDict(
populate_by_name=True,
@@ -94,6 +95,7 @@ class Sandbox(BaseModel):
_obj = cls.model_validate({
"class": obj.get("class"),
"cluster": obj.get("cluster"),
"connectedAt": obj.get("connectedAt"),
"createdAt": obj.get("createdAt"),
"error": obj.get("error"),
+91
View File
@@ -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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ServiceIn(BaseModel):
"""
ServiceIn
""" # noqa: E501
host: Optional[StrictStr] = Field(default=None, description="Host is where the HOSTING identity forwards a connection — an address the host device itself can reach, \"127.0.0.1\" for a server on the device.")
name: Optional[StrictStr] = Field(default=None, description="Name is the service's name within the org — a DNS label. The fabric knows the service as \"<name>.<org>\" and answers for it at \"<name>.<org>.zt\".")
port: Optional[StrictInt] = Field(default=None, description="Port is the port beside Host, and the one the DNS name intercepts.")
__properties: ClassVar[List[str]] = ["host", "name", "port"]
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 ServiceIn 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 ServiceIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"host": obj.get("host"),
"name": obj.get("name"),
"port": obj.get("port")
})
return _obj
+4 -2
View File
@@ -32,7 +32,8 @@ class Skill(BaseModel):
id: Optional[StrictStr] = Field(default=None, description="ID is the skill's id within the org. It is DERIVED from Name, so writing the same name again revises that skill rather than adding another.")
name: Optional[StrictStr] = Field(default=None, description="Name is the skill's name: one lowercase path segment (a-z0-9, _ or -).")
org: Optional[StrictStr] = Field(default=None, description="Org is the org that authored the skill — the validated caller's, never a value the body supplied.")
__properties: ClassVar[List[str]] = ["content", "createdAt", "description", "id", "name", "org"]
source: Optional[StrictStr] = Field(default=None, description="Source is the repository the skill was read from, \"<project>/<name>\" or \"<name>\"; empty for a skill written through the API. A push replaces every skill of its source at once, so a skill leaves when its file does.")
__properties: ClassVar[List[str]] = ["content", "createdAt", "description", "id", "name", "org", "source"]
model_config = ConfigDict(
populate_by_name=True,
@@ -90,7 +91,8 @@ class Skill(BaseModel):
"description": obj.get("description"),
"id": obj.get("id"),
"name": obj.get("name"),
"org": obj.get("org")
"org": obj.get("org"),
"source": obj.get("source")
})
return _obj
+101
View File
@@ -0,0 +1,101 @@
# 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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.join_failure import JoinFailure
from typing import Optional, Set
from typing_extensions import Self
class SlackJoinOut(BaseModel):
"""
SlackJoinOut
""" # noqa: E501
already: Optional[StrictInt] = Field(default=None, description="Already counts the channels it was a member of before, kept apart from Joined because only one of the two is a change.")
failed: Optional[List[JoinFailure]] = Field(default=None, description="Failed is per-channel, so one refusal does not hide the rest of the walk.")
joined: Optional[List[StrictStr]] = Field(default=None, description="Joined names the channels this run walked into — the change it made.")
listed: Optional[StrictInt] = Field(default=None, description="Listed is every public, unarchived channel the workspace has.")
__properties: ClassVar[List[str]] = ["already", "failed", "joined", "listed"]
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 SlackJoinOut 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 failed (list)
_items = []
if self.failed:
for _item_failed in self.failed:
if _item_failed:
_items.append(_item_failed.to_dict())
_dict['failed'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SlackJoinOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"already": obj.get("already"),
"failed": [JoinFailure.from_dict(_item) for _item in obj["failed"]] if obj.get("failed") is not None else None,
"joined": obj.get("joined"),
"listed": obj.get("listed")
})
return _obj